public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Shahab Vahedi <shahab.vahedi@gmail.com>
To: Wolfgang Wallner <wolfgang-wallner@gmx.at>
Cc: gdb@sourceware.org
Subject: Re: Removing old symbols when debugging code that relocates itself
Date: Thu, 26 May 2022 00:13:06 +0200	[thread overview]
Message-ID: <Yo6p8oBdsUTmXanm@gmail.com> (raw)
In-Reply-To: <d62143d5-9fba-2a17-8713-6c9fd0bcda94@gmx.at>

Hi Wolfgang,

On Wed, May 25, 2022 at 11:14:28PM +0200, Wolfgang Wallner via Gdb wrote:
> It seems I can only remove the symbols that I have added with
> add-symbol-file, but not the initial ones ...

Maybe you could extract the symbol file [1] and then strip it away from
the binary [2]. This way, you have to use "add-symbol-file" to add it
in different stages and according to what you say you should be able
to remove it after each adding.

Cheers,
Shahab


[1]
$ objcopy --only-keep-debug uboot.bin uboot.sym

[2]
$ objcopy --strip-all uboot.bin uboot.strp

  reply	other threads:[~2022-05-25 22:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-25 21:14 Wolfgang Wallner
2022-05-25 22:13 ` Shahab Vahedi [this message]
2022-05-26 19:28   ` Wolfgang Wallner

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=Yo6p8oBdsUTmXanm@gmail.com \
    --to=shahab.vahedi@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=wolfgang-wallner@gmx.at \
    /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).