如何使用 "openocd and JTAG board" 设置 LLDB

How to setup LLDB with "openocd and JTAG board"

我正在尝试将 lldb 与 openocd/jtag 板一起使用,但我遇到了麻烦。 我已经使用带有 gdb 的 openocd 在 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 服务器端,我正确地看到了 "Info : accepting 'gdb' connection on tcp/5557"

但现在我找不到如何继续:

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

我也试过"process continue",但是lldb抱怨没有进程

使用 gdb,进程被认为已经 运行,我使用 reset/continue 命令,从不使用 'run' 命令。

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

感谢您的帮助

C/M.

根据我们的研究,在不编写额外代码的情况下,无法使用 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