Introduce unop_addr_operation

This adds class unop_addr_operation, which implements UNOP_ADDR.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* expop.h (class unop_addr_operation): New.
	* ax-gdb.c (gen_expr_unop) <case UNOP_ADDR>: New.
This commit is contained in:
Tom Tromey 2021-03-08 07:27:57 -07:00
parent 929f3aa742
commit 14aff815df
3 changed files with 46 additions and 0 deletions

View file

@ -2744,6 +2744,11 @@ gen_expr_unop (struct expression *exp,
gen_deref (value);
break;
case UNOP_ADDR:
lhs->generate_ax (exp, ax, value);
gen_address_of (value);
break;
default:
gdb_assert_not_reached ("invalid case in gen_expr_unop");
}