qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Reiser <jreiser@BitWagon.com>
To: Hetz Ben Hamo <hetzbh@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu on Fedora Core 3 (Linux 2.6.9+), glibc-2.3.3
Date: Sun, 19 Dec 2004 05:55:13 -0800	[thread overview]
Message-ID: <41C58841.4060008@BitWagon.com> (raw)
In-Reply-To: <41e41e7a04121902033c7a42ee@mail.gmail.com>

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

> Could you please re-send your patch, diffed, as an attachment please?

The important part of the original post was output from "diff -Naur".
Does gmail mangle message bodies, or was the request due to the
other small manual adjustments (non-patch) noted in the original post?
Anyway, a 100% patch is attached for use by "patch -p1".

-- 

[-- Attachment #2: SA_RESTORER.patch --]
[-- Type: text/plain, Size: 2039 bytes --]

--- ./vl.c.orig	2004-12-12 14:20:04.000000000 -0800
+++ ./vl.c	2004-12-19 05:49:53.323570312 -0800
@@ -882,6 +882,9 @@
 
 #endif /* !defined(_WIN32) */
 
+extern void __restore(void);
+extern void __restore_rt(void);
+
 static void init_timers(void)
 {
     rt_clock = qemu_new_clock(QEMU_TIMER_REALTIME);
@@ -913,7 +916,9 @@
         sigfillset(&act.sa_mask);
         act.sa_flags = 0;
 #if defined (TARGET_I386) && defined(USE_CODE_COPY)
-        act.sa_flags |= SA_ONSTACK;
+#define SA_RESTORER   0x04000000
+        act.sa_flags |= SA_ONSTACK | SA_RESTORER;
+        act.sa_restorer = __restore;
 #endif
         act.sa_handler = host_alarm_handler;
         sigaction(SIGALRM, &act, NULL);
@@ -3402,7 +3407,8 @@
         sigfillset(&act.sa_mask);
         act.sa_flags = SA_SIGINFO;
 #if defined (TARGET_I386) && defined(USE_CODE_COPY)
-        act.sa_flags |= SA_ONSTACK;
+        act.sa_flags |= SA_ONSTACK | SA_RESTORER;
+        act.sa_restorer = __restore_rt;
 #endif
         act.sa_sigaction = host_segv_handler;
         sigaction(SIGSEGV, &act, NULL);
@@ -3449,6 +3455,7 @@
             exit(1);
         } else {
             printf("Waiting gdb connection on port %d\n", gdbstub_port);
+sleep(5);
         }
     } else 
 #endif
--- ./Makefile.target.orig	2004-12-12 08:56:30.000000000 -0800
+++ ./Makefile.target	2004-12-19 05:48:08.201551288 -0800
@@ -264,7 +264,7 @@
 endif
 
 # must use static linking to avoid leaving stuff in virtual address space
-VL_OBJS=vl.o osdep.o block.o readline.o monitor.o pci.o console.o 
+VL_OBJS=vl.o osdep.o block.o readline.o monitor.o pci.o console.o  __restore.o
 VL_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o
 
 SOUND_HW = sb16.o
--- ./__restore.S.orig	2004-12-19 05:44:53.832099936 -0800
+++ ./__restore.S	2004-12-18 20:34:14.000000000 -0800
@@ -0,0 +1,10 @@
+#include <asm/unistd.h>
+
+__restore: .globl __restore
+	pop %eax
+	movl $ __NR_sigreturn,%eax
+	int $0x80
+
+__restore_rt: .globl __restore_rt
+	movl $ __NR_rt_sigreturn,%eax
+	int $0x80

  reply	other threads:[~2004-12-19 14:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-19  5:11 [Qemu-devel] qemu on Fedora Core 3 (Linux 2.6.9+), glibc-2.3.3 John Reiser
2004-12-19 10:03 ` Hetz Ben Hamo
2004-12-19 13:55   ` John Reiser [this message]
2004-12-19 14:35     ` John Reiser
2004-12-19 22:47     ` Fabrice Bellard
2004-12-20  0:54       ` John Reiser
2004-12-20 15:13         ` Johannes Schindelin
2004-12-20 15:48           ` John Reiser
2004-12-22  6:55             ` Darrin Ritter
2004-12-22 15:05               ` John Reiser

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=41C58841.4060008@BitWagon.com \
    --to=jreiser@bitwagon.com \
    --cc=hetzbh@gmail.com \
    --cc=qemu-devel@nongnu.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 NNTP newsgroup(s).