public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* attach u/i oddity
@ 2011-10-09 21:36 Doug Evans
  2011-10-11  6:17 ` Joel Brobecker
  0 siblings, 1 reply; 10+ messages in thread
From: Doug Evans @ 2011-10-09 21:36 UTC (permalink / raw)
  To: gdb

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?

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-10-19 19:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-09 21:36 attach u/i oddity Doug Evans
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).