How to build the GDB stub Floppy for PC386 target?
Boris V. Guzhov
borg at int.spb.ru
Fri Apr 14 16:50:44 UTC 2000
Thanks,
But still there are the problems.
I have located my test.exe file in the FS_GRUB diskette
and load my target PC with it. Then I ran my test with GDB.
Then I have bulided "Hello world" test.exe.
Then I run gdb:
gdb hello.exe
(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
realloc (ptr=..., size=...)
at ...malloc.c:268
268 if (!size) {
(gdb)
Good! There is a connect!
But then it does not work.
For examle, a cannot to run "load" command:
(gdb) load
Loading section .text, size ...
Ignoring packet error, continuing ...
How to load another application in target with
using GDB?
I want to have in target only GDB stub
and to load any application through GDB
with using "load" command.
Will somebody help with this problem? I will very much obliged.
Boris V. Guzhov,
St.Petersburg
>
>> Hi All!
>>
>> I have:
>> - Linux Red Hat 6.0 host
>> - pc486 target (usual computer)
>>
>> I build the "Hello world" simple application.
>>
>> How to build the GDB stub Floppy for target?
>
>
>1. Read c/src/lib/libbsp/i386/pc386/HOWTO
>
>> How to load the my application in my target with usage of the
>> I386-rtems-gdb?
>
>2. Add following fragment to the init task
>#if 1
> /* Init GDB glue */
>
> if(BSPConsolePort != BSP_UART_COM2)
> {
> /*
> * If com2 is not used as console use it for
> * debugging
> */
> i386_stub_glue_init(BSP_UART_COM2);
> }
> else
> {
> /* Otherwise use com1 */
> i386_stub_glue_init(BSP_UART_COM1);
> }
>
> /* Init GDB stub itself */
> set_debug_traps();
>
> /*
> * Init GDB break in capability,
> * has to be called after
> * set_debug_traps
> */
> i386_stub_glue_init_breakin();
>
> /* Put breakpoint in */
> breakpoint();
>
>#endif /* 0 */
>
More information about the users
mailing list