Sha256: 032a83e99f8f71bb87cc4ed5b08f3c2c9acfcc6fc574fae247ad5d4fef1aae38

Contents?: true

Size: 1.64 KB

Versions: 16

Compression:

Stored size: 1.64 KB

Contents

syntax for source code locations; e.g. used "list" and "break"

Locations are used to indicates places in the source code or the
places in bytecode compiled from source code. Locations are used in
the listing commands like "list" or "disassemble"; they are also used
in "breakpoint" commands like "break", "tbreak" and "continue"

A location is either some sort of "container" and a position inside
that container. A container is either a file name or a method
name. And a position is either a line number or a bytecode offset.
Bytecode offsets are prefaced with an '@'. So 4 is a line number 4, but
@4 is bytecode offset 4. 

File names are distinguished from method names purely by semantic
means.  That its "foo" (without the quotes) could conceivably be
either a method or a file name. The debugger does a file check to see
if "foo" is a file. 

In gdb, locations are often given using a filename a colon and a line
number. That is supported here are well. So myfile.rb:5 indicates line 5
of file "myfile.rb". But since we also allow method names you can also use
"gcd:5" to indicate line 5 of method "gcd". 

Line numbers in methods are not relative to the beginning of the
method but relative the beginning of source text that contains the
method. This is also how Ruby stores line numbers for methods which
are shown for example in a backtrace. So all of this hopefully will
feel familiar and consistent. 

Instead of using a colon to separate the container and the position,
you can also use spacs. So "gcd 5" is the same as gcd:5. 

If the filename has an embedded blank in it, you can indicate that by
using a backslash escape. For example: "file\ with\ blanks.rb"



Version data entries

16 entries across 16 versions & 3 rubygems

Version Path
rbx-trepanning-0.2.1-universal-rubinius-2.0 processor/command/help/location.txt
rbx-trepanning-0.2.1-universal-rubinius-1.2 processor/command/help/location.txt
rbx-trepanning-0.2.0-universal-rubinius-2.0 processor/command/help/location.txt
rb8-trepanning-0.1.6 processor/command/help/location.txt
trepanning-0.1.6 processor/command/help/location.txt
rb8-trepanning-0.1.5 processor/command/help/location.txt
rbx-trepanning-0.1.0-universal-rubinius-1.2 processor/command/help/location.txt
rb8-trepanning-0.1.4 processor/command/help/location.txt
trepanning-0.1.4 processor/command/help/location.txt
trepanning-0.1.3 processor/command/help/location.txt
rb8-trepanning-0.1.3 processor/command/help/location.txt
rb8-trepanning-0.1.3-universal-ruby-1.9.2 processor/command/help/location.txt
rb8-trepanning-0.1.3-universal-ruby-1.8.7 processor/command/help/location.txt
trepanning-0.1.2 processor/command/help/location.txt
rbx-trepanning-0.0.8-universal-rubinius-1.2 processor/command/help/location.txt
trepanning-0.1.1 processor/command/help/location.txt