Re: gdb reports Single stepping until exit from function _start, which has no line number information.
Guinevere Larsen via Gdb <[email protected]> Wed, 14 Aug 2024 08:46:25 -0300
| Newsgroups | gmane.comp.gdb.devel,gmane.comp.gdb.bugs.general |
|---|---|
| Message-ID | <[email protected]> |
On 8/13/24 7:07 PM, Patrick Clot via Gdb wrote: > Attached is a debug file that has the version numbers > of the software I am using and the gdb session. _start is not a function defined by your program, but one from your system's libc. If you want to step through that function, you'llĀ need libc debug information. You seem to be using Ubuntu 22.04, I'm not sure if it has debuginfod servers, but if it does, you could enable debuginfod to download relevant debug information to step through _start, otherwise you'll want to download the ubuntu package for your libc's debuginfo. The reason this is expected behavior is that "next" and "step" need debug information to work. They want to move the inferior to the next source code line, which may mean any number of actual assembly instructions. GDB needs line table information to cross reference the current instruction with the current line, and then find all the instructions related to the current line, so we are able to move through all of them and stop when we reach the next line. If you have no way of getting debug information for your libc, you may want to use "stepi" (meaning step instruction) to move one assembly instruction at a time. -- Cheers, Guinevere Larsen She/Her/Hers > > Thanks in advance, > Patrick Clot