From 699fc65ff289ce0a256e57840cf14948f242ab68 Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Fri, 21 Aug 2020 15:36:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20GDBServer=20=E7=9A=84?= =?UTF-8?q?=E4=BD=BF=E7=94=A8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- Software/Applications/GDB/GDBServer_的使用.md | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Software/Applications/GDB/GDBServer_的使用.md diff --git a/Software/Applications/GDB/GDBServer_的使用.md b/Software/Applications/GDB/GDBServer_的使用.md new file mode 100644 index 0000000..70a70ed --- /dev/null +++ b/Software/Applications/GDB/GDBServer_的使用.md @@ -0,0 +1,22 @@ +# GDBServer 的使用 + +GDBServer 用于与 GDB 配合工作,以实现远程调试。在 Host 上开发的程序,运行于 Target/Remote 端,因此 GDBServer 也运行于 Target/Remote 端进行监听,GDB 运行于 Host 端实现远程调试。 + +## Target/Remote 端 + +gdbserver 的使用非常简单,只要在某个端口上开启监听就可以: + +```bash +gdbserver [listen ip]: +``` + +## Host 端 + +Host 端需要先连接 Target/Remote: + +```bash +gdb +(gdb) target remote [remote ip]: +``` + +之后就可以像在本地调试那样使用 GDB 了。