Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] Hardware breakpoint support in CDT

I looked at it. UI Proposal looks good. I just don't know if everybody 
needs this. This is the same question that is discussed right now with 
the catchpoints, how to make UI context sensitive and debugger sensitive...


John Cortell wrote:
> We already have it :-) And we're happy to contribute it. I've posted 
> the high level design document for people to consider. I'm waiting to 
> get some feedback on it. So far I haven't heard anything so it's hard 
> to move forward with it.
>
> John
>
> At 12:56 PM 4/15/2008, Mikhail Khodjaiants wrote:
>> Content-Class: urn:content-classes:message
>> Content-Type: multipart/alternative;
>> boundary="----_=_NextPart_001_01C89F22.126532A8"
>>
>> Hi Jiju,
>>
>> As I mentioned in my previous e-mail the simple addition of these 
>> flags wouldn't solve the problem. For example, one of the use cases 
>> is to try to set a hardware breakpoint, if it fails set a software 
>> breakpoint. This means that we would need an extra flag for this 
>> particular situation.
>> I would prefer a general solution and as far as I understand John 
>> Cortell from Freescale is looking at it.
>>
>> Regards,
>> Mikhail
>>
>> ------------------------------------------------------------------------
>> *From:* cdt-debug-dev-bounces@xxxxxxxxxxx [ 
>> mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] *On Behalf Of *Jiju George T
>> *Sent:* Tuesday, April 15, 2008 4:55 PM
>> *To:* 'CDT Debug developers list'
>> *Subject:* RE: [cdt-debug-dev] Hardware breakpoint support in CDT
>>
>> Mikhail,
>>
>> Can you please check the patch I submitted ( 
>> https://bugs.eclipse.org/bugs/attachment.cgi?id=95964) ?
>>
>> In the patch, I have added the breakpoint type as an attribute in 
>> ICBreakpoint instead of adding separate flags for different types:
>>
>> /**
>>
>> * Breakpoint attribute storing the type this breakpoint
>>
>> * is set in (value <code> "_org_ .eclipse._cdt_.debug.core.type" 
>> </code> ).
>>
>> * This attribute is a <code> _int_ </code> .
>>
>> * Possible values are
>>
>> * <code> ICDIBreakpoint.REGULAR </code>
>>
>> * <code> ICDIBreakpoint.HARDWARE </code>
>>
>> * <code> ICDIBreakpoint.TEMPORARY </code>
>>
>> *
>>
>> * * @since* 5.0
>>
>> */
>>
>> *public* *static* *final* String /TYPE/ = 
>> "org.eclipse.cdt.debug.core.type"; //$NON-NLS-1$
>>
>>
>>
>> This patch has nothing to do with how the UI for different 
>> breakpoints is modelled. It just passes the breakpoint type to 
>> underlying CDI model (which should have already been passed as per 
>> CDI design; else there is no point in the different breakpoint types 
>> defined in CDI model. Don’t know why. ). As the breakpoint type 
>> itself is used, if a new type of breakpoint is added to 
>> ICDIBreakpoint then that can also reach the CDI layer without 
>> requiring any changes.
>>
>> This will help persons like me who are trying to add custom 
>> breakpoint support using custom UI without needing a patched 
>> cdt.debug.core plug-in. As the UI proposal for hardware breakpoints 
>> will take more time to go into an official release, if we can apply 
>> this patch sooner that will be a small relief.
>>
>> Thanks,
>>
>> Jiju
>>
>> -----Original Message-----
>> From: cdt-debug-dev-bounces@xxxxxxxxxxx [ 
>> mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of Mikhail 
>> Khodjaiants
>> Sent: 15 April 2008 11:04
>> To: CDT Debug developers list
>> Subject: RE: [cdt-debug-dev] Hardware breakpoint support in CDT
>>
>> Adding one flag is not enough. Hardware breakpoint resources are limited
>>
>> for some architectures. One of the options in this case is to try to set
>>
>> a hardware breakpoint, but if it fails to set a software breakpoint.
>>
>> See Freescale's proposals for custom breakpoints.
>>
>> -----Original Message-----
>>
>> From: cdt-debug-dev-bounces@xxxxxxxxxxx
>>
>> [ mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of Elena Laskavaia
>>
>> Sent: Monday, April 14, 2008 5:06 PM
>>
>> To: CDT Debug developers list
>>
>> Subject: Re: [cdt-debug-dev] Hardware breakpoint support in CDT
>>
>> So how about we just add small patch that introduces _
>>
>> ICBreakpoint._/_HARDWARE_/ attribute and CDI change that takes this into
>>
>> account, without modifying all breakpoint creation functions?
>>
>> Jiju George T wrote:
>>
>> >
>>
>> >
>>
>> >
>>
>> > I am not much worried about the UI patch since I can add my own ruler
>>
>> > actions according to our product requirement without needing any
>>
>> > modifications in the cdt debug ui plugins. But the real issue I am
>>
>> > having is with the CDT CDI model.
>>
>> >
>>
>> >
>>
>> >
>>
>> > I have defined a new breakpoint type, a new marker and also added a
>>
>> > new attribute to the marker say HARDWARE. I have added this new
>>
>> > attribute also to the attribute map of CLineBreakpoint as shown below
>>
>> >
>>
>> >
>>
>> >
>>
>> > _HashMap_ attributes = *new* _HashMap_( 10 );
>>
>> >
>>
>> > _attributes.put( IBreakpoint._/_ID_/_,
>>
>> > /getPluginIdentifier/() )_;
>>
>> >
>>
>> > _attributes.put( IMarker._/_LINE_NUMBER_/_, _*_new_*_
>>
>> > Integer( lineNumber ) )_;
>>
>> >
>>
>> > _attributes.put( IBreakpoint._/_ENABLED_/_,
>>
>> > Boolean./valueOf/( enabled ) )_;
>>
>> >
>>
>> > _attributes.put( ICBreakpoint._/_IGNORE_COUNT_/_,
>>
>> > _*_new_*_ Integer( ignoreCount ) )_;
>>
>> >
>>
>> > _attributes.put( ICBreakpoint._/_CONDITION_/_, condition
>>
>> > )_;
>>
>> >
>>
>> > _attributes.put( ICBreakpoint._/_SOURCE_HANDLE_/_,
>>
>> > sourceHandle )_;
>>
>> >
>>
>> > _attributes.put(
>>
>> > ICBreakpoint._/_HARDWARE_/_,ICBreakpoint._/_HARDWARE_/_, true )_;
>>
>> >
>>
>> >
>>
>> >
>>
>> > *new* CHWLineBreakpoint( resource, attributes, register );
>>
>> >
>>
>> >
>>
>> >
>>
>> > But when CBreakpointManager processes this CLineBreakpoint, it always
>>
>> > call cdiTarget.setLineBreakpoint() passing type as
>>
>> > ICDIBreakpoint.REGULAR. It never passes on ICDIBreakpoint.HARWARE type
>>
>> > to CDI target. Due to this limitation of CBreakpointManager, hardware
>>
>> > breakpoint support in the CDI model is really not usable. If we can
>>
>> > apply the CDI model patch then at least the hardware breakpoint
>>
>> > feature in CDI model becomes useful.
>>
>> >
>>
>> >
>>
>> >
>>
>> > Regards,
>>
>> >
>>
>> > Jiju
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> > -----Original Message-----
>>
>> > From: cdt-debug-dev-bounces@xxxxxxxxxxx
>>
>> > [ mailto:cdt-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of Elena
>>
>> > Laskavaia
>>
>> > Sent: 14 April 2008 15:18
>>
>> > To: CDT Debug developers list
>>
>> > Subject: Re: [cdt-debug-dev] Hardware breakpoint support in CDT
>>
>> >
>>
>> >
>>
>> >
>>
>> > I think this is too specific to change in general UI.
>>
>> >
>>
>> > You can use breakpoint extension mechanism to add more attributes,
>>
>> > such
>>
>> >
>>
>> > as hardware breakpoint flag.
>>
>> >
>>
>> > To create them you have to create your own UI because current ui
>>
>> >
>>
>> > mechanism, such as double click on source like does not allow to
>>
>> > change
>>
>> >
>>
>> > attributes. To change this property you contribute property page, from
>>
>> >
>>
>> > there you can implement a call that would re-set breakpoint from
>>
>> >
>>
>> > software to hardware.
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> >
>>
>> > Jiju George T. wrote:
>>
>> >
>>
>> > >
>>
>> >
>>
>> > > Hi All,
>>
>> >
>>
>> > >
>>
>> >
>>
>> > > We are developing an embedded debugger based on Eclipse and CDT.
>>
>> > > I
>>
>> >
>>
>> > > am trying to add hardware breakpoints support. When I checked CDT
>>
>> > > CDI
>>
>> >
>>
>> > > model, I could see that ICDIBreakpoint interface already supports
>>
>> >
>>
>> > > hardware breakpoints. But CDT core classes like CBreakpoint ,
>>
>> >
>>
>> > > CBreakpointManager , CDIDebugModel etc and UI does not provide any
>>
>> >
>>
>> > > mechanism to create an ICDIBreakpoint of type
>>
>> ICDIBreakpoint.HARDWARE.
>>
>> >
>>
>> > >
>>
>> >
>>
>> > > When I searched CDT news groups and bugzilla, I came across below
>>
>> >
>>
>> > > enhancement request to add hardware breakpoint support to CDT CDI
>>
>> >
>>
>> > > model and UI.
>>
>> >
>>
>> > >
>>
>> >
>>
>> > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=118100
>>
>> >
>>
>> > >
>>
>> >
>>
>> > > Patches to add hardware breakpoint support in UI and model are
>>
>> >
>>
>> > > available in the above. Any idea on why this enhancement is on hold?
>>
>> >
>>
>> > > Is it because decision on a better UI for adding Toggle Hardware
>>
>> >
>>
>> > > breakpoints has not yet taken? If so then is there any possibility
>>
>> > > of
>>
>> >
>>
>> > > committing the CDI model related changes and leaving UI decision to
>>
>> >
>>
>> > > users? This will allow vendors to decide on the UI for hardware
>>
>> >
>>
>> > > breakpoint and use CDT plugins without applying any local patches
>>
>> > > for
>>
>> >
>>
>> > > adding hardware breakpoint support to CDI model.
>>
>> >
>>
>> > >
>>
>> >
>>
>> > > Thanks,
>>
>> >
>>
>> > >
>>
>> >
>>
>> > > Jiju George
>>
>> >
>>
>> > >
>>
>> >
>>
>> > >
>>
>> >
>>
>> > >
>>
>> >
>>
>> > _______________________________________________
>>
>> >
>>
>> > cdt-debug-dev mailing list
>>
>> >
>>
>> > cdt-debug-dev@xxxxxxxxxxx
>>
>> >
>>
>> > https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>>
>> >
>>
>> _______________________________________________
>>
>> cdt-debug-dev mailing list
>>
>> cdt-debug-dev@xxxxxxxxxxx
>>
>> https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>>
>> -- 
>>
>> IMPORTANT NOTICE: The contents of this email and any attachments are 
>> confidential and may also be privileged. If you are not the intended 
>> recipient, please notify the sender immediately and do not disclose 
>> the contents to any other person, use it for any purpose, or store or 
>> copy the information in any medium. Thank you.
>>
>> _______________________________________________
>>
>> cdt-debug-dev mailing list
>>
>> cdt-debug-dev@xxxxxxxxxxx
>>
>> https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
>>
>> -- 
>>
>> IMPORTANT NOTICE: The contents of this email and any attachments are 
>> confidential and may also be privileged. If you are not the intended 
>> recipient, please notify the sender immediately and do not disclose 
>> the contents to any other person, use it for any purpose, or store or 
>> copy the information in any medium. Thank you.
>> _______________________________________________
>> cdt-debug-dev mailing list
>> cdt-debug-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/cdt-debug-dev


Back to the top