[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[tcf-dev] PPC64 v2 breakpoint support.
|
Hi Eugene,
We continue the support of PPC64 v2
In PPC64 v2, a function has
- an @, which is the global @
- a local entry point which is an offset retrieved from st_other
associated to the symbol.
When we put a breakpoint on a symbol, we want to put the breakpoint at
local_entry, not the global @.
(because compiler can jump directly to the local entry point if called
from the same module).
Let's say print
0x400
Local entry offset : 8
If we issue a Breakpoints add "Location":"print", we want the breakpoint
to be put at 0x400 + Local entry offset aka 0x408
However, if we issue Breakpoints add "Location":"print+0x20" we want the
breakpoint to be put at 0x420.
However, if we issue Breakpoint add "Location":"0x440", we want the
breakpoint to be put at 0x440.
So far, I have changed symbols to return a new property
"LocalEntryOffset" returned only for PPC64. So far, so good.
My question: What's the best way to detect that we have a "pure symbol"
(understand "Location":"print") so I can retrieve the LocalEntryOffset ?
So far, the idea is to edit plant_at_address_expression.
From Value, we can retrieve the symbol and compare the name with
bp->location. If identical, we can retrieve the LocalOffset (through
get_symbol_props, I love this routine) and add it to computed address
given by value_to_address.
Does that seem a good approach to you ?
Thanks !
Xavier.