From: Doug Evans <dje@google.com>
To: gdb@sourceware.org
Subject: attach u/i oddity
Date: Sun, 09 Oct 2011 21:36:00 -0000 [thread overview]
Message-ID: <CADPb22QEk4VA45fi338xPVevDnp8fKbsPWKGH4E9iZLwYrBSyw@mail.gmail.com> (raw)
I know why this happens, but as a user it's not intuitive: if gdb
could figure out the program (and arch) the first time, why can't it
the second time?
bash$ gdb
(gdb) attach 1234 # a 32 bit program: forever.x32
(gdb) detach
(gdb) attach 1235 # a 64 bit program: forever.x64
-->
Attaching to program: /home/dje/src/play/forever.x32, process 31621
warning: Selected architecture i386 is not compatible with reported
target architecture i386:x86-64
warning: Architecture rejected target-supplied description
Reading symbols from /usr/grte/v2/lib/ld-linux.so.2...(no debugging
symbols found)...done.
Loaded symbols for /usr/grte/v2/lib/ld-linux.so.2
0x46403fe0 in ?? ()
(gdb)
The user never specified forever.x32 as the program to debug, gdb was
being clever.
However, if it's going to be clever the first time, it's a bug (from
the user's perspective) to not be clever the second time too (IMO).
Comments?
next reply other threads:[~2011-10-09 21:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-09 21:36 Doug Evans [this message]
2011-10-11 6:17 ` Joel Brobecker
2011-10-11 11:17 ` Pedro Alves
2011-10-11 16:46 ` Doug Evans
2011-10-11 17:20 ` Pedro Alves
2011-10-11 18:11 ` Doug Evans
2011-10-11 18:22 ` Pedro Alves
2011-10-11 18:56 ` Pedro Alves
2011-10-11 22:38 ` Doug Evans
2011-10-19 20:03 ` 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=CADPb22QEk4VA45fi338xPVevDnp8fKbsPWKGH4E9iZLwYrBSyw@mail.gmail.com \
--to=dje@google.com \
--cc=gdb@sourceware.org \
/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