carnaval / Gallium.jl

The Julia debugger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gallium

Build Status

Usage

IMPORTANT: For commands available at the prompt, please see the ASTInterpreter.jl README

Setting a breakpoint

The main entrypoint to Gallium is the breakpoint function. E.g.

using Gallium
include(Pkg.dir("Gallium/examples/testprograms/misc.jl"))
Gallium.breakpoint(sinthesin,Tuple{Int64})
inaloop(2)

Of course you may also use ASTInterpreter directly to start debugging without a breakpoint:

using Gallium
@enter gcd(5, 20)

Breakpointing options

There are several different kinds of breakpoints available:

  • breakpoint(f, sig), e.g. breakpoint(gcd, Tuple{Int,Int}) will set a breakpoint on entry to all methods matching the given signature.
  • breakpoint(f) will set a breakpoint on entry to any method of f
  • breakpoint(file::AbstractString, line) will set a breakpoint at line line in any file that contains file as a substring.
  • breakpoint_on_error(). Will set a breakpoint that triggers whenever an error is thrown in julia code.

You may use Gallium.list_breakpoints() to list all set breakpoints, and enable(bp), disable(bp), remove(bp) to enable/disable or remove breakpoints.

Finally, any breakpoint can be made conditional by using the @conditional macro, e.g.

@conditional breakpoint(gcd,Tuple{Int,Int}) (a==5)

Installation

To install Gallium you may simply run

Pkg.add("Gallium")

Gallium currently doesn't work on Windows.

If you wish to run the latest development version, you may also require the development version of Gallium's dependencies. The appropriate command to move to these development versions is provided below for convencience. However, it is strongly recommended that most users make use of the released version instead.

Pkg.checkout("Reactive")
Pkg.checkout("ObjFileBase")
Pkg.checkout("StructIO")
Pkg.checkout("AbstractTrees")
Pkg.checkout("DWARF")
Pkg.checkout("ELF")
Pkg.checkout("MachO")
Pkg.checkout("TerminalUI")
Pkg.checkout("ASTInterpreter")
Pkg.checkout("VT100")
Pkg.checkout("JuliaParser")
Pkg.checkout("Gallium")

About

The Julia debugger

License:Other


Languages

Language:Julia 79.5%Language:C++ 15.8%Language:Assembly 4.6%Language:C 0.2%