每一个“丑得人神共愤”的泡妞高 手都有一颗坚忍的心,这证明了人类 在绝境中毫不妥协的求生精神,反正丑都丑了,索性放开手脚大干一场,这就叫“无产阶级失去的是锁链,得到的是全世界”
2013年(130)
分类: LINUX
2013-09-23 16:42:59
where
- gdbserver localhost:
Note: To support symbolic debugging the application must have been compiled with the -g flag. This causes DWARF debugging information to be included in the executable. See the GDB documentation for details.
- target% gdbserver localhost:3278 /root/hello
- Process application created: pid = 184
- Listening on port 3278
In this command
- (gdb) target remote
:
4.Initially the program is stopped at its entry point in the C runtime, so the first step is to run to main:
- host% sh4-linux-gdb /opt/STM/STLinux2.3/devkit/sh4/target/root/hello
- GNU gdb STMicroelectronics/Linux Base 6.5-32 [build Jul 22 2008]
- Copyright (C) 2006 Free Software Foundation, Inc.
- This GDB was configured as "--host=i686-pc-linux-gnu --target=sh4-linux"...
- (gdb) target remote 192.168.1.2:3278
- Remote debugging using 192.168.1.2:3278
- 0x29558080 in ??()
- (gdb)
Note: To avoid having to enter these commands manually whenever GDB is invoked, they can be automated by creating a GDB startup script file. When GDB starts, it looks for a file named .shgdbinit in the home directory of the user, and in the current directory, and (if found) executes it. The user can specify an alternative startup script to be run, by starting GDB with the command line option --command=
- (gdb) break main
- Breakpoint 1 at 0x400656: file main.c, line 20.
- (gdb) continue
- Continuing.
- Breakpoint 1, main() at main.c:20 20 printf("Welcome to the application\n");
- (gdb)