]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2011-05-24 Pedro Alves <pedro@codesourcery.com>
authorPedro Alves <palves@redhat.com>
Tue, 24 May 2011 10:58:09 +0000 (10:58 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 24 May 2011 10:58:09 +0000 (10:58 +0000)
gdb/
* solib-svr4.c (svr4_solib_create_inferior_hook): Skip setting
shared library event breakpoint if there's no execution.

gdb/testsuite/
* gdb.trace/tfile.exp: Add test that opening the basic.tf trace
file doesn't error, using MI.

gdb/ChangeLog
gdb/solib-svr4.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/tfile.exp

index 32b4559b76022e255cdffee81303eb0119bde664..9ffd36603054be188f2ab0866bec2dff121b0d23 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-24  Pedro Alves  <pedro@codesourcery.com>
+
+       * solib-svr4.c (svr4_solib_create_inferior_hook): Skip setting
+       shared library event breakpoint if there's no execution.
+
 2011-05-23  Tom Tromey  <tromey@redhat.com>
 
        * c-lang.c (evaluate_subexp_c): Use expect_type if it is not
index 78c6b1c3ee1493049c7806dbca873e3cc9c12d79..30abaa7c81e4a042990b5db01ecfce21145c3695 100644 (file)
@@ -2177,6 +2177,11 @@ svr4_solib_create_inferior_hook (int from_tty)
   /* Relocate the main executable if necessary.  */
   svr4_relocate_main_executable ();
 
+  /* No point setting a breakpoint in the dynamic linker if we can't
+     hit it (e.g., a core file, or a trace file).  */
+  if (!target_has_execution)
+    return;
+
   if (!svr4_have_link_map_offsets ())
     return;
 
index f90fd156b12b52df3c80b4c7b14e1f9eb2a1f935..89a2de6815c8c9348c6f68b7f95b38aeaed841db 100644 (file)
@@ -1,3 +1,8 @@
+2011-05-24  Pedro Alves  <pedro@codesourcery.com>
+
+       * gdb.trace/tfile.exp: Add test that opening the basic.tf trace
+       file doesn't error, using MI.
+
 2011-05-23  Tom Tromey  <tromey@redhat.com>
 
        * gdb.base/charset.exp (string_display): Add tests to assign to
index 0614423d6bc292bc04bd173a8beb2774aeca457c..0a89873e3ffd6ac6ada6752ffa48d1b4b8d35052 100644 (file)
@@ -116,3 +116,8 @@ Collected 0 trace frame.*
 Trace buffer has 256 bytes of 4096 bytes free \\(93% full\\).*
 Not looking at any trace frame.*" \
     "tstatus on error trace file"
+
+# Make sure we can reopen without error.
+gdb_test \
+    "interpreter-exec mi \"-target-select tfile basic.tf\"" \
+    "\\^connected.*"