This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Ensure correct symbol-file when attaching to a (remote) process
- From: Pedro Alves <palves at redhat dot com>
- To: John Gilmore <gnu at toad dot com>
- Cc: Jan Kratochvil <jan dot kratochvil at redhat dot com>, Raphael Zulliger <zulliger at indel dot ch>, gdb at sourceware dot org
- Date: Wed, 02 Jan 2013 17:56:51 +0000
- Subject: Re: Ensure correct symbol-file when attaching to a (remote) process
- References: <50D3FC31.1020103@indel.ch> <20121221161114.GA32638@host2.jankratochvil.net> <201212211917.qBLJH6Il028006@new.toad.com>
On 12/21/2012 07:17 PM, John Gilmore wrote:
> The best you can do in an automated way is to check the areas
> of memory that are intended to contain instructions and read-only
> data.
For bare metal targets, that's often good enough, and GDB does have
support that built in:
(gdb) help compare-sections
Compare section data on target to the exec file.
Argument is a single section name (default: all loaded sections).
A build id check would really be ideal.
--
Pedro Alves