This is the mail archive of the gdb@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]

attach u/i oddity


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?


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