Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [dsdp-tcf-dev] ISymbols, scope information and symbol addresses

Hi Torleif,

> what is the meaning of asking a symbol context for it's address with
getAddress() when these contexts only represent a static view of symbol
information?

getAddress() can return symbol address if it is known statically -
without stack frame, otherwise it should return null.

> I am also wondering how an objectfile pathname to parse is
communicated to an ISymbols implementation?

When Expressions service searches for a symbol it finds objectfile
pathname from instruction pointer, then symbol in that file is assigned
a unique ID. By looking at the ID, Symbols service knows the filepath
and other details about symbol location, like offset in debug section or
symbol table index. For example, in current implementation of ELF
symbols reader, symbol ID includes file device number and inode.

Regards,
Eugene


-----Original Message-----
From: dsdp-tcf-dev-bounces@xxxxxxxxxxx
[mailto:dsdp-tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Sandnes, Torleif
Sent: Wednesday, November 11, 2009 6:22 AM
To: DSDP TCF dev list
Subject: RE: [dsdp-tcf-dev] ISymbols, scope information and symbol
addresses

Hi Eugene.

Thanks for an informative answer. I have some additional questions:

>> ... how would one be able to get the value of symbols with this
interface if the address in the symbol information is not an absolute
address but use some addressing mode, or if the symbol was optimized and
its address varies with program counter?

> Yes, symbol address is dynamic information and it depends on program
counter, stack frame, process ID, etc. Lookup and evaluation of symbols
in a given context is provided by Expressions service. You can use
Expressions service to evaluate an address. For example, if you have a
local variable "int x;", you can evaluate expression "&x" on a
particular stack frame to get address of x.

I can relate to that. 
But what is the meaning of asking a symbol context for it's address with
getAddress() when these contexts only represent a static view of symbol
information?

I am also wondering how an objectfile pathname to parse is communicated
to an ISymbols implementation? I cannot see how this can be done with
the current ISymbols interface. Is this done through another service? 

Regards,

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


Back to the top