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 02:27:56 +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 #3 from phantall at gmail dot com ---
I was able to fix this with a hack. I imagine someone who knows the gdb src
tree would be able to get this fixed in a more generic manner.
I added a new function in sparc-sol2-nat.c that's identical to
Linux_proc_pid_to_exec_file in gdb/nat/Linux-procfs.c, with the following
changes:
> static char* solaris_proc_pid_to_exec_file( struct target_ops *self, int pid ) {
> /*...*/
> xsnprintf( name, PATH_MAX, "/proc/%d/path/a.out", pid );
Then in _initialize_sparc_sol2_nat I added the new function:
> t = procfs_target ();
> t->to_pid_to_exec_file = solaris_proc_pid_to_exec_file;
This resolves the problem.
--
You are receiving this mail because:
You are on the CC list for the bug.