[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [dsdp-dd-dev] Retrieving platform breakpoints in the BreakpointsMediator
|
Hello Pawel,
I have opened bug 263001
https://bugs.eclipse.org/bugs/show_bug.cgi?id=263001
about this.
Thanks,
Mario
-----Original Message-----
From: dsdp-dd-dev-bounces@xxxxxxxxxxx
[mailto:dsdp-dd-dev-bounces@xxxxxxxxxxx] On Behalf Of Pawel Piech
Sent: den 29 januari 2009 18:36
To: Device Debugging developer discussions
Subject: Re: [dsdp-dd-dev] Retrieving platform breakpoints inthe
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.
Cheers,
Pawel
Mario Pierro wrote:
> Hello,
>
> 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
> target,
> IBreakpointDMContext bdmc, DataRequestMonitor<IBreakpoint>
> dataRequestMonitor) {
> Map<IBreakpoint, List<IBreakpoints.IBreakpointDMContext>>
> platformBPs = fBreakpointDMContexts
> .get(target);
>
> dataRequestMonitor.setData(null);
> if (platformBPs != null)
> {
> for(Entry<IBreakpoint, List<IBreakpointDMContext>> e:
> platformBPs.entrySet())
> {
> // Stop at the first occurrence
> if(e.getValue().contains(bdmc))
> {
> dataRequestMonitor.setData(e.getKey());
> break;
> }
> }
> }
> 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?
>
> Thanks!
>
> /Mario
>
>
> _______________________________________________
> dsdp-dd-dev mailing list
> dsdp-dd-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/dsdp-dd-dev
>
_______________________________________________
dsdp-dd-dev mailing list
dsdp-dd-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dsdp-dd-dev