Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[dsdp-dd-dev] Retrieving platform breakpoints in the BreakpointsMediator


I am working with DSF 1.0RC4 release.

In our DSF debugger implementation, I am currently using the
BreakpointsMediator DSF service class to transform platform breakpoints
into target-specific ones.

However, I did not find an API way of translating a target breakpoint
back to a platform one, given the target breakpoint's
IBreakpointDMContext. The GDB reference implementation uses an augmented
version of BreakpointsMediator which makes that possible
(MIBreakpointsManager), but the process seems to be very GDB-specific.

Since the breakpoint maps in BreakpointsMediator are private, I have
added the following method to the BreakpointsMediator class:


    public void findPlatformBreakpoint(IBreakpointsTargetDMContext
            IBreakpointDMContext bdmc, DataRequestMonitor<IBreakpoint>
dataRequestMonitor) {
        Map<IBreakpoint, List<IBreakpoints.IBreakpointDMContext>>
platformBPs = fBreakpointDMContexts

        if (platformBPs != null)
            for(Entry<IBreakpoint, List<IBreakpointDMContext>> e:
                // Stop at the first occurrence


The method returns the first IBreakpoint associated to the given target
breakpoint context (as I understood, there should be at most one).

Should such method be part of the BreakpointsMediator service? Or am I
missing some other API way of tracing target breakpoints to their
platform counterparts?

Also, should the breakpoint maps in BreakpointsMediator be made
protected instead of private so that the breakpoint translation process
can be extended?



Back to the top