Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Also recognize __sighndlr on Solaris/x86
@ 2018-09-19 12:56 Rainer Orth
  2018-09-23 16:03 ` Simon Marchi
  0 siblings, 1 reply; 3+ messages in thread
From: Rainer Orth @ 2018-09-19 12:56 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 988 bytes --]

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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: solx86-__sighndlr.patch --]
[-- Type: text/x-patch, Size: 1112 bytes --]

# 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Also recognize __sighndlr on Solaris/x86
  2018-09-19 12:56 [PATCH] Also recognize __sighndlr on Solaris/x86 Rainer Orth
@ 2018-09-23 16:03 ` Simon Marchi
  2018-09-23 18:12   ` Rainer Orth
  0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2018-09-23 16:03 UTC (permalink / raw)
  To: Rainer Orth, gdb-patches

On 2018-09-19 8:56 a.m., Rainer Orth wrote:
> 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
> 

I noticed this had not been replied to, this LGTM.  I don't know much about
Solaris, but I trust that you know what you are talking about :) and this
looks pretty straightforward.

Simon


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Also recognize __sighndlr on Solaris/x86
  2018-09-23 16:03 ` Simon Marchi
@ 2018-09-23 18:12   ` Rainer Orth
  0 siblings, 0 replies; 3+ messages in thread
From: Rainer Orth @ 2018-09-23 18:12 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

Hi Simon,

> I noticed this had not been replied to, this LGTM.  I don't know much about
> Solaris, but I trust that you know what you are talking about :) and this
> looks pretty straightforward.

just a bit ;-)  I recognized that __sighndlr stuff from my work on the
libgcc unwinder (libgcc/config/{i386,sparc}/sol2-unwind.h) some time ago.

Thanks.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-09-23 18:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-19 12:56 [PATCH] Also recognize __sighndlr on Solaris/x86 Rainer Orth
2018-09-23 16:03 ` Simon Marchi
2018-09-23 18:12   ` Rainer Orth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox