|
From: <sv...@va...> - 2014-06-09 15:47:55
|
Author: philippe
Date: Mon Jun 9 15:47:46 2014
New Revision: 14017
Log:
When enabling hostvisibility in gdbsrv, give a more user friendly
message for the required GDB add-symbol-file command
Modified:
trunk/coregrind/m_gdbserver/server.c
Modified: trunk/coregrind/m_gdbserver/server.c
==============================================================================
--- trunk/coregrind/m_gdbserver/server.c (original)
+++ trunk/coregrind/m_gdbserver/server.c Mon Jun 9 15:47:46 2014
@@ -326,12 +326,18 @@
} else {
hostvisibility = True;
}
- if (hostvisibility)
+ if (hostvisibility) {
+ const DebugInfo *tooldi = VG_(find_DebugInfo) (handle_gdb_valgrind_command);
+ vg_assert(tooldi);
+ const NSegment *toolseg = VG_(am_find_nsegment)
+ (VG_(DebugInfo_get_text_avma) (tooldi));
+ vg_assert(toolseg);
VG_(gdb_printf)
("Enabled access to Valgrind memory/status by GDB\n"
- "If not yet done, tell GDB which valgrind file(s) to use:\n"
- "add-symbol-file <tool or preloaded file> <loadaddr>\n");
- else
+ "If not yet done, tell GDB which valgrind file(s) to use, "
+ "typically:\n"
+ "add-symbol-file %s %p\n", VG_(am_get_filename)(toolseg), toolseg->start);
+ } else
VG_(gdb_printf)
("Disabled access to Valgrind memory/status by GDB\n");
break;
|