2007-08-10 Michael Snyder <msnyder@access-company.com>
authorMichael Snyder <msnyder@vmware.com>
Fri, 10 Aug 2007 20:42:45 +0000 (20:42 +0000)
committerMichael Snyder <msnyder@vmware.com>
Fri, 10 Aug 2007 20:42:45 +0000 (20:42 +0000)
* solib-svr4.c (enable_break): Don't free tmp_pathname until
after closing bfd.

gdb/ChangeLog
gdb/solib-svr4.c

index b3894a4c12cb3d3e643fb585fbcddc8e28f41848..2057dcc3ed2293cce037d6173cd7effb613e22db 100644 (file)
@@ -1,5 +1,8 @@
 2007-08-10  Michael Snyder  <msnyder@access-company.com>
 
+       * solib-svr4.c (enable_break): Don't free tmp_pathname until
+       after closing bfd.
+
        * completer.c: Comment/whitespace cleanup.
 
 2007-08-10  Joel Brobecker  <brobecker@adacore.com>
index 9b72a57bc0d027b6a180a870f6df87b5faa1e89f..63918277b90693bf18f79c3ecd33bf1e1e9466f1 100644 (file)
@@ -1008,7 +1008,6 @@ enable_break (void)
       tmp_fd = solib_open (buf, &tmp_pathname);
       if (tmp_fd >= 0)
        tmp_bfd = bfd_fopen (tmp_pathname, gnutarget, FOPEN_RB, tmp_fd);
-      xfree (tmp_pathname);
 
       if (tmp_bfd == NULL)
        goto bkpt_at_symbol;
@@ -1102,6 +1101,7 @@ enable_break (void)
       /* For whatever reason we couldn't set a breakpoint in the dynamic
          linker.  Warn and drop into the old code.  */
     bkpt_at_symbol:
+      xfree (tmp_pathname);
       warning (_("Unable to find dynamic linker breakpoint function.\n"
                "GDB will be unable to debug shared library initializers\n"
                "and track explicitly loaded dynamic code."));
This page took 0.028455 seconds and 4 git commands to generate.