Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tcf-dev] Handling of undefined symbols

Hi,

I have a question on symbol management in TCF.

In VxWorks, we have the kernel (seen as P2 as TCF id).
A kernel module belongs to the kernel symbol_group. (A module is identified as P2.1240452 as TCF id)

A kernel module might have an unresolved symbol. Let's say taskIdCurrent.
The kernel has the definition of taskIdCurrent.
(For now, let's assume we have debug infos for both kernel and kernel module)

Currently, when I try to get the value of taskIdCurrent, I got N/A.
I've tried to debug and i'm getting lost.

As far as I understand it, find_symbol_by_name will call get_sym_context that will point to the kernel module object file, it will find the dwarf entry taskIdCurrent (as undefined). The find_in_dwarf will set the find_symbol_list.

Since find_symbol_list is not null, we won't go into the code that will try to see the definition in the other files (and memory map entries).

So I'd be tempted in case of undefined symbol that the find_symbol_list stay to NULL to force the search to continue : It should end-up in kernel and return me the definition.

Does that sound like a good approach to do or do you have better proposal ?

Thanks,
Best Regards,
Xavier.



Back to the top