RFR: 8292699: Improve printing of classes in native debugger [v11]

Ioi Lam iklam at openjdk.org
Sun Oct 23 06:10:00 UTC 2022


On Fri, 21 Oct 2022 18:36:05 GMT, Matias Saavedra Silva <duke at openjdk.org> wrote:

> Overall, this looks good to me! I just have two comments:
> 
> 1. findmethod2() could use a better name, maybe something along the lines of find_method_and_signature()? Not sure if these method calls need to be in camel case or snake case as well.
> 2. I noticed the use of continue statements in classFilePrinter: that code could probably be refactored into something that avoids the use of continue

I merged findmethod() and findmethod2() into a single function, so you can optionally specify the signature (which is not very common)


//   call findmethod("*ang/Object*", "wait", 0xff)       -> detailed disasm of all "wait" methods in j.l.Object
//   call findmethod("*ang/Object*", "wait:(*J*)V", 0x1) -> list all "wait" methods in j.l.Object that have a long parameter


The functions in debug.cpp are supposed to have short names so they can be easily typed in the debugger. E.g., we have `pp`, `pns` and `pns2`.

I refactored the code to avoid using the "continue" keyword. I think it's easier to read now. Thanks for the suggestion!

-------------

PR: https://git.openjdk.org/jdk/pull/9957


More information about the hotspot-dev mailing list