This is the mail archive of the
mailing list for the GDB project.
Re: RFA: attach to a PID using a different exec
- From: Daniel Jacobowitz <drow at false dot org>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 13 Nov 2008 14:26:52 -0500
- Subject: Re: RFA: attach to a PID using a different exec
- References: <email@example.com>
On Thu, Nov 13, 2008 at 12:18:20PM -0700, Tom Tromey wrote:
> Sometimes I will start gdb like "gdb /some/path/to/gdb" and then
> "attach PID" -- where PID is actually running "/some/other/gdb".
> That is, the current exec file and the attached process disagree.
> Right now this usually yields an error along the lines of:
> "Cannot access memory at address 0x2e".
> This patch changes gdb to look at the target's notion of the exec
> file, and then switch to it if it differs from the current exec.
This seems like a bad idea to me. The canonical example is:
gdb /home/drow/prog.debug $(pidof prog.stripped)
I don't want GDB to prompt my to switch to the stripped program...