Learning ASM
Paul Bell <[email protected]> Tue, 2 Oct 2018 08:40:18 -0400
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <CA+ttMd-XROv=iSzXvSP-_Tv4xqj=YGe5iJSnm7-78GRbtCAB3A@mail.gmail.com> |
This is a multi-part message in MIME format... ------------=_1538484035-8900-7 Content-Type: multipart/alternative; boundary="000000000000191b3505773e3ab4" --000000000000191b3505773e3ab4 Content-Type: text/plain; charset="UTF-8" Hello, I am just now learning ASM and this is my first post. I've cobbled together a working Java agent that uses ASM to modify methods in the code I want to trace/debug/monitor. Specifically, I modify static methods, instance methods, and constructors. These modifications, inserted at methods' entry, call into my tracing program. There's an awful lot I don't know about ASM and I would be grateful for help with a few things (for now): - How can ASM be used to "single step" through program execution? By "single step" I mean similar to the Eclipse debug breakpoint facility where pressing F5 allows you to step into the next instruction. - How can I "hook" INVOKEVIRTUAL calls? I would like to know when a method calls another method. - What are "labels" and how are they used? Thanks very much. -Paul --000000000000191b3505773e3ab4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">Hello,<br></div><div><br></div><div>I am = just now learning ASM and this is my first post.</div><div><br></div><div>I= 've cobbled together a working Java agent that uses ASM to modify metho= ds in the code I want to trace/debug/monitor. Specifically, I modify static= methods, instance methods, and constructors. These modifications, inserted= at methods' entry, call into my tracing program.</div><div><br></div><= div>There's an awful lot I don't know about ASM and I would be grat= eful for help with a few things (for now):</div><div><ul><li>How can ASM be= used to "single step" through program execution? By "single= step" I mean similar to the Eclipse debug breakpoint facility where p= ressing F5 allows you to step into the next instruction.<br></li><li>How ca= n I "hook" INVOKEVIRTUAL calls? I would like to know when a metho= d calls another method.<br></li><li>What are "labels" and how are= they used?<br></li></ul></div><div>Thanks very much.</div><div><br></div><= div>-Paul</div><div><br></div></div> --000000000000191b3505773e3ab4-- ------------=_1538484035-8900-7 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit -- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws ------------=_1538484035-8900-7--