From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by sourceware.org (Postfix) with ESMTP id 3A654398D04F for ; Fri, 17 Jul 2020 22:12:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3A654398D04F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=FreeBSD.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=jhb@FreeBSD.org Received: from ralph.com (unknown [71.198.231.75]) by mail.baldwin.cx (Postfix) with ESMTPSA id 0BF7310A765 for ; Fri, 17 Jul 2020 18:04:55 -0400 (EDT) From: John Baldwin To: gdb-patches@sourceware.org Subject: [PATCH 2/5] Report architecture-specific signal information for core files. Date: Fri, 17 Jul 2020 15:03:07 -0700 Message-Id: <20200717220310.82230-3-jhb@FreeBSD.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200717220310.82230-1-jhb@FreeBSD.org> References: <20200717220310.82230-1-jhb@FreeBSD.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Fri, 17 Jul 2020 18:04:56 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_STATUS, KHOP_HELO_FCRDNS, SPF_HELO_PASS, SPF_SOFTFAIL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2020 22:12:41 -0000 When opening a core file, if the process terminated due to a signal, invoke the gdbarch report_signal_info hook to report architecture-specific information about the signal. gdb/ChangeLog: * corelow.c (core_target_open): Invoke gdbarch report_signal_info hook if present. --- gdb/ChangeLog | 5 +++++ gdb/corelow.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 145a5dd2c2..a18e8d8993 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-07-17 John Baldwin + + * corelow.c (core_target_open): Invoke gdbarch report_signal_info + hook if present. + 2020-07-17 John Baldwin * gdbarch.c: Regenerate. diff --git a/gdb/corelow.c b/gdb/corelow.c index b6a12c0818..3958af1e67 100644 --- a/gdb/corelow.c +++ b/gdb/corelow.c @@ -416,8 +416,11 @@ core_target_open (const char *arg, int from_tty) siggy) : gdb_signal_from_host (siggy)); - printf_filtered (_("Program terminated with signal %s, %s.\n"), + printf_filtered (_("Program terminated with signal %s, %s"), gdb_signal_to_name (sig), gdb_signal_to_string (sig)); + if (gdbarch_report_signal_info_p (core_gdbarch)) + gdbarch_report_signal_info (core_gdbarch, current_uiout, sig); + printf_filtered (_(".\n")); /* Set the value of the internal variable $_exitsignal, which holds the signal uncaught by the inferior. */ -- 2.25.1