Warning when using separate debug info file

Tom Tromey tom@tromey.com
Thu Apr 25 15:49:00 GMT 2019


>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

>> I don't recall which but probably the section is either loadable or
>> allocatable in your situation.

Eli> Both, it looks:
[...]

Eli> But the question is why GDB looks for this section in the hello.debug
Eli> file, not in hello.exe.  That's what the warning emitted by GDB is
Eli> about:

When reading a separate debug file, gdb tries to ensure the section
offsets for the separate debug file are the same as the section offsets
in the main file.  To do this, it matches sections -- but only sections
that are loadable (or allocatable, like I said, I forget).

Eli> What do you get with the above objdump command on the separate debug
Eli> file?  I get an error message:

I get the same error, because my separate debug file does not include
this section.

The section isn't needed in the separate debug file -- only in the
stripped file.  What is wrong here is the section flags.

Tom



More information about the Gdb-patches mailing list