From: Mark Wielaard Date: Fri, 9 Jun 2023 13:21:57 +0000 (+0200) Subject: Don't print action vgdb me ... and continuing ... in vgdb --multi mode X-Git-Tag: VALGRIND_3_22_0~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf0c73231b76e293a103ed8b2178975c7032f669;p=thirdparty%2Fvalgrind.git Don't print action vgdb me ... and continuing ... in vgdb --multi mode Guard each (action) vgdb me ... VG_(umsg) printing with !(VG_(clo_launched_with_multi)) https://bugs.kde.org/show_bug.cgi?id=470830 --- diff --git a/NEWS b/NEWS index 52ee38ab8b..c22c82131d 100644 --- a/NEWS +++ b/NEWS @@ -40,7 +40,9 @@ are not entered into bugzilla tend to get forgotten about or ignored. 470121 Can't run callgrind_control with valgrind 3.21.0 because of perl errors 470520 Multiple realloc zero errors crash in MC_(eq_Error) 470713 Failure on the Yosys project: valgrind: m_libcfile.c:1802 - (Bool vgPlain_realpath(const HChar *, HChar *)): Assertion 'resolved' failed + (Bool vgPlain_realpath(const HChar *, HChar *)): + Assertion 'resolved' failed +470830 Don't print actions vgdb me ... continue for vgdb --multi mode To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_errormgr.c b/coregrind/m_errormgr.c index 6be637190a..63c0e4eaa7 100644 --- a/coregrind/m_errormgr.c +++ b/coregrind/m_errormgr.c @@ -526,9 +526,11 @@ void do_actions_on_error(const Error* err, Bool allow_db_attach) if (VG_(clo_vgdb) != Vg_VgdbNo && allow_db_attach && VG_(clo_vgdb_error) <= n_errs_shown) { - VG_(umsg)("(action on error) vgdb me ... \n"); + if (!(VG_(clo_launched_with_multi))) + VG_(umsg)("(action on error) vgdb me ... \n"); VG_(gdbserver)( err->tid ); - VG_(umsg)("Continuing ...\n"); + if (!(VG_(clo_launched_with_multi))) + VG_(umsg)("Continuing ...\n"); } /* Or maybe we want to generate the error's suppression? */ diff --git a/coregrind/m_gdbserver/m_gdbserver.c b/coregrind/m_gdbserver/m_gdbserver.c index f8fbc5af23..5d0973e9ed 100644 --- a/coregrind/m_gdbserver/m_gdbserver.c +++ b/coregrind/m_gdbserver/m_gdbserver.c @@ -602,11 +602,11 @@ void VG_(gdbserver_prerun_action) (ThreadId tid) // Using VG_(clo_vgdb_error) allows the user to control if gdbserver // stops after a fork. if ((VG_(clo_vgdb_error) == 0 - || (VgdbStopAtiS(VgdbStopAt_Startup, VG_(clo_vgdb_stop_at)))) - && !(VG_(clo_launched_with_multi))) { + || (VgdbStopAtiS(VgdbStopAt_Startup, VG_(clo_vgdb_stop_at))))) { /* The below call allows gdb to attach at startup before the first guest instruction is executed. */ - VG_(umsg)("(action at startup) vgdb me ... \n"); + if (!(VG_(clo_launched_with_multi))) + VG_(umsg)("(action at startup) vgdb me ... \n"); VG_(gdbserver)(tid); } else { /* User has activated gdbserver => initialize now the FIFOs @@ -975,7 +975,8 @@ void VG_(gdbserver_report_fatal_signal) (const vki_siginfo_t *info, return; } - VG_(umsg)("(action on fatal signal) vgdb me ... \n"); + if (!(VG_(clo_launched_with_multi))) + VG_(umsg)("(action on fatal signal) vgdb me ... \n"); /* indicate to gdbserver that there is a signal */ gdbserver_signal_encountered (info); diff --git a/coregrind/m_libcassert.c b/coregrind/m_libcassert.c index 35f37f88df..0b04bfcc1d 100644 --- a/coregrind/m_libcassert.c +++ b/coregrind/m_libcassert.c @@ -282,7 +282,8 @@ static void exit_wrk( Int status, Bool gdbserver_call_allowed) if (status != 0 && VgdbStopAtiS(VgdbStopAt_ValgrindAbExit, VG_(clo_vgdb_stop_at))) { if (VG_(gdbserver_init_done)()) { - VG_(umsg)("(action at valgrind abnormal exit) vgdb me ... \n"); + if (!(VG_(clo_launched_with_multi))) + VG_(umsg)("(action at valgrind abnormal exit) vgdb me ... \n"); VG_(gdbserver) (atid); } else { VG_(umsg)("(action at valgrind abnormal exit)\n" diff --git a/coregrind/m_main.c b/coregrind/m_main.c index a857e5afeb..b8751341a0 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -2258,12 +2258,14 @@ void shutdown_actions_NORETURN( ThreadId tid, /* Final call to gdbserver, if requested. */ if (VG_(gdbserver_stop_at) (VgdbStopAt_Abexit) && tid_exit_code (tid) != 0) { - VG_(umsg)("(action at abexit, exit code %d) vgdb me ... \n", - tid_exit_code (tid)); + if (!(VG_(clo_launched_with_multi))) + VG_(umsg)("(action at abexit, exit code %d) vgdb me ... \n", + tid_exit_code (tid)); VG_(gdbserver) (tid); } else if (VG_(gdbserver_stop_at) (VgdbStopAt_Exit)) { - VG_(umsg)("(action at exit, exit code %d) vgdb me ... \n", - tid_exit_code (tid)); + if (!(VG_(clo_launched_with_multi))) + VG_(umsg)("(action at exit, exit code %d) vgdb me ... \n", + tid_exit_code (tid)); VG_(gdbserver) (tid); } VG_(threads)[tid].status = VgTs_Empty;