Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Debugging tips for symbols

Hi Xavier,

In TCF, symbol is a unique ID (handle, fingerprint) of a portion of debug info. How the ID is constructed depends on the symbol kind. In case of ELF symbol table reference, symbol object contains pointer to ELF section and index of the entry in the section. Function get_symbol_address() is used to retrieve address of a symbol. If the address is wrong, you can debug it by stepping through the function in debugger.

Hope this helps,
Regards,
Eugene

-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Xavier Pouyollon
Sent: Tuesday, June 03, 2014 7:09 AM
To: TCF Development
Subject: [tcf-dev] Debugging tips for symbols

Hi,

Can someone share some debugging techniques when dealing with symbols ?
What are the important fields ?
 From a symbol object, how to understand it and know where it points in
the elf / dwarf sections ?

I'm trying to implement undef support for vxWorks and I'm facing the
following issue:
I'm processing the vxWorks file and try to add an elf_symbol:

add_elf_to_find_symbol_buf(ELF_SymbolInfo * elf_sym)
The elf_sym->value points to my fully linked vxWorks file.
nm vxWorks | grep taskIdCurrent gives me
0x602d7884.

The elf_sym->value is also 0x602d7884. So far, so good.

As far as I understand, it seems the only symbol to be added in the
symbol_buff.
But then my debugger display 0x0602ad820 instead of 0x602d7884.

The routine elf_tcf_symbol "converts" an elf_symbol into a TCF Symbol.

Then from this TCF Symbol, the address is computed again on a GetContext
and probably something goes wrong.

If you can share your debugging techniques, things to pay attention to
and even better a
big picture of how symbol management works, that would help me a lot !

Many Thanks !
Best Regards,
Xavier.

_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tcf-dev


This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.



Back to the top