views:

57

answers:

1

I am doing embedded software development. By nature, I have 3 different applications running simultaneously that are guaranteed to run in different ranges of virtual addresses, e.g.

App 1 runs on 0x10000000 - 0x20000000, App2 runs in 0x20000000 - 0x30000000 and so on.

Generally GDB seems to accept only one symbol definition file. But in this case I could potentially load all 3 definitions without a clash. How could I achieve this?

Secondly, assume I have all 3 applications running in the same virtual range, but something is different while each is running, for example assume that one address location contains their address space ID, which gives me the clue on which application is loaded at that time.

How could I tell GDB to load all 3 symbol definitions but automatically switch the definition based on this information?

+1  A: 

Have you tried

add-symbol-file app1 0x10000000
add-symbol-file app2 0x20000000
add-symbol-file app3 0x30000000

Since all addresses are different and the apps are all loaded at the same time, I don't quite understand what you mean by "clue on which application is loaded at that time".

If in fact the applications are not loaded at the same time, GDB overlay support might help.

Employed Russian