aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-lex.l
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2019-03-24 08:56:33 -0600
committerTom Tromey <tom@tromey.com>2019-04-04 19:55:10 -0600
commitfa9f5be6830e9245ee1ad1eab9725cc039d45d07 (patch)
treef3c07a37248af8681ed56a14a6c030878855c4d1 /gdb/ada-lex.l
parent1201a264c8fd227737342345ab54e938295188b6 (diff)
downloadgdb-fa9f5be6830e9245ee1ad1eab9725cc039d45d07.zip
gdb-fa9f5be6830e9245ee1ad1eab9725cc039d45d07.tar.gz
gdb-fa9f5be6830e9245ee1ad1eab9725cc039d45d07.tar.bz2
Turn parse_gdbarch into a method
This changes parse_gdbarch into a method of parser_state. This patch was written by a script. gdb/ChangeLog 2019-04-04 Tom Tromey <tom@tromey.com> * rust-exp.y: Replace "parse_gdbarch" with method call. * parse.c (write_dollar_variable, insert_type_address_space): Replace "parse_gdbarch" with method call. * p-exp.y (parse_type, yylex): Replace "parse_gdbarch" with method call. * objc-lang.c (end_msglist): Replace "parse_gdbarch" with method call. * m2-exp.y (parse_type, parse_m2_type, yylex): Replace "parse_gdbarch" with method call. * go-exp.y (parse_type, classify_name): Replace "parse_gdbarch" with method call. * f-exp.y (parse_type, parse_f_type, yylex): Replace "parse_gdbarch" with method call. * d-exp.y (parse_type, parse_d_type, lex_one_token): Replace "parse_gdbarch" with method call. * c-exp.y (parse_type, parse_number, classify_name): Replace "parse_gdbarch" with method call. * ada-lex.l: Replace "parse_gdbarch" with method call. * ada-exp.y (parse_type, find_primitive_type, type_char) (type_system_address): Replace "parse_gdbarch" with method call.
Diffstat (limited to 'gdb/ada-lex.l')
-rw-r--r--gdb/ada-lex.l8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/ada-lex.l b/gdb/ada-lex.l
index 05af013..17ac7e5 100644
--- a/gdb/ada-lex.l
+++ b/gdb/ada-lex.l
@@ -370,11 +370,11 @@ processInt (struct parser_state *par_state, const char *base0,
exp -= 1;
}
- if ((result >> (gdbarch_int_bit (parse_gdbarch (par_state))-1)) == 0)
+ if ((result >> (gdbarch_int_bit (par_state->gdbarch ())-1)) == 0)
yylval.typed_val.type = type_int (par_state);
- else if ((result >> (gdbarch_long_bit (parse_gdbarch (par_state))-1)) == 0)
+ else if ((result >> (gdbarch_long_bit (par_state->gdbarch ())-1)) == 0)
yylval.typed_val.type = type_long (par_state);
- else if (((result >> (gdbarch_long_bit (parse_gdbarch (par_state))-1)) >> 1) == 0)
+ else if (((result >> (gdbarch_long_bit (par_state->gdbarch ())-1)) >> 1) == 0)
{
/* We have a number representable as an unsigned integer quantity.
For consistency with the C treatment, we will treat it as an
@@ -384,7 +384,7 @@ processInt (struct parser_state *par_state, const char *base0,
assignment does the trick (no, it doesn't; read the reference manual).
*/
yylval.typed_val.type
- = builtin_type (parse_gdbarch (par_state))->builtin_unsigned_long;
+ = builtin_type (par_state->gdbarch ())->builtin_unsigned_long;
if (result & LONGEST_SIGN)
yylval.typed_val.val =
(LONGEST) (result & ~LONGEST_SIGN)