]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2005-12-01 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Fri, 2 Dec 2005 03:19:17 +0000 (03:19 +0000)
committerMichael Snyder <msnyder@vmware.com>
Fri, 2 Dec 2005 03:19:17 +0000 (03:19 +0000)
* 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.

gdb/ChangeLog
gdb/linux-fork.c
gdb/linux-nat.c

index b60a5df3b55f015cd3b77dcd57ec0b922df275c5..a498e501511ef47e65e7077c7905656f606a0fd2 100644 (file)
@@ -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
index a922b562397d4f2e3face8bd404222879f5bd950..ba839238462ff3dfe4122713b882aaeb4342b57c 100644 (file)
@@ -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)
index 74a48f1bcc1e9fbd4c6697a0e388a5c19541f183..9b010215a009c7f9f749918a36e5199dec0f6e77 100644 (file)
@@ -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