From 5a265baae2cca80d6234c3c8166e7fa48eddc1d6 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 24 May 2011 10:48:17 +0000 Subject: 2011-05-24 Pedro Alves 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/solib-svr4.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/solib-svr4.c') 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; -- cgit v1.2.1