Skip to contentSkip to conversation

[4632] Copy siginfo.si_code.

Qemu-devel Paul Brook 3 participants 3 messages May 30, 2008 – May 31, 2008

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

Revision: 4632

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4632
Author:   pbrook
Date:     2008-05-30 22:57:20 +0000 (Fri, 30 May 2008)

Log Message:
-----------
Copy siginfo.si_code.

Modified Paths:
--------------
trunk/linux-user/signal.c

Modified: trunk/linux-user/signal.c
===================================================================

linux-user/signal.c +1 -1
@@ -216,7 +216,7 @@
     sig = host_to_target_signal(info->si_signo);
     tinfo->si_signo = sig;
     tinfo->si_errno = 0;
-    tinfo->si_code = 0;
+    tinfo->si_code = info.si_code;
     if (sig == SIGILL || sig == SIGFPE || sig == SIGSEGV ||
         sig == SIGBUS || sig == SIGTRAP) {
         /* should never come here, but who knows. The information for
#1 lore raw
Quoted 5 lines · Paul Brook

Revision: 4632

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4632
Author:   pbrook
Date:     2008-05-30 22:57:20 +0000 (Fri, 30 May 2008)
Quoted 7 lines

Log Message:
-----------
Copy siginfo.si_code.

Modified Paths:
--------------
trunk/linux-user/signal.c

Sorry Paul, this commit broke the build.

linux-user/signal.c line 219

Quoted 9 lines

===================================================================

linux-user/signal.c +1 -1
@@ -216,7 +216,7 @@
     sig = host_to_target_signal(info->si_signo);
     tinfo->si_signo = sig;
     tinfo->si_errno = 0;
-    tinfo->si_code = 0;
+    tinfo->si_code = info.si_code;

That is definitely not right. According to the code 4 lines earlier, info is a pointer and you a treating it like a struct.

Erik

Signature · 5 lines
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
"C++ is the only current language making COBOL look good."
-- Bertrand Meyer
#2 lore raw
Quoted 5 lines
Quoted 3 lines

Log Message:
-----------
Copy siginfo.si_code.

this commit broke the build.

Fixed, sorry about that. I thought I'd tested this and everything built fine, apparently I missed something.

Paul