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: "set record instruction-history" ?


> -----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


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