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

Ioi Lam iklam at openjdk.org
Mon Aug 22 18:59:30 UTC 2022


On Mon, 22 Aug 2022 05:01:22 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   also print Method pointer
>
> src/hotspot/share/classfile/classPrinter.hpp line 59:
> 
>> 57:   };
>> 58: 
>> 59:   // flags must be OR'ed from ClassPrinter::Mode for the next 3 functions
> 
> Can you give us a mode PRINT_ALL that or'es all of them modes together, and make that maybe the default for flags?

gdb doesn't support default parameters (I think the info for default params is not available in the debug info), so you need to pass in `flags` explicitly. If you pass 0 for `findclass`, it prints only the class names. If you pass 0 for `findmethod` and `findmethods`, they print only the class names and method names.

Printing everything by default may be too overwhelming.

BTW, I think  `findmethod` vs `findmethods` may not be the right names. The former takes only method name, while the latter also takes a signature. Maybe I should rename the latter to `findmethodex`?

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

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


More information about the hotspot-dev mailing list