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,

What compiler are you using for your 8051 ?
Does this compiler generates dwarf debug informations ?
To know that, try objdump -h or readelf on the generated file.

If you can have a compiler for your 8051 that generates Dwarf information, nearly all the job is done because TCF handles Dwarf debug information format.

> 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.

Download a Dwarf specification : http://www.dwarfstd.org/doc/Dwarf3.pdf
You'll see the debug_infos is a kind of tree defining variables, function, scopes and will provide rules on how to compute a variable location, variable type.

If your compiler does not generate dwarf information, it should generate similar datas. Either you adapt the TCF code for these proprietatry datas or you write a converter that will generate Dwarf informations.

Hope it helps,
Best Regards,
Xavier.

On 06/13/2014 02:24 PM, Stefan.Falk@xxxxxxxxxxxx wrote:
Hi folks!

Since setting breakpoints and displaying register contents are already working, the next step would be to load and display the values of symbols/variables.

I see - from symbols_win32.c - that there are several functions that are dedicated to that task. I was now wondering what the best way would be to implement that for my i8051.

What I already have is a complete information structure of my program containing details like

-       Modules, holding
o       Global variables
o       Functions
-       Functions, holding
o       Start, end address
o       Local variables
-       Variables, holding
o       Location address (RAM, Register)
o       Scope information (in C code)
-       Memory Areas, holding
o       Modules (for faster program counter mapping)

So all that is missing is to integrate that into the agent.

What would the best way to do that? As I have e.g. the exact scope information of a variable it would be fastest and easiest if Eclipse would sent me file:line:scope. I debugged it and what I saw was that either find_by_name or find_by_address was called.

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.

So is there a way to get more information from Eclipse like the scope of the symbol?

Thanks and best regards!

--
Stefan Falk

Infineon Technologies Austria AG
Trainee
Automotive Sense and Control
Component Verification

Tel:  +43 (0)5 / 1777 - 5439
Email: stefan.falk@xxxxxxxxxxxx<mailto:stefan.falk@xxxxxxxxxxxx>

"Aim above the mark to hit the mark." - Ralph Waldo Emerson



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



Back to the top