This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: attach to a PID using a different exec


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:

/usr/bin/prog.stripped &
gdb /home/drow/prog.debug $(pidof prog.stripped)

I don't want GDB to prompt my to switch to the stripped program...

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]