<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<STYLE type=text/css>
BLOCKQUOTE{margin-Top: 0px; margin-Bottom: 0px; margin-Left: 2em}
</STYLE>
<!-- flashmail style begin -->
<STYLE type=text/css>
body {border-width:0;margin:0}
img {border:0;margin:0;padding:0}
</STYLE>
<BASE target=_blank><!-- flashmail style end -->
<META name=GENERATOR content="MSHTML 11.00.9600.18666"></HEAD>
<BODY 
style="BORDER-LEFT-WIDTH: 0px; FONT-SIZE: 10.5pt; FONT-FAMILY: 微软雅黑; BORDER-RIGHT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; COLOR: #000000; MARGIN: 12px; LINE-HEIGHT: 1.5; BORDER-TOP-WIDTH: 0px" 
marginheight="0" marginwidth="0"><STATIONERY>
<DIV>Hello all,</DIV>
<DIV> </DIV>
<DIV>I have a question about debuging VirtualBox in Linux environment.</DIV>
<DIV> </DIV>
<DIV>It seems the breakpoint doesn't got been hit.</DIV>
<DIV> </DIV>
<DIV>First I compile a debug version of VirtualBox.</DIV>
<DIV>1. start a vm: sudo gdb --args ./VirtualBox --comment ubuntu --startvm 
a3af2e12-957b-48a8-8b0c-1afe93fe2d2c --no-startvm-errormsgbox</DIV>
<DIV> </DIV>
<DIV>2. set break point. For example:</DIV>
<DIV> </DIV>
<DIV>b vpciIOPortOut</DIV>
<DIV> </DIV>
<DIV>3. in the guest, we trigger an IO access.</DIV>
<DIV>outw(1,0xd020+0xe)</DIV>
<DIV> </DIV>
<DIV>4. In my mind, I think this will break at vpciIOPortOut function. But it 
doesn't, the vm just run without break.</DIV>
<DIV> </DIV>
<DIV>5. But as I change the outw to outl/outb.(This will make the 'cb' to be 1 
or 4. The VM will crash.</DIV>
<DIV>This crash is caused by following Assert in vpciIOPortOut function.</DIV>
<DIV> </DIV>
<DIV>        case 
VPCI_QUEUE_SEL:<BR>           <SPAN 
style="COLOR: #ff0000"> Assert(cb == 
2);<BR></SPAN>            
u32 &= 
0xFFFF;<BR>            if 
(u32 < 
pState->nQueues)<BR>                
pState->uQueueSelector = 
u32;<BR>            
else<BR>                
Log3(("%s vpciIOPortOut: Invalid queue selector %08x\n", INSTANCE(pState), 
u32));<BR>            
break;<BR></DIV>
<DIV>So here I think outb/w/l in  guest does TRIGGER the call of 
vpciIOPortOut  function. But why does the vm not pause and goto gdb? Is 
there something I missed?</DIV>
<DIV> </DIV>
<DIV>Thanks.</DIV>
<DIV> </DIV>
<DIV>
<P class=MsoNormal style="TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt"><SPAN 
lang=EN-US 
style='FONT-SIZE: 10.5pt; FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d'>--<?xml:namespace 
prefix = "o" ns = "urn:schemas-microsoft-com:office:office" 
/><o:p></o:p></SPAN></P>
<P class=MsoNormal style="TEXT-ALIGN: justify; MARGIN: 0cm 0cm 0pt"><SPAN 
lang=EN-US 
style='FONT-SIZE: 10.5pt; FONT-FAMILY: "Calibri","sans-serif"; COLOR: #1f497d'>Li 
Qiang /the Gear Team, Qihoo 360 
Inc<o:p></o:p></SPAN></P></DIV></STATIONERY></BODY></HTML>