summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2005-12-02 03:19:17 +0000
committerMichael Snyder <msnyder@specifix.com>2005-12-02 03:19:17 +0000
commit1eeb315660f5e0f9a70fb1b695d4162e96a4b93d (patch)
tree4bfac73fb0bd611e6cf01ae686ed649ca23f1151
parent8830a2bc66b4563204a3fd7f6f1c7e6258babf3b (diff)
downloadgdb-1eeb315660f5e0f9a70fb1b695d4162e96a4b93d.tar.gz
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 b60a5df3b55..a498e501511 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 a922b562397..ba839238462 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 74a48f1bcc1..9b010215a00 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