Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] breakpoints / access types

Hi Samuel,

> in context_plant_breakpoint() I need to know which breakpoint type

Use iterate_context_breakpoint_links() and get_breakpoint_attributes() to get all breakpoint attributes.

For example:

    iterate_context_breakpoint_links(ctx, cb, bp_link_cb, NULL);

static void bp_link_cb(BreakpointInfo * bi, void * x) {
    BreakpointAttribute * attrs = get_breakpoint_attributes(bi);
    while (attrs != NULL) {
        if (strcmp(attrs->name, BREAKPOINT_TYPE) == 0) {
            if (strcmp(attrs->value, "\"Hardware\"") == 0) hardware = 1;
            if (strcmp(attrs->value, "\"Software\"") == 0) software = 1;
        }
        attrs = attrs->next;
    }
}

Regards,
Eugene

-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Samuel Ghinet
Sent: Thursday, October 08, 2015 1:51 AM
To: tcf-dev@xxxxxxxxxxx
Subject: Re: [tcf-dev] breakpoints / access types

Hi Eugene,

 > When breakpoint type is "Auto", the breakpoints service asks debugger
backend to plant it as hardware bp. If backend rejects the request and
returns ERR_UNSUPPORTED, it is planted as software bp. Basically, your
implementation of context_plant_breakpoint() decides how to plant "Auto"
breakpoint by either planting it or returning ERR_UNSUPPORTED.

The debugger I'm working on is for a specific hardware which has support
for both software and hardware breakpoints. Therefore, in
context_plant_breakpoint() I need to know which breakpoint type the user
had requested: If he asked for a hardware breakpoint specifically, then
I can't insert a software breakpoint; if the user asked specifically for
a software breakpoint, then I can't insert a hardware breakpoint; and if
the user just let the default / did not specify, which translates as the
"Auto" type, then I need to know that it was "Auto", so that I can
insert a software breakpoint (this is a requirement).

The problem I'm having is that, in context_plant_breakpoint(), the
access_types is the same, whether the user had asked specifically for a
hardware breakpoint or left the default, so I can't know what the user
wanted. And I need to interpret the default ("Auto") as "Software"

I'm thinking that, if the CTX_BP_ACCESS_* also had a CTX_BP_ACCESS_AUTO,
it would allow the debugger implementations to choose for themselves
what the default should translate to.

Thanks,
Samuel
_______________________________________________
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