Skip to contentSkip to conversation

Solaris Linux x86 binary compatibility

Qemu-devel In review Peter Firmstone 3 participants 3 messages Jan 19, 2006 – Apr 19, 2006

lore
Share & tools
lore
#0 lore raw

Hi,

You may have heard of Janus, the Solaris x86 compatibility layer to run x86 linux binaries. It is now renamed brandz and is available at the OpenSolaris web site:

http://www.opensolaris.org/os/community/brandz

Basically it has the ability to create a linux runtime environment using linux system libraries in a Solaris container. It only works on Solaris x86.

It might be possible to create a similar linux x86 runtime environment on Solaris SPARC using QEMU's Linux user space emulator.

Any thoughts?

Regards,

Peter.

#1 lore raw

PATCH 1/1 gdbstub.c fix for SIGINT

Attached is a patch to add the case for interrupting the gdbstub and sending the correct signal to gdb.

The gdb serial protocol states that if you interrupt the stub with a "control-c" in gdb that it should stop with S02 (SIGINT) to indicate that it was interrupted. I also added the tlb flush so that breakpoints can be written in correctly. I found that if I ran a pentium qemu instance and broke in with gdb and planted a breakpoint at do_fork() that it was not immediately hit due to the lack of the flush. With the patch, it reliably stops all the time now when a breakpoint is planted after interrupting the stub.

Thanks,
Jason.

Index: Changelog
===================================================================
RCS file: /sources/qemu/qemu/Changelog,v
retrieving revision 1.111

Changelog +1 -0
diff -u -r1.111 Changelog
@@ -2,6 +2,7 @@
 
   - USB tablet support (Brad Campbell, Anthony Liguori)
   - win32 host serial support (Kazu)
+  - Fix SIGINT handler for gdbstub
 
 version 0.8.0:
 

Index: gdbstub.c
===================================================================
RCS file: /sources/qemu/qemu/gdbstub.c,v
retrieving revision 1.34

gdbstub.c +3 -0
diff -u -r1.34 gdbstub.c
@@ -654,6 +654,9 @@
     if (reason == EXCP_DEBUG) {
 	tb_flush(s->env);
         ret = SIGTRAP;
+    } else if (reason == EXCP_INTERRUPT) {
+        tb_flush(s->env);
+        ret = SIGINT;
     }
     else
         ret = 0;
#2 lore raw

Re: [Qemu-devel] [PATCH] gdbstub.c fix for SIGINT

Hi...

Quoted 2 lines

Attached is a patch to add the case for interrupting the gdbstub and sending the correct signal to gdb.

Excellent. I haven't tested by myself, but could you test your patch together with Andre Pech's patch that I put in
http://qemu.dad-answers.com/viewtopic.php?p=2809#2809?

BTW, Paul brook also put a patch related with breakpoint TLB invalidation in
http://cvs.savannah.gnu.org/viewcvs/qemu/qemu/exec.c.diff?tr1=1.74&tr2=1.75&r1=text&r2=text
(from Paul Brook's posting at qemu-devel on April 9th 2006 )

I think it would be great if these patch combo can finally squashed the gdbstub bug related to missed breakpoints once and for all.

regards

Mulyadi