Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFA: attach to a PID using a different exec
Date: Thu, 13 Nov 2008 23:17:00 -0000	[thread overview]
Message-ID: <jevdurfl2v.fsf@sykes.suse.de> (raw)
In-Reply-To: <20081113192652.GA26537@caradoc.them.org> (Daniel Jacobowitz's 	message of "Thu, 13 Nov 2008 14:26:52 -0500")

Daniel Jacobowitz <drow@false.org> writes:

> 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...

I think a warning would still be helpful, similar to what you get when
you load a core that does not match.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


  parent reply	other threads:[~2008-11-13 20:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13 22:32 Tom Tromey
2008-11-13 22:49 ` Daniel Jacobowitz
2008-11-13 22:54   ` Tom Tromey
2008-11-13 23:24     ` Stan Shebs
2008-11-13 23:51       ` Daniel Jacobowitz
2008-11-13 22:59   ` Joel Brobecker
2008-11-13 23:17   ` Andreas Schwab [this message]
2008-11-13 23:55     ` Tom Tromey
2008-11-14  0:54 ` Michael Snyder
2008-11-14  1:53   ` Tom Tromey

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=jevdurfl2v.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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