diff options
Diffstat (limited to 'overlay/mgdb/gdb')
-rw-r--r-- | overlay/mgdb/gdb/winnt-nat.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/overlay/mgdb/gdb/winnt-nat.c b/overlay/mgdb/gdb/winnt-nat.c index 4686acc..564c7f2 100644 --- a/overlay/mgdb/gdb/winnt-nat.c +++ b/overlay/mgdb/gdb/winnt-nat.c @@ -133,10 +133,25 @@ static ptid_t winnt_get_ada_task_ptid (struct target_ops * t, long lwp, long tid static char * winnt_pid_to_exec_file (struct target_ops * t, int pid) { - (void)t; - (void)pid; + ssize_t ret; + struct winnt_process * pidinfo; + + if (!(pidinfo = winnt_process_record(pid))) + winnt_perror("internal error: record not found",pid); + + ret = __dbg_info_get( + pidinfo->pfd,0, + __DBG_INFO_IMAGE_RPATH, + outbuf,WINNT_OUTBUF_SIZE); - outbuf[0] = 0; + if (ret < 0) + ret = __dbg_info_get( + pidinfo->pfd,0, + __DBG_INFO_REPORTED_IMAGE_RPATH, + outbuf,WINNT_OUTBUF_SIZE); + + if (ret < 0) + outbuf[0] = 0; return outbuf; } |