This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [patch] Fix cleanup in finish_command
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "Pedro Alves (palves at redhat dot com)" <palves at redhat dot com>
- Date: Tue, 2 Jul 2013 14:50:45 +0000
- Subject: RE: [patch] Fix cleanup in finish_command
- References: <20130619211444 dot GA29379 at host2 dot jankratochvil dot net> <20130620143118 dot GA11929 at host2 dot jankratochvil dot net> <20130620151806 dot GD4724 at adacore dot com> <A78C989F6D9628469189715575E55B230A96FABA at IRSMSX104 dot ger dot corp dot intel dot com> <20130620161945 dot GA16142 at host2 dot jankratochvil dot net> <A78C989F6D9628469189715575E55B230A96FF66 at IRSMSX104 dot ger dot corp dot intel dot com> <20130621081409 dot GA30052 at host2 dot jankratochvil dot net> <A78C989F6D9628469189715575E55B230A96FFB6 at IRSMSX104 dot ger dot corp dot intel dot com>
> -----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