This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Also recognize __sighndlr on Solaris/x86
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: gdb-patches at sourceware dot org
- Date: Wed, 19 Sep 2018 14:56:20 +0200
- Subject: [PATCH] Also recognize __sighndlr on Solaris/x86
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 <signal handler called>
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
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
__sighndlr.
* i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
# 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