This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH] Add the -catch-load and -catch-unload MI commands.


> -----Original Message-----
> From: Mircea Gherzan [mailto:mircea.gherzan@intel.com] 
> Sent: Monday, September 10, 2012 10:48 AM
> To: Pedro Alves
> Cc: Marc Khouzam; 'gdb-patches@sourceware.org'; 'mgherzan@gmail.com'
> Subject: Re: [PATCH] Add the -catch-load and -catch-unload MI 
> commands.
> 
> Hi,
> 
> Thank you for your feedback.
> 
> On 10.09.2012 16:09, Pedro Alves wrote:
>  > [...]
> > I don't this would be a good idea compared to separate 
> commands.  Each
> > of those catch variants takes different parameters/options.  I'm not
> > seeing what putting them all under the same roof would buy.
> 
> I am still in favour of having them as separate commands, but, if the 
> powers that be decide otherwise, I am willing to rework the patch.
> 
> > In the CLI, although "catch exec", "catch fork", "catch 
> syscall", etc.
> > have the same prefix, they're really implemented as 
> separate commands
> > as well.
> >
> 
> Please let me know if there are any issues that prevent this 
> patch from getting merged.

An enhancement that would be nice (but may not be blocking) is
to support a '-d' flag like -break-insert does.  This would
create the catchpoint in a disabled state.

Currently, a frontend that wants to create a disabled catchpoint
must do:
 catch load
 -break-disabled 1 (assuming the catchpoint number is 1)

in non-stop mode, this can cause a race condition where the 
catchpoint could hit before it is disabled.  It would be better 
to do a single command:
  -catch-load -d

Note that I've never actually seen this happen, but I believe
the risk is there.

BTW, we have the same potential problem with watchpoints 
which use -break-watch.

Thanks for these proposed new MI commands, they will be useful
for Eclipse.

Marc



> 
> Thanks,
> Mircea
> 
> -- 
> 
> Intel GmbH
> Dornacher Strasse 1
> 85622 Feldkirchen/Muenchen, Deutschland
> Sitz der Gesellschaft: Feldkirchen bei Muenchen
> Geschaeftsfuehrer: Peter Gleissner, Christian Lamprechter, 
> Hannes Schwaderer, Douglas Lusk
> Registergericht: Muenchen HRB 47456
> Ust.-IdNr./VAT Registration No.: DE129385895
> Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]