+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
#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 */
tmp = strtol (&de->d_name[0], NULL, 10);
fp->filepos[tmp] = call_lseek (tmp, 0, SEEK_CUR);
}
+ closedir (d);
}
}
}
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)
if (FORKS_EXIST ())
{
linux_fork_killall ();
+ pop_target ();
+ generic_mourn_inferior ();
}
else
{
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