Skip to main content

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

Not adding undefined symbol info into the list is not ideal. If it is all that available, it is better to return it than return nothing.

I think the best would be to replace "find_symbol_list == NULL" with a better check that would allow the search to continue if the list contains only undefined symbols. Also, sort_find_symbol_buf() might need changes to ensure that defined symbols are listed before undefined ones.

Regards,
Eugene

-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Xavier Pouyollon
Sent: Thursday, May 22, 2014 10:04 AM
To: TCF Development
Subject: [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.

_______________________________________________
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