* gdb reports Single stepping until exit from function _start, which has no line number information.
@ 2024-08-13 22:07 Patrick Clot via Gdb
2024-08-14 11:46 ` Guinevere Larsen via Gdb
0 siblings, 1 reply; 2+ messages in thread
From: Patrick Clot via Gdb @ 2024-08-13 22:07 UTC (permalink / raw)
To: bug-gdb
[-- Attachment #1: Type: text/plain, Size: 135 bytes --]
Attached is a debug file that has the version numbers
of the software I am using and the gdb session.
Thanks in advance,
Patrick Clot
[-- Attachment #2: bug --]
[-- Type: application/octet-stream, Size: 1506 bytes --]
---------------------------------------------
Version of NASM: NASM version 2.15.05
---------------------------------------------
---------------------------------------------
Version of ld:
GNU ld (GNU Binutils for Ubuntu) 2.38
Copyright (C) 2022 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
---------------------------------------------
---------------------------------------------
Version of gdb:
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
---------------------------------------------
-------------- how to build -----------------
$ nasm -f elf64 -g -F dwarf -l forth.lst -o forth.o forth.asm
$ ld -o forth forth.o
---------------------------------------------
----------- gdb forth session ---------------
Reading symbols from forth...
(gdb) b _start
Breakpoint 1 at 0x401004
(gdb) run
Starting program: /home/pmc/tmp/forth
Breakpoint 1, 0x0000000000401004 in _start ()
(gdb) n
Single stepping until exit from function _start,
which has no line number information.
0x0000000000401020 in _start.outer_loop ()
(gdb)
----------- end gdb forth session ---------------
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: gdb reports Single stepping until exit from function _start, which has no line number information.
2024-08-13 22:07 gdb reports Single stepping until exit from function _start, which has no line number information Patrick Clot via Gdb
@ 2024-08-14 11:46 ` Guinevere Larsen via Gdb
0 siblings, 0 replies; 2+ messages in thread
From: Guinevere Larsen via Gdb @ 2024-08-14 11:46 UTC (permalink / raw)
To: Patrick Clot, bug-gdb
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-14 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-13 22:07 gdb reports Single stepping until exit from function _start, which has no line number information Patrick Clot via Gdb
2024-08-14 11:46 ` Guinevere Larsen via Gdb
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox