Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] PPC64 v2 breakpoint support.

Hi Xavier,

> What's the best way to detect that we have a "pure symbol"...

In such case either Value.sym or Value.sym_list != NULL.

> From Value, we can retrieve the symbol and compare the name with bp->location.

No, you don't have to do that. Just check for != NULL, then get local entry offset and add it. This should be sufficient. For "print+0x20", sym should be NULL. If the symbol is not a PPC64 function, offset should be 0, so it is safe to add it always when sym != NULL.

Regards,
Eugene

-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Xavier Pouyollon
Sent: Tuesday, April 28, 2015 8:54 AM
To: TCF Development
Subject: [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.



_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tcf-dev


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