From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Cc: kettenis@gnu.org
Subject: RFA: Fix i386-linux backtrace through signal handlers
Date: Wed, 30 Oct 2002 14:06:00 -0000 [thread overview]
Message-ID: <20021030220654.GA13990@nevyn.them.org> (raw)
The patch to fix the testsuite problems in my last message. The comment is
pretty self-explanatory; this is option "B" from our earlier conversation.
If we appear to be in a function whose name includes "sigaction", use the PC
scanner instead of trusting the name.
OK?
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
2002-10-30 Daniel Jacobowitz <drow@mvista.com>
* i386-linux-tdep.c (i386_linux_pc_in_sigtramp): Check for
trampolines in sigaction.
Index: i386-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-linux-tdep.c,v
retrieving revision 1.17
diff -u -p -r1.17 i386-linux-tdep.c
--- i386-linux-tdep.c 12 Aug 2002 19:05:33 -0000 1.17
+++ i386-linux-tdep.c 30 Oct 2002 22:01:14 -0000
@@ -209,11 +209,17 @@ i386_linux_rt_sigtramp_start (CORE_ADDR
static int
i386_linux_pc_in_sigtramp (CORE_ADDR pc, char *name)
{
- if (name)
- return STREQ ("__restore", name) || STREQ ("__restore_rt", name);
-
- return (i386_linux_sigtramp_start (pc) != 0
- || i386_linux_rt_sigtramp_start (pc) != 0);
+ /* If we have NAME, we can optimize the search. The trampolines are
+ named __restore and __restore_rt. However, they aren't dynamically
+ exported from the shared C library, so the trampoline may appear to
+ be part of the preceding function. This should always be sigaction,
+ __sigaction, or __libc_sigaction (all aliases to the same function). */
+ if (name == NULL || strstr (name, "sigaction") != NULL)
+ return (i386_linux_sigtramp_start (pc) != 0
+ || i386_linux_rt_sigtramp_start (pc) != 0);
+
+ return (strcmp ("__restore", name) == 0
+ || strcmp ("__restore_rt", name) == 0);
}
/* Assuming FRAME is for a GNU/Linux sigtramp routine, return the
next reply other threads:[~2002-10-30 22:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-30 14:06 Daniel Jacobowitz [this message]
2002-10-31 11:12 ` Mark Kettenis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021030220654.GA13990@nevyn.them.org \
--to=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox