Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Find Symbol by Name, Address, Scope

Hi Stefan,

On 06/13/2014 02:24 PM, Stefan.Falk@xxxxxxxxxxxx wrote:
Is find_by_address only called if find_by_name didn't succeed?
I don't really understand either how a name should be enough since there could be thousands of "int i;" declarations spread over a program. With no further information (like scope or PC location) this task seems impossible to me.

If you look at the signature of find_symbol_by_name you will see that one of the parameters is the frame.

You can use STACK_NO_FRAME to get a global symbol or use a specific frame number to only get the symbol visible in this level of the stack trace.

It is the job of the symbol reader to be able to find the correct symbol entry in the debug info based on this frame number.

In fact this can be seen in Eclipse when opening the Variables view: selecting different frames in the stack trace will show different variables in the view.

- Christophe


Back to the top