public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mjw@redhat.com>
To: elfutils-devel@lists.fedorahosted.org
Subject: [PATCH] tests: backtrace.c accept __libc_do_syscall as first frame symname.
Date: Sat, 14 Jun 2014 01:11:16 +0200	[thread overview]
Message-ID: <1402701076-26236-1-git-send-email-mjw@redhat.com> (raw)

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

On some architectures (Debian armhl) system calls go through
__libc_do_syscall instead of __kernel_vsyscall. Accept either of
these symbol names for the first backtrace frame.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
 tests/ChangeLog   |    5 +++++
 tests/backtrace.c |    3 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index 7c46428..90a2a0e 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,10 @@
 2014-06-13  Mark Wielaard  <mjw@redhat.com>
 
+	* backtrace.c (callback_verify): Accept "__libc_do_syscall" as first
+	frame symname.
+
+2014-06-13  Mark Wielaard  <mjw@redhat.com>
+
 	* backtrace-subr.sh (check_native_unsupported): New function.
 	(check_native): Call it.
 	(check_native_core): Likewise.
diff --git a/tests/backtrace.c b/tests/backtrace.c
index ce0bd17..1d3948e 100644
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -98,7 +98,8 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
   {
     case 0:
       if (! reduce_frameno && symname
-	       && strcmp (symname, "__kernel_vsyscall") == 0)
+	       && (strcmp (symname, "__kernel_vsyscall") == 0
+		   || strcmp (symname, "__libc_do_syscall") == 0))
 	reduce_frameno = true;
       else
 	assert (symname && strcmp (symname, "raise") == 0);
-- 
1.7.1


                 reply	other threads:[~2014-06-13 23:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1402701076-26236-1-git-send-email-mjw@redhat.com \
    --to=mjw@redhat.com \
    --cc=elfutils-devel@lists.fedorahosted.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).