Debugging multiple executables (2nd)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Debugging multiple executables (2nd)

跳至解决方案
6,485 次查看
bastian_schick
Contributor IV

Hi

how can I debug mulitple (at least) two ELF files?

Means, I want to download the ELF files from two projects, where one is the main project and the other contains also code which is called (fixed addresses) by the first.

I thought "launch group" would be an option, but the manual does not explain its use and if I try, only one ELF will be loaded.

0 项奖励
回复
1 解答
6,428 次查看
bastian_schick
Contributor IV

"load" alone did not work.

I had to add my side-loaded file to "Other Symbols" tab, else all breakpoints are invalid when loading main file. Then the  commands in "Startup" -> "Run commands" had to be

load "<path to file>"
set $pc = <start of main file>

else the pc was wrong.

在原帖中查看解决方案

0 项奖励
回复
8 回复数
6,469 次查看
bastian_schick
Contributor IV

*empty*

 

0 项奖励
回复
6,474 次查看
ErichStyger
Specialist I

Yes, you can debug multiple binaries. Just add the extra symbols to the actual debug session.

See https://mcuoneclipse.com/2017/01/21/no-source-available-or-how-to-debug-multiple-binaries-with-gdb-a...

It works that way for any gdb based debugger, including the NXP MCUXpresso IDE.

I hope this helps,

Erich

0 项奖励
回复
6,468 次查看
bastian_schick
Contributor IV

It's about two ELF files. Both need to be loaded at the same time to SDRAM.

0 项奖励
回复
6,457 次查看
ErichStyger
Specialist I

you can use the gdb 'load' command to load multiple files

0 项奖励
回复
6,429 次查看
bastian_schick
Contributor IV

"load" alone did not work.

I had to add my side-loaded file to "Other Symbols" tab, else all breakpoints are invalid when loading main file. Then the  commands in "Startup" -> "Run commands" had to be

load "<path to file>"
set $pc = <start of main file>

else the pc was wrong.

0 项奖励
回复
6,449 次查看
bastian_schick
Contributor IV

Ok, will give it a try.

0 项奖励
回复
6,482 次查看
converse
Senior Contributor V

AFAIK, this is not possible. A debugger instance can only handle a single image (symbol table). A debugger instance being a debugger connected to a single processor core.

You may be able to achieve something by linking together the two applications into a single application (AXF) with a single symbol table.

 

0 项奖励
回复
6,467 次查看
bastian_schick
Contributor IV

I do not want to debug multiple core, but load two files. Building a single ELF file it not really an option, as the two ELF files are separately certified.

0 项奖励
回复