Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Class name expression evaluation from MyClass::uFoo member in the Expressions view

Hi J.R.,

 

Your analysis looks correct. For user expressions with casting, scoping, sizeof, etc., find_symbol_by_name() should be able to return types, classes, namespaces, etc.

 

> One approach would be to reverse engineer the intended behavior …

 

The term “reverse engineer” is not really applicable here – you have all source code J

 

Regards,

Eugene

 

 

From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of JR Heisey
Sent: Monday, March 13, 2017 6:15 PM
To: tcf-dev@xxxxxxxxxxx
Subject: [tcf-dev] Class name _expression_ evaluation from MyClass::uFoo member in the Expressions view

 

Greetings,

 

I have a custom TCF agent which maps dwarf data from a proprietary file into something usable to the TCF agent.

I have an issue regarding static member variables of the form MyClass::uFoo. When a variable is entered into the Expressions view my _expression_ evaluation is not getting the MyClass class from the dwarf data in the appropriate context.

 

I am not certain at what point during the _expression_ evaluation is expecting to handle the ‘class MyClass’ type.

 

In my analysis:

·         The first lookup of MyClass is called by find_symbol_by_name() in symbols_mux.c.

·         My custom find_symbol_by_name() is called via the SymbolReader from symbols_mux.c

·         The current implementation of the custom find_symbol_by_name() contains switch(pObj->mTag) statement ignores the TAG_class_type and TAG_structure_type.

·         The logic in the custom find_symbol_by_name() only returns these tags:

TAG_variable

TAG_global_variable

TAG_formal_parameter

TAG_unspecified_parameters

TAG_local_variable

 

I hired someone else to write this custom agent and I’m trying to correct it. Budget and other circumstances won’t let me go back to the original programmer at this time. I have little experience with the agent code. Perhaps referencing the code which handles casting or scoping based when an identifier is a class?

 

One approach would be to reverse engineer the intended behavior by tracing the execution of the standard TCF agent.

I presume I would need to building a standard ELF file for Linux. I’m more of a Windows programmer so that would take some time.

 

Any other suggestions how to approach this?

 

Regards,

J.R. Heisey

Staff Software Engineer

Synaptics Inc

+1 408-904-1598

 



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