This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix Solaris x86 signal trampoline recognition


On Solaris x86, we have a sort of artificial extra signal trampoline,
which makes several tests fail.  This patch makes us recognize the
real signal trampoline, similar to what we do for Solaris SPARC.

Committed,

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>
 
	* i386-sol2-tdep.c: Include "gdb_string.h".
	(i386_sol2_sigtramp_p): Recognize signal trampoline based on its
	name.
	* Makefile.in (i386-sol2-tdep.o): Update dependencies.

Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.536
diff -u -p -r1.536 Makefile.in
--- Makefile.in 9 Apr 2004 23:09:03 -0000 1.536
+++ Makefile.in 9 Apr 2004 23:12:28 -0000
@@ -1877,7 +1877,7 @@ i386obsd-tdep.o: i386obsd-tdep.c $(defs_
 	$(osabi_h) $(target_h) $(gdb_assert_h) $(gdb_string_h) \
 	$(i386_tdep_h) $(i387_tdep_h) $(solib_svr4_h)
 i386-sol2-tdep.o: i386-sol2-tdep.c $(defs_h) $(value_h) $(osabi_h) \
-	$(i386_tdep_h) $(solib_svr4_h)
+	$(gdb_string_h) $(i386_tdep_h) $(solib_svr4_h)
 i386-stub.o: i386-stub.c
 i386-tdep.o: i386-tdep.c $(defs_h) $(arch_utils_h) $(command_h) \
 	$(dummy_frame_h) $(dwarf2_frame_h) $(doublest_h) $(floatformat_h) \
Index: i386-sol2-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-sol2-tdep.c,v
retrieving revision 1.16
diff -u -p -r1.16 i386-sol2-tdep.c
--- i386-sol2-tdep.c 9 Apr 2004 23:09:03 -0000 1.16
+++ i386-sol2-tdep.c 9 Apr 2004 23:12:28 -0000
@@ -23,6 +23,8 @@
 #include "value.h"
 #include "osabi.h"
 
+#include "gdb_string.h"
+
 #include "i386-tdep.h"
 #include "solib-svr4.h"
 
@@ -47,14 +49,18 @@ static int i386_sol2_gregset_reg_offset[
   0 * 4				/* %gs */
 };
 
+/* Return whether the frame preceding NEXT_FRAME corresponds to a
+   Solaris sigtramp routine.  */
+
 static int
 i386_sol2_sigtramp_p (struct frame_info *next_frame)
 {
   CORE_ADDR pc = frame_pc_unwind (next_frame);
+  char *name;
 
-  /* Signal handler frames under Solaris 2 are recognized by a return
-     address of 0xffffffff.  */
-  return (pc == 0xffffffff);
+  find_pc_partial_function (pc, &name, NULL, NULL);
+  return (name && (strcmp ("sigacthandler", name) == 0
+		   || strcmp (name, "ucbsigvechandler") == 0));
 }
 
 /* Solaris doesn't have a `struct sigcontext', but it does have a


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]