Sending commands which prompt for further commands [message #78093] |
Fri, 08 August 2003 01:11 |
Eclipse User |
|
|
|
Originally posted by: javaproject_7.hotmail.com
Hi All,
I am using mipsel-elf-gdb GNU gdb 20030516 .
My want to use the "commands" command from CDT.
"commands" command promt for the command it should sent when it encounters
a particular break point.
I have set a break point at exit and inorder to stop at breakpoint we have
to sent a "kill"
command.You can see how the "commands" command works in command line.
Is there any way to send a command when GDB prompt for that?.
CDT each command posted are considered as new commands.
Command line work like this.
$ mipsel-elf-gdb
GNU gdb 20030516
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-cygwin --target=mipsel-elf".
(gdb) target remote 192.168.0.91:9000
192.168.0.91:9000: Interrupted system call.
(gdb) Quit
(gdb) target remote 192.168.0.91:9000
Remote debugging using 192.168.0.91:9000
0xffffffff80012d14 in ?? ()
(gdb) symbol-file
/ecos-d/DeviceStudio/ecos/work/examples/src/helloworld/debug /
helloworld.exe
Reading symbols from
/ecos-d/DeviceStudio/ecos/work/examples/src/helloworld/debu
g/helloworld.exe...done.
(gdb) load
/ecos-d/DeviceStudio/ecos/work/examples/src/helloworld/debug /hellowo
rld.exe
Loading section .rom_vectors, size 0x194 lma 0x80080000
Loading section .text, size 0x9744c lma 0x80080194
Loading section .rodata, size 0x9e9c lma 0x801175e0
Loading section .data, size 0x1760 lma 0x80121480
Loading section .ctors, size 0x5c lma 0x80122be0
Loading section .dtors, size 0x3c lma 0x80122c3c
Loading section .devtab, size 0x2f0 lma 0x80122c78
Start address 0x80080184, load size 667492
Transfer rate: 333746 bits/sec, 510 bytes/write.
(gdb) b exit
Breakpoint 1 at 0x800bac18: file
/ecos-d/DeviceStudio/ecos/src/ecos-scmxx/packag
es/language/c/libc/startup/current/src/exit.cxx, line 86.
(gdb) commands
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just "end".
>kill
>end
(gdb) c
Continuing.
Hello world!
Hello world!
Hello world!
[New Thread 2]
[Switching to Thread 2]
Breakpoint 1, exit (status=0) at
/ecos-d/DeviceStudio/ecos/src/ecos-scmxx/packag
es/language/c/libc/startup/current/src/exit.cxx:86
86 cyg_libc_invoke_atexit_handlers();
Current language: auto; currently c++
Kill the program being debugged? (y or n) y
|
|
|
Powered by
FUDForum. Page generated in 0.04613 seconds