On Fri, 21 Aug 2026 22:25:45 GMT, Chris Plummer <[email protected]> wrote:

>> This is a part of [JDK-8382392](https://bugs.openjdk.org/browse/JDK-8382392).
>> 
>> Debuginfo related code such as `open_debug_file()` have been implemented in 
>> symtab.c. Maybe it would be used for symbol resolution so far. However it is 
>> needed for reading `.debug_frame` section from ELF file.
>> 
>> So this sub task moves debuginfo related code to salibelf.c because it 
>> provides features for ELF.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> In additional to moving the code, it looks like there was some restructuring 
> and renaming of the moved APIs. Can you give a summary of what you changed 
> and why?

Thanks @plummercj for your comment!
Most of comments have been fixed in new commit.

> The order changed here. Can you explain why? I don't understand the 
> significance of "build id" vs .gnu_debuglink.

`.gnu_debuglink` contains debuginfo filename. Actually GDB seems to prior to 
use it.

https://sourceware.org/gdb/current/onlinedocs/gdb.html/Separate-Debug-Files.html

> So, for example, suppose you ask GDB to debug /usr/bin/ls, which has a debug 
> link that specifies the file ls.debug, and a build ID whose value in hex is 
> abcdef1234. If the list of the global debug directories includes 
> /usr/lib/debug, then GDB will look for the following debug information files, 
> in the indicated order:
> 
> - /usr/lib/debug/.build-id/ab/cdef1234.debug
> - /usr/bin/ls.debug
> - /usr/bin/.debug/ls.debug
> - /usr/lib/debug/usr/bin/ls.debug.

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

PR Comment: https://git.openjdk.org/jdk/pull/32434#issuecomment-5771062810

Reply via email to