This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug tdep/17903] gdb cannot determine executable when attaching to processes on Solaris
- From: "phantall at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Wed, 16 Dec 2015 20:11:04 +0000
- Subject: [Bug tdep/17903] gdb cannot determine executable when attaching to processes on Solaris
- Auto-submitted: auto-generated
- References: <bug-17903-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=17903
--- Comment #5 from phantall at gmail dot com ---
Created attachment 8851
--> https://sourceware.org/bugzilla/attachment.cgi?id=8851&action=edit
unix procfs to_pid_to_exec_file implementation
This implementation is generic enough that it could be used for all procfs
platforms that adhere to the possible paths I used.
Some notes on this:
* I'm not terribly fond of the idea of returning a static like this, but the
code using it (exec_file_locate_attach) is written under the assumption it does
not take ownership of that memory.
* This could be done with no loop:
** ... using #if, but that makes the code uglier/less readable, and I see no
terribly compelling argument against the loop
** On each platform add a format string to the target_ops struct (would require
adding a new member to target_ops).
** Only use the string that works on Solaris and forget about making it more
general purpose
--
You are receiving this mail because:
You are on the CC list for the bug.