[英]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 服務器端,我正確地看到了“信息:在 tcp/5557 上接受‘gdb’連接”
但現在我找不到如何繼續:
(lldb) process launch
error: process launch failed: Child exec failed.
我也試過“進程繼續”,但 lldb 抱怨沒有進程
對於 gdb,該進程被視為已經在運行,我使用重置/繼續命令,而不是“運行”命令。
有人知道如何將 lldb 與 openocd/jtag gdb-server 一起使用嗎?
謝謝你的幫助
厘米。
根據我們的研究,如果不編寫額外的代碼,就無法使用lldb調試遠程(裸機!)目標。
對於基本功能,lldb需要識別至少一個線程上下文。 對於gdb也是如此。 但是在gdb中,有一些存根實現了,偽造了遠程系統上的現有線程。 [1]
從lldb郵件列表上的對話[2]中,答案編譯為:我們必須編寫一些(python)代碼才能使用lldb使用遠程裸機。
[2] http://comments.gmane.org/gmane.comp.debugging.lldb.devel/3405
到目前為止,這在我的 stm32g0b1 核板和 pyOCD 上對我有用,但我也用 OpenOCD 進行了測試
$ lldb --local-lldbinit Build/temp.elf
(lldb) target create "Build/temp.elf"
Current executable set to '/home/diego/Workspace/genesis/Buil /temp.elf' (arm).
(lldb) gdb-remote 127.0.0.1:3333
Process 1 stopped
(lldb) target modules load --load .text 0x08000000
section '.text' loaded at 0x8000000
(lldb) process plugin packet monitor reset halt
packet: qRcmd,72657365742068616c74
response: 526573657474696e672074617267657420776974682068616c740a5375636365737366756c6c792068616c74656420646576696365206f6e2072657365740a
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.