This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/17418] New: gdb should be smarter about exec-file mismatch when attaching
- From: "dje at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sat, 20 Sep 2014 04:22:14 +0000
- Subject: [Bug gdb/17418] New: gdb should be smarter about exec-file mismatch when attaching
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=17418
Bug ID: 17418
Summary: gdb should be smarter about exec-file mismatch when
attaching
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: dje at google dot com
gdb will figure out the file if one doesn't specify one when attaching.
[e.g., gdb will find it in /proc/$pid/exe]
But if one specifies the exec-file first, what should happen?
The current behaviour is confusing:
(gdb) exec-file ~/src/play/forever.x64
(gdb) attach 51016
Attaching to program: /home/dje/src/play/forever.x64, process 51016
Error reading attached process's symbol file.
: No such file or directory.
Process 51016 is actually a different program, not forever.x64.
Restarting gdb and trying again:
(gdb) attach 51016
Attaching to process 51016
Reading symbols from /home/dje/src/play/forever-threads.x64...done.
gdb should either flag an error or replace exec-file with the one from
/proc/$pid/exe.
Also, there's no reason why gdb couldn't print the name of the file in the
"Attaching to process ..." message (at least on systems with /proc/$pid/exe).
--
You are receiving this mail because:
You are on the CC list for the bug.