- 论坛徽章:
- 0
|
遇到的问题如下:
1.如果没有加载symbol table时, (list,break等命名不可以用)
pc端 可以continue到底
如下:
[root@localhost /]# arm-linux-gdb
GNU gdb 6.4
Copyright 2005 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-linux-gnu --target=arm-linux".
(gdb) target remote 172.16.16.114:1111
Remote debugging using 172.16.16.114:1111
0x400009f0 in ?? ()
(gdb) c
Continuing.
Program exited with code 061.
目标端如下:
# ./gdbserver 172.16.16.119:1111 lmjtest
Process lmjtest created; pid = 238
Listening on port 1111
Remote debugging from host 172.16.16.119
the first string is Hello gdbserver!
Child exited with retcode = 25
Child exited with status 37
GDBserver exiting
2如果加载了 symbol table时, list,break命令可以用,但是continue不可以用
pc端:
[root@localhost /]# arm-linux-gdb
GNU gdb 6.4
Copyright 2005 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-linux-gnu --target=arm-linux".
(gdb) file /home/mjliu/program/lmjtest
Reading symbols from /home/mjliu/program/lmjtest...done.
(gdb) target remote 172.16.16.114:1111
Remote debugging using 172.16.16.114:1111
0x400009f0 in ?? ()
(gdb) b main
Breakpoint 1 at 0x8598: file lmjtest.c, line 5.
(gdb) c
Continuing.
Warning:
Cannot insert breakpoint -2.
Error accessing memory address 0x4000e890: Input/output error.
(gdb) n
Cannot access memory at address 0x0
Cannot find bounds of current function
(gdb) n
Cannot find bounds of current function
(gdb) n
Cannot find bounds of current function
(gdb) s
Cannot find bounds of current function
(gdb) quit
The program is running. Exit anyway? (y or n) y
目标端如下:
# ./gdbserver 172.16.16.119:1111 lmjtest
Process lmjtest created; pid = 236
Listening on port 1111
Remote debugging from host 172.16.16.119
Killing inferior |
|