From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Paolo Pisati <p.pisati@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: Tracing code memcpy()-ied to a new location
Date: Wed, 04 May 2011 12:55:00 -0000 [thread overview]
Message-ID: <20110504125532.GA13331@host1.jankratochvil.net> (raw)
In-Reply-To: <4DC026CF.6020709@gmail.com>
On Tue, 03 May 2011 18:01:19 +0200, Paolo Pisati wrote:
> So here is the question: since i know there is relocate_new_kernel() in
> that location, is there a way to tell gdb to "remap" the
> symbols/environment/$whatever of that routine in that location so i can
> keep debugging it?
(gdb) help add-symbol-file
Load symbols from FILE, assuming FILE has been dynamically loaded.
Usage: add-symbol-file FILE ADDR [-s <SECT> <SECT_ADDR> -s <SECT> <SECT_ADDR> ...]
ADDR is the starting address of the file's text.
The optional arguments are section-name section-address pairs and
should be specified if the data and bss segments are not contiguous
with the text. SECT is a section name to be loaded at SECT_ADDR.
So ADDR is not the starting address (reboot_code_buffer) but you must also add
to it the VMA of the .text section of FILE (see `readelf -WS FILE').
Regards,
Jan
prev parent reply other threads:[~2011-05-04 12:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-03 15:47 Paolo Pisati
2011-05-03 16:01 ` Paolo Pisati
2011-05-04 12:55 ` Jan Kratochvil [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=20110504125532.GA13331@host1.jankratochvil.net \
--to=jan.kratochvil@redhat.com \
--cc=gdb@sourceware.org \
--cc=p.pisati@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