How to debug pc386 compiled program with gdb?

SAeeD salpha.2004 at gmail.com
Thu Aug 30 10:32:14 UTC 2012


>
> 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:
>

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?

Thanks,
SAeeD

On Thu, Aug 30, 2012 at 2:20 AM, Chris Johns <chrisj at rtems.org> wrote:

> Xiaochen Pan wrote:
>
>>
>> How to use i386-rtems4.11-gdb to debug pc386 compiled exe programs?
>>
>>
> 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:
>
>  http://git.rtems.org/chrisj/**rtl.git/tree/pc386-gdb.c<http://git.rtems.org/chrisj/rtl.git/tree/pc386-gdb.c>
>  http://git.rtems.org/chrisj/**rtl.git/tree/main.c#n378<http://git.rtems.org/chrisj/rtl.git/tree/main.c#n378>
>
> Note, I add '--gdb' to the boot command line grub uses.
>
>
>  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?
>>
>
> 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.
>
> Chris
>
> ______________________________**_________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/**listinfo/rtems-users<http://www.rtems.org/mailman/listinfo/rtems-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120830/442bbf28/attachment-0001.html>


More information about the users mailing list