From: Philippe Waroquiers Date: Mon, 9 Jun 2014 15:47:46 +0000 (+0000) Subject: When enabling hostvisibility in gdbsrv, give a more user friendly X-Git-Tag: svn/VALGRIND_3_10_0~420 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a20d06587e00f028754cb74dfef7bb67bf3aa9b7;p=thirdparty%2Fvalgrind.git When enabling hostvisibility in gdbsrv, give a more user friendly message for the required GDB add-symbol-file command git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14017 --- diff --git a/coregrind/m_gdbserver/server.c b/coregrind/m_gdbserver/server.c index 35094bdb3c..2674379800 100644 --- a/coregrind/m_gdbserver/server.c +++ b/coregrind/m_gdbserver/server.c @@ -326,12 +326,18 @@ int handle_gdb_valgrind_command (char *mon, OutputSink *sink_wanted_at_return) } 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 \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;