How to debug pc386 compiled program with gdb?

SAeeD salpha.2004 at gmail.com
Wed Aug 29 21:37:48 UTC 2012


> Are all pc386 compiled files supposed to run with qemu emulator?
>
Nope, they can run on computer just like any other operating system like
Windows and Linux. You can use GRUB 2 to boot an RTEMS OS + application
image. But I don't know how they can be debugged in this way.


 If it have to be with qemu, what instructions I should follow?
>
In order to debug your application when it is running on QEMU, you should
start your QEMU with -s option. This option will launch a GDB server on
localhost:1234. Then use a debugger interface like kDBG or eclipse to
remotely debug your running application. For instance, in kDBG you may
change the debugger in Settings > Global Options menu to i386-rtems4.11-gdb
and then if you start kdbg like:
kdbg -r 127.0.0.1:1234 /ELF/version/of/your/application/path/and/name
you'll be able to debug your application.
Just remember that you must start QEMU before kDBG and introduce the same
ELF file to both of them.

Hope it helps,
SAeeD

On Wed, Aug 29, 2012 at 10:14 PM, Xiaochen Pan <panx at seas.upenn.edu> wrote:

> Dear RTEMS developers and users,
>
> How to use i386-rtems4.11-gdb to debug pc386 compiled exe programs?
>
> 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?
>
> Thank you very much!
>
> Sincerely,
> Xiaochen Pan
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120830/c29764e2/attachment-0001.html>


More information about the users mailing list