summaryrefslogtreecommitdiff
path: root/gdb/solib-svr4.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@codesourcery.com>2011-05-24 10:48:17 +0000
committerPedro Alves <pedro@codesourcery.com>2011-05-24 10:48:17 +0000
commit5a265baae2cca80d6234c3c8166e7fa48eddc1d6 (patch)
tree0a808275b38dca9c5d16fec9f044570fa294f542 /gdb/solib-svr4.c
parentd55b1ed48098d6e48b569b5e123f2c7a8e2ea3f8 (diff)
downloadgdb-5a265baae2cca80d6234c3c8166e7fa48eddc1d6.tar.gz
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 bcb94e77ecf..f668f83b9df 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;