This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: "set record instruction-history" ?
- From: "Metzger, Markus T" <markus dot t dot metzger at intel dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>
- Date: Tue, 26 Mar 2013 07:46:08 +0000
- Subject: RE: "set record instruction-history" ?
- References: <51507403 dot 6030208 at redhat dot com> <A78C989F6D9628469189715575E55B2307BA7E4F at IRSMSX102 dot ger dot corp dot intel dot com> <51508D60 dot 6040906 at redhat dot com>
> -----Original Message-----
> From: Pedro Alves [mailto:palves@redhat.com]
> Sent: Monday, March 25, 2013 6:46 PM
> To: Metzger, Markus T
> +static void
> +validate_positive_integer (int *command_var, int *setting)
> +{
> + if (*command_var < 0)
> + {
> + int var = *command_var;
> +
> + /* Restore previous value. */
> + *command_var = *setting;
> + error (_("integer %d out of range"), var);
> + }
> +
> + /* Commit new value. */
> + *setting = *command_var;
> +}
Shouldn't we map 0 to INT_MAX before committing the new value?
The functionality should be covered by the gdb.btrace test suite. Do you want
to commit your patch or do you want me to test and then commit it?
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