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


Back to the top