I'm new here, so please forgive me if this is not the right place to ask this.
I stared using msp430-gcc recently. (Earlier I used something else.)
I'm working on on some program written in C and assembly.
I wanted to debug it in mspdebug (in simulation mode, because the pif
has not implemented single stepping). I wanted to debug some assembly
However I noticed that I only had access to symbols (functions,
variablles) from the C file but not from the assembly file. Looks like
the symbols form the assembly file are not present in the .elf file.
I was not able to find by myself how to compile / assemble it to have
all symbols in the .elf file
On 03/01/2016 11:12 PM, Balthasar Szczepański wrote:
> However I noticed that I only had access to symbols (functions,
> variablles) from the C file but not from the assembly file. Looks like
> the symbols form the assembly file are not present in the .elf file.
> I was not able to find by myself how to compile / assemble it to have
> all symbols in the .elf file
mspdebug does not use debug symbols (the ones you enable with the -g
compiler switch), just the plain symbol names that are also used for
linking. However, in the ELF format, each symbol has a type field, and
mspdebug only uses symbols of certain types (object, function, etc.).
You can display the symbol table of an ELF object with "readelf --syms
file.o". Symbols whose type is listed as NOTYPE will be ignored by mspdebug.
If you want an assembler-defined symbol to be visible in mspdebug you
have to declare its type with a directive like ".type my_function,