3

我正在尝试将 lldb 与 openocd/jtag 板一起使用,但我遇到了麻烦。我已经使用 openocd 和 gdb 在 L0 STMicroelectronics 板上进行开发,并且效果很好。现在我想和lldb一样。

我在 LLDB 主机端这样做

$ lldb bin/token.elf 
(lldb) target create "bin/token.elf"
Current executable set to 'bin/token.elf' (arm).
(lldb) platform select remote-gdb-server
  Platform: remote-gdb-server
  Connected: no
(lldb) platform connect connect://localhost:5557
  Platform: remote-gdb-server
  Hostname: (null)
  Connected: yes
(lldb) target list 
Current targets:
* target #0: /home/cme/Projects/Tacos/ledger/trunk/se/build/st31_bolos/bin/token.elf ( arch=arm-unknown-unknown, platform=host )

在 openocd/GDB 服务器端,我正确地看到“信息:在 tcp/5557 上接受 'gdb' 连接”

但现在我没有找到如何继续:

(lldb) process launch 
error: process launch failed: Child exec failed.

我也试过“进程继续”,但 lldb 抱怨没有进程

使用 gdb,该进程被认为已经在运行,我使用重置/继续命令,而不是“运行”命令。

有人知道如何将 lldb 与 openocd/jtag gdb-server 一起使用吗?

谢谢你的帮助

厘米。

4

1 回答 1

4

根据我们的研究,在不编写额外代码的情况下,无法使用 lldb 调试远程(裸机!)目标。

对于基本功能,lldb 需要识别至少一个线程上下文。gdb 也是如此。但是在 gdb 中有某种存根实现了伪造远程系统上的现有线程。[1]

从 lldb 邮件列表 [2] 上的对话中,答案编译为:我们必须编写一些 (python) 代码来让远程裸机与 lldb 一起工作。

[1] https://github.com/bminor/binutils-gdb/blob/28170b88cc8b40fdea2b065dafe6e1872a47ee4e/gdb/remote.c#L1808

[2] http://comments.gmane.org/gmane.comp.debugging.lldb.devel/3405

于 2016-04-05T09:12:06.763 回答