Debugging multiple executables (2nd)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugging multiple executables (2nd)

Jump to solution
2,897 Views
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 Kudos
1 Solution
2,840 Views
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.

View solution in original post

0 Kudos
8 Replies
2,881 Views
bastian_schick
Contributor IV

*empty*

 

0 Kudos
2,886 Views
ErichStyger
Senior Contributor V

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 Kudos
2,880 Views
bastian_schick
Contributor IV

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

0 Kudos
2,869 Views
ErichStyger
Senior Contributor V

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

0 Kudos
2,841 Views
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 Kudos
2,861 Views
bastian_schick
Contributor IV

Ok, will give it a try.

0 Kudos
2,894 Views
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 Kudos
2,879 Views
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 Kudos