<div dir="ltr"><blockquote style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">I debug i386 programs using a basic serial port which is means most 
recent motherboards do not work because serial ports are not common and 
USB serial ports are no help. If you do have a serial port the set up I 
use is:<br></blockquote><div><br>Can you talk more about this way of debugging Chris? As I understood, you run the RTEMS application on a PC with serial port (say A). Then you connect the other side of serial port cable to another computer (say B) which runs the code that you sent the links in your email? And are you able to place breakpoint or to step code execution with serial port? Can you explain more about the mechanism and setup?<br>
<br>Thanks,<br>SAeeD<br> </div><div class="gmail_quote">On Thu, Aug 30, 2012 at 2:20 AM, Chris Johns <span dir="ltr"><<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="im">Xiaochen Pan wrote:<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
How to use i386-rtems4.11-gdb to debug pc386 compiled exe programs?<br>
<br>
</blockquote>
<br></div>
I debug i386 programs using a basic serial port which is means most recent motherboards do not work because serial ports are not common and USB serial ports are no help. If you do have a serial port the set up I use is:<br>

<br>
 <a href="http://git.rtems.org/chrisj/rtl.git/tree/pc386-gdb.c" target="_blank">http://git.rtems.org/chrisj/<u></u>rtl.git/tree/pc386-gdb.c</a><br>
 <a href="http://git.rtems.org/chrisj/rtl.git/tree/main.c#n378" target="_blank">http://git.rtems.org/chrisj/<u></u>rtl.git/tree/main.c#n378</a><br>
<br>
Note, I add '--gdb' to the boot command line grub uses.<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Are all pc386 compiled files supposed to run with qemu emulator? Could they run without qemu? If it have to be with qemu, what instructions I should follow?<br>
</blockquote>
<br></div>
As already posted add the -s option to qemu. You can also tell qemu to hold the i386 in reset allowing you to connect gdb, set a break point, then run. This helps debug early boot type issues.<span class="HOEnZb"><font color="#888888"><br>

<br>
Chris</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
rtems-users mailing list<br>
<a href="mailto:rtems-users@rtems.org" target="_blank">rtems-users@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-users" target="_blank">http://www.rtems.org/mailman/<u></u>listinfo/rtems-users</a><br>
</div></div></blockquote></div><br></div>