Rocky Bernstein > Devel-Trepan-Disassemble-1.99 > Devel::Trepan::Disassemble

Download:
Devel-Trepan-Disassemble-1.99.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.99   Source  

NAME ^

Perl Disassembly plugin for Devel::Trepan via B::Concise

SUMMARY ^

This adds a disassemble command to the Devel::Trepan debugger.

DESCRIPTION ^

disassemble [options] [subroutine|package-name ...]

options:

    -concise
    -terse
    -linenoise
    -debug
    -compact
    -exec
    -tree
    -loose
    -vt
    -ascii
    -from <line-number>
    -to <line-number>

Use B::Concise to disassemble a list of subroutines or a packages. If no subroutine or package is specified, use the subroutine where the program is currently stopped.

Flags -from and -to respectively exclude lines less than or greater that the supplied line number. Other flags are are the corresponding B::Concise flags and that should be consulted for their meaning.

EXAMPLES ^

  $ trepan.pl -e 1

  (trepanpl): dissassemble
  Package Main
    main program:
  =>  LISTOP (0xa0dd208)
        op_next         0
        op_sibling      0
        op_ppaddr       PL_ppaddr[OP_LEAVE]
        op_type         185
        op_flags        0001101: parenthesized, want kids, want void
        op_private      64
        op_first        0xa0e6f60
        op_last         0xa0e7298
    OP (0xa0e6f60)
        op_next         0xa0dd228
        op_sibling      0xa0dd228
        op_ppaddr       PL_ppaddr[OP_ENTER]
        op_type         184
        op_flags        0000000
        op_private      0
    # 1: 1
    COP (0xa0dd228)
        op_next         0xa0dd208
        op_sibling      0xa0e7298
        op_ppaddr       PL_ppaddr[OP_DBSTATE]
        op_type         182
        op_flags        0000001: want void
        op_private      0       256
    OP (0xa0e7298)
        op_next         0xa0dd208
        op_sibling      0
        op_ppaddr       PL_ppaddr[OP_NULL]
        op_type         0
        op_flags        0000001: want void
        op_private      0

Above, the => indicates the next instruction to run.

By default disasm is an alias for disassemble. Here is the -tree option; --tree is okay too.

   (trepanpl): disasm -tree

    main program:
    0xa0dd208-+-0xa0e6f60
              |-# 1:  1
    0xa0dd228
              `-0xa0e7298

Functions can be given:

   (trepanpl): disasm -basic File::Basename::basename

    File::Basename::basename:
    UNOP (0x8ad1d00)
        op_next         0
        op_sibling      0
        op_ppaddr       PL_ppaddr[OP_LEAVESUB]
        op_type         174
    ...

Finally, you can limit the range of output using -from and/or -to:

   (trepanpl): disasm -from 227 -to 236 -basic File::Basename::basename

AUTHORS ^

Rocky Bernstein

COPYRIGHT ^

Copyright (C) 2012 Rocky Bernstein <rocky@cpan.org>

This program is distributed WITHOUT ANY WARRANTY, including but not limited to the implied warranties of merchantability or fitness for a particular purpose.

The program is free software. You may distribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation (either version 2 or any later version) and the Perl Artistic License as published by O'Reilly Media, Inc. Please open the files named gpl-2.0.txt and Artistic for a copy of these licenses.

syntax highlighting: