03 Nov 2019 19:15:25 UTC
- Distribution: Devel-Trepan
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (10)
- KwaliteeBus factor: 1
- 48.91% Coverage
- License: gpl_1
- Perl: v5.8.8
- Activity24 month
- Download (368.11KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version
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
disassemble; they are also used in breakpoint commands like
To a large extent we emulate gdb's concept of a location.
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:5indicates line 5 of file myfile.rb. But since we also allow method names you can also use
gcd:5to indicate line 5 of function 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 Perl stores line numbers for methods which are shown for example in a backtrace. So all of this hopefully will feel familiar and consistent.
Module Install Instructions
To install Devel::Trepan, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Devel::Trepan
For more information on module installation, please visit the detailed CPAN module installation guide.