diff options
author | Tom Tromey <tom@tromey.com> | 2019-03-24 08:56:33 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-04-04 19:55:10 -0600 |
commit | fa9f5be6830e9245ee1ad1eab9725cc039d45d07 (patch) | |
tree | f3c07a37248af8681ed56a14a6c030878855c4d1 /gdb/parse.c | |
parent | 1201a264c8fd227737342345ab54e938295188b6 (diff) | |
download | gdb-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/parse.c')
-rw-r--r-- | gdb/parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/parse.c b/gdb/parse.c index 69c63da..e2d01e9 100644 --- a/gdb/parse.c +++ b/gdb/parse.c @@ -631,7 +631,7 @@ write_dollar_variable (struct parser_state *ps, struct stoken str) /* Handle tokens that refer to machine registers: $ followed by a register name. */ - i = user_reg_map_name_to_regnum (parse_gdbarch (ps), + i = user_reg_map_name_to_regnum (ps->gdbarch (), str.ptr + 1, str.length - 1); if (i >= 0) goto handle_register; @@ -1420,7 +1420,7 @@ insert_type_address_space (struct parser_state *pstate, char *string) element.piece = tp_space_identifier; insert_into_type_stack (slot, element); - element.int_val = address_space_name_to_int (parse_gdbarch (pstate), + element.int_val = address_space_name_to_int (pstate->gdbarch (), string); insert_into_type_stack (slot, element); } |