public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: hilbert <swdtian@163.com>
To: gdb@sourceware.org
Subject: After elf is loaded into memory, how is the symbol table updated?
Date: Wed, 12 Jul 2023 19:46:43 +0800 (CST)	[thread overview]
Message-ID: <2f73410e.a18d.18949eccfed.Coremail.swdtian@163.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 449 bytes --]

Hi, 


If I want to set a breakpoint on a function, I can read the elf file/dwarf to get the relative position of the function.


After entering the `run` command, how does gdb know the virtual address of the function, and when to update the symbol table, I did not find the relevant function;


For example, function 1: address 0x6aaf in the elf file
After run address function 1: address 0x55555556aaf


Who can give me a hint? 
Thank you so much;

                 reply	other threads:[~2023-07-12 11:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=2f73410e.a18d.18949eccfed.Coremail.swdtian@163.com \
    --to=swdtian@163.com \
    --cc=gdb@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).