From patchwork Wed Sep 19 12:56:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 29467 Received: (qmail 58222 invoked by alias); 19 Sep 2018 12:56:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 58032 invoked by uid 89); 19 Sep 2018 12:56:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT autolearn=ham version=3.3.2 spammy= X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Sep 2018 12:56:25 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 3345CA95 for ; Wed, 19 Sep 2018 14:56:23 +0200 (CEST) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nmQ13e3Wv8yv for ; Wed, 19 Sep 2018 14:56:21 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 320E0A94 for ; Wed, 19 Sep 2018 14:56:21 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id w8JCuKMt021007; Wed, 19 Sep 2018 14:56:20 +0200 (MEST) From: Rainer Orth To: gdb-patches@sourceware.org Subject: [PATCH] Also recognize __sighndlr on Solaris/x86 Date: Wed, 19 Sep 2018 14:56:20 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Unlike Solaris/SPARC, the __sighndlr function isn't recognized as part of a signal handler, causing a couple of testcases to fail. The following patch fixes that. A followup patch will move this to common code to avoid such unnecessary discrepancies between Solaris/SPARC and x86 in the future. While this fixes a couple of backtraces to now correctly print #1 they often fail later with #2 0x0ff3ffffff00857f in ?? () Backtrace stopped: Cannot access memory at address 0xff3000002e0886f which needs further investigation. Tested on amd64-pc-solaris2.11 (running the tests with both -m64 and -m32). Ok for master? Rainer # HG changeset patch # Parent 1ad27f17a78c023a92269db8c9fd70f6bc9ba6de Also recognize __sighndlr on Solaris/x86 diff --git a/gdb/amd64-sol2-tdep.c b/gdb/amd64-sol2-tdep.c --- a/gdb/amd64-sol2-tdep.c +++ b/gdb/amd64-sol2-tdep.c @@ -74,7 +74,8 @@ amd64_sol2_sigtramp_p (struct frame_info find_pc_partial_function (pc, &name, NULL, NULL); return (name && (strcmp ("sigacthandler", name) == 0 - || strcmp (name, "ucbsigvechandler") == 0)); + || strcmp (name, "ucbsigvechandler") == 0 + || strcmp (name, "__sighndlr") == 0)); } /* Solaris doesn't have a 'struct sigcontext', but it does have a diff --git a/gdb/i386-sol2-tdep.c b/gdb/i386-sol2-tdep.c --- a/gdb/i386-sol2-tdep.c +++ b/gdb/i386-sol2-tdep.c @@ -57,7 +57,8 @@ i386_sol2_sigtramp_p (struct frame_info find_pc_partial_function (pc, &name, NULL, NULL); return (name && (strcmp ("sigacthandler", name) == 0 - || strcmp (name, "ucbsigvechandler") == 0)); + || strcmp (name, "ucbsigvechandler") == 0 + || strcmp (name, "__sighndlr") == 0)); } /* Solaris doesn't have a `struct sigcontext', but it does have a