Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Guinevere Larsen via Gdb <gdb@sourceware.org>
To: Patrick Clot <patrickmclot@gmail.com>, bug-gdb@gnu.org
Subject: Re: gdb reports Single stepping until exit from function _start, which has no line number information.
Date: Wed, 14 Aug 2024 08:46:25 -0300	[thread overview]
Message-ID: <c8b61deb-7412-4f7a-b1bb-5ef9f9e38f2a@redhat.com> (raw)
In-Reply-To: <CAGqx8boDCTh4X_johnXE8ARu=CFoeHaKDOkXrQfSdLnR9kHCwA@mail.gmail.com>

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


      reply	other threads:[~2024-08-14 11:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-13 22:07 Patrick Clot via Gdb
2024-08-14 11:46 ` Guinevere Larsen via Gdb [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c8b61deb-7412-4f7a-b1bb-5ef9f9e38f2a@redhat.com \
    --to=gdb@sourceware.org \
    --cc=blarsen@redhat.com \
    --cc=bug-gdb@gnu.org \
    --cc=patrickmclot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox