public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [Patch,ARM] Next pc of sigreturn/rt_sigreturn syscall
@ 2010-08-24  6:39 Yao Qi
  2010-08-24 11:28 ` Mark Kettenis
  0 siblings, 1 reply; 9+ messages in thread
From: Yao Qi @ 2010-08-24  6:39 UTC (permalink / raw)
  To: gdb-patches

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

Hi,
This patch is to calculate correct address of 'next pc' of syscall
sigreturn and rt_sigreturn.

Tested on armv7l-unknown-linux-gnueabi, and a diff of test summary is
shown below:

-FAIL: gdb.base/sigstep.exp: step from handler; leave handler(timeout)
+PASS: gdb.base/sigstep.exp: step from handler; leave handler
-FAIL: gdb.base/sigstep.exp: stepi from handleri; leave signal trampoline
+PASS: gdb.base/sigstep.exp: stepi from handleri; leave signal trampoline (in main)
-FAIL: gdb.base/sigstep.exp: next from handler; leave handler (timeout)
+PASS: gdb.base/sigstep.exp: next from handler; leave handler
-FAIL: gdb.base/sigstep.exp: nexti from handleri; leave signal trampoline
+PASS: gdb.base/sigstep.exp: nexti from handleri; leave signal trampoline (in main)

                === gdb Summary ===

-# of expected passes           14664
-# of unexpected failures       314
+# of expected passes           14669
+# of unexpected failures       310

Is that OK?

-- 
Yao Qi
CodeSourcery
yao@codesourcery.com
(650) 331-3385 x739

[-- Attachment #2: nextpc_of_svc.patch --]
[-- Type: text/x-diff, Size: 733 bytes --]

2010-08-24  Yao Qi  <yao@codesourcery.com>

	*arm-tdep.c (arm_get_next_pc_raw): Calculate next pc of sigreturn or
	rt_sigreturn syscall.

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 1ac8817..978bb72 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -3257,7 +3257,18 @@ arm_get_next_pc_raw (struct frame_info *frame, CORE_ADDR pc, int insert_bkpt)
 	case 0xc:
 	case 0xd:
 	case 0xe:		/* coproc ops */
+	  break;
 	case 0xf:		/* SWI */
+	  {
+	    unsigned long svc_number = get_frame_register_unsigned (frame, 7);
+
+	    if (svc_number == 119 || svc_number == 173)
+	      {   
+		if (get_frame_type (frame) == SIGTRAMP_FRAME)
+		  {
+		    nextpc = frame_unwind_caller_pc (frame);
+		  }
+	      }
 	  break;
 
 	default:

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

end of thread, other threads:[~2010-08-30 15:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-24  6:39 [Patch,ARM] Next pc of sigreturn/rt_sigreturn syscall Yao Qi
2010-08-24 11:28 ` Mark Kettenis
2010-08-24 14:13   ` Daniel Jacobowitz
2010-08-25  3:06     ` Yao Qi
2010-08-25 14:31       ` Daniel Jacobowitz
2010-08-26  8:51         ` Yao Qi
2010-08-30 13:00           ` Daniel Jacobowitz
2010-08-30 13:08             ` Mark Kettenis
2010-08-30 15:35               ` Yao Qi

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).