diff options
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index 8b2d55e..bccfc78 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -368,8 +368,7 @@ void set_breakpoint_count (int num) { breakpoint_count = num; - set_internalvar (lookup_internalvar ("bpnum"), - value_from_longest (builtin_type_int32, (LONGEST) num)); + set_internalvar_integer (lookup_internalvar ("bpnum"), num); } /* Used in run_command to zero the hit count when a new run starts. */ @@ -421,16 +420,15 @@ get_number_trailer (char **pp, int trailer) to pass to lookup_internalvar(). */ char *varname; char *start = ++p; - struct value *val; + LONGEST val; while (isalnum (*p) || *p == '_') p++; varname = (char *) alloca (p - start + 1); strncpy (varname, start, p - start); varname[p - start] = '\0'; - val = value_of_internalvar (lookup_internalvar (varname)); - if (TYPE_CODE (value_type (val)) == TYPE_CODE_INT) - retval = (int) value_as_long (val); + if (get_internalvar_integer (lookup_internalvar (varname), &val)) + retval = (int) val; else { printf_filtered (_("Convenience variable must have integer value.\n")); @@ -8275,8 +8273,7 @@ static void set_tracepoint_count (int num) { tracepoint_count = num; - set_internalvar (lookup_internalvar ("tpnum"), - value_from_longest (builtin_type_int32, (LONGEST) num)); + set_internalvar_integer (lookup_internalvar ("tpnum"), num); } void |