aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2005-12-02 03:19:17 +0000
committerMichael Snyder <msnyder@vmware.com>2005-12-02 03:19:17 +0000
commitdd21d8b5880693d9b85b1254773dc71c2c06a002 (patch)
tree51766a2c7d845a1395cbc8c8899c4ab1bd7f9713
parent55523d0878e9df75de2af22973574f1a201fba19 (diff)
downloadgdb-dd21d8b5880693d9b85b1254773dc71c2c06a002.zip
gdb-dd21d8b5880693d9b85b1254773dc71c2c06a002.tar.gz
gdb-dd21d8b5880693d9b85b1254773dc71c2c06a002.tar.bz2
2005-12-01 Michael Snyder <msnyder@redhat.com>
* linux-fork.c (fork_save_infrun_state): Close the DIR. (info_forks_command): Print bare filename, not full path. * linux-nat.c (kill_inferior): For multi-fork, pop target and call generic_mourn_inferior, not target_mourn_inferior.
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/linux-fork.c11
-rw-r--r--gdb/linux-nat.c5
3 files changed, 20 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b60a5df..a498e50 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2005-12-01 Michael Snyder <msnyder@redhat.com>
+
+ * linux-fork.c (fork_save_infrun_state): Close the DIR.
+ (info_forks_command): Print bare filename, not full path.
+ * linux-nat.c (kill_inferior): For multi-fork, pop target
+ and call generic_mourn_inferior, not target_mourn_inferior.
+
2005-11-30 Michael Snyder <msnyder@redhat.com>
* linux-fork.c (struct fork_info): Add fields for saving
diff --git a/gdb/linux-fork.c b/gdb/linux-fork.c
index a922b56..ba83923 100644
--- a/gdb/linux-fork.c
+++ b/gdb/linux-fork.c
@@ -24,6 +24,7 @@
#include "regcache.h" /* For regcache copy/restore */
#include "gdbcmd.h"
#include "infcall.h" /* For call_function_by_hand */
+#include "gdb_string.h"
#include "linux-fork.h" /* External interface */
@@ -294,6 +295,7 @@ fork_save_infrun_state (struct fork_info *fp, int clobber_regs)
tmp = strtol (&de->d_name[0], NULL, 10);
fp->filepos[tmp] = call_lseek (tmp, 0, SEEK_CUR);
}
+ closedir (d);
}
}
}
@@ -422,7 +424,14 @@ info_forks_command (char *arg, int from_tty)
sal = find_pc_line (pc, 0);
if (sal.symtab)
- printf_filtered (", file %s", sal.symtab->filename);
+ {
+ char *tmp = strrchr (sal.symtab->filename, '/');
+
+ if (tmp)
+ printf_filtered (", file %s", tmp + 1);
+ else
+ printf_filtered (", file %s", sal.symtab->filename);
+ }
if (sal.line)
printf_filtered (", line %d", sal.line);
if (!sal.symtab && !sal.line)
diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c
index 74a48f1..9b01021 100644
--- a/gdb/linux-nat.c
+++ b/gdb/linux-nat.c
@@ -620,6 +620,8 @@ kill_inferior (void)
if (FORKS_EXIST ())
{
linux_fork_killall ();
+ pop_target ();
+ generic_mourn_inferior ();
}
else
{
@@ -648,9 +650,8 @@ kill_inferior (void)
ptrace (PT_KILL, pid, 0, 0);
ret = wait (&status);
}
+ target_mourn_inferior ();
}
-
- target_mourn_inferior ();
}
/* On GNU/Linux there are no real LWP's. The closest thing to LWP's