aboutsummaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-05-24 10:48:19 +0000
committerPedro Alves <palves@redhat.com>2011-05-24 10:48:19 +0000
commitc91c8c16124ce11be0ee4490a5d1606236fca1bb (patch)
tree2491d792f5a33bea02219f17f2f40ed297995653 /gdb/solib-svr4.c
parent77bc418a4ba1ec495402841d1bb556f36b9979ab (diff)
downloadgdb-c91c8c16124ce11be0ee4490a5d1606236fca1bb.zip
gdb-c91c8c16124ce11be0ee4490a5d1606236fca1bb.tar.gz
gdb-c91c8c16124ce11be0ee4490a5d1606236fca1bb.tar.bz2
2011-05-24 Pedro Alves <pedro@codesourcery.com>
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.
Diffstat (limited to 'gdb/solib-svr4.c')
-rw-r--r--gdb/solib-svr4.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
index bcb94e7..f668f83 100644
--- a/gdb/solib-svr4.c
+++ b/gdb/solib-svr4.c
@@ -2188,6 +2188,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;