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] Fix cleanup in finish_command


> -----Original Message-----
> From: Metzger, Markus T
> Sent: Friday, June 21, 2013 10:23 AM


> > > Am I allowed to throw_error() in target functions?
> > > Or should I just warn and return normally?
> > > Or just return and not even warn?
> >
> > There isn't a technical reason why target functions could not throw.
> > One should just debug why the breakpoint is freed twice, I haven't done so
> > yet.
> 
> I can do this, but I won't be able to start right away.

Looks like throwing an error in the to_fetch_registers function is both
unexpected and unnecessary.  There is already a register_status enum
value to indicate that a register is not available.

When I simply return, I get exactly what I want, i.e. "info reg" prints all
registers except for rip as *value not available*.

I'll replace the throws with a simple return.  Also in to_store_registers
and to_xfer_partial.

Regards,
Markus.

Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: 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]