Skip to main content

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

Unfortunately, the BreakpointsMediator is a work in progress. I created it based on teh MI breakpoint manager and on our commercial debugger implementation, but I only took it far enough to make it work with PDA. Go ahead and submit your change in a bug and patch, and I'll look at it in that context. But keep in mind that whatever new APIs we create we'll have to maintain for a long time, so for example making the internal maps an API is probably not a good idea.


Mario Pierro wrote:

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
} } dataRequestMonitor.done();


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?



dsdp-dd-dev mailing list

Back to the top