aboutsummaryrefslogtreecommitdiff
path: root/gdb/ax-gdb.c
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-08 07:27:57 -0700
committerTom Tromey <tom@tromey.com>2021-03-08 07:28:22 -0700
commit14aff815df1efbbc573df75b7fc65017e9399c84 (patch)
tree951721757086aaeb65f51f802ebe4b64b7d1248b /gdb/ax-gdb.c
parent929f3aa7425dde2626bdf5b23277aee62ec75129 (diff)
downloadgdb-14aff815df1efbbc573df75b7fc65017e9399c84.zip
gdb-14aff815df1efbbc573df75b7fc65017e9399c84.tar.gz
gdb-14aff815df1efbbc573df75b7fc65017e9399c84.tar.bz2
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.
Diffstat (limited to 'gdb/ax-gdb.c')
-rw-r--r--gdb/ax-gdb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/ax-gdb.c b/gdb/ax-gdb.c
index f7ab50f..6471088 100644
--- a/gdb/ax-gdb.c
+++ b/gdb/ax-gdb.c
@@ -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");
}