Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Recently, with the good work of Ben Morrow, Devel::Callsite now has an optional level parameter similar to perl's builtin caller. With this you can get the OP address up the call stack.

In the next release of Devel::Trepan, OP addresses will be shown in locations, by default if Devel::Callsite is installed. Currently they are shown only after the debugger command set display op on is run.

But this got me thinking about this and identifiying the exact position. Given the tree structure nature the Perl program, it should be possible to narrow positions in a line further. For example, one can use words to describe a position within a line. If for example, that an op address is in the second statement of line 10, one might say just that. Or perhaps something like "second function call on line 10".

Going further, one might take B::Concise output and decompile some fragment with a given op address

I realize this probably has limited appeal, but still I think it cool. Any takers on an package that can take B::Concise output and an perl OP addresss, and narrow within a line where that OP is?


In reply to Re^2: How can I get the current OP address (akin to PC)? by rockyb
in thread How can I get the current OP address (akin to PC)? by rockyb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2024-04-20 00:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found