aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.base/macscp.exp4
-rw-r--r--gdb/testsuite/gdb.base/macscp1.c14
3 files changed, 24 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 88cbff8b..cc5e365 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2008-12-11 Tom Tromey <tromey@redhat.com>
+
+ * gdb.base/macscp.exp: Print "address.addr".
+ * gdb.base/macscp1.c (struct outer): New struct.
+ (address): New global.
+
2008-12-09 Tom Tromey <tromey@redhat.com>
* gdb.base/commands.exp (redefine_backtrace_test): New proc.
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
index 9cb9ef5..f7553a5 100644
--- a/gdb/testsuite/gdb.base/macscp.exp
+++ b/gdb/testsuite/gdb.base/macscp.exp
@@ -415,6 +415,10 @@ gdb_test "break [gdb_get_line_number "set breakpoint here"]" \
gdb_test "continue" "foo = 0;.*" "continue to macsp_expr"
+gdb_test "print address.addr" \
+ " = 0" \
+ "print address.addr"
+
gdb_test "print MACRO_TO_EXPAND" \
"No symbol \"MACRO_TO_EXPAND\" in current context\." \
"print expression with macro before define."
diff --git a/gdb/testsuite/gdb.base/macscp1.c b/gdb/testsuite/gdb.base/macscp1.c
index 40f1217..e754b26 100644
--- a/gdb/testsuite/gdb.base/macscp1.c
+++ b/gdb/testsuite/gdb.base/macscp1.c
@@ -10,6 +10,20 @@
#define FORTY_EIGHT 48
#undef FORTY_EIGHT
+struct outer
+{
+ struct fields
+ {
+ struct fault
+ {
+ int addr;
+ } fault;
+ } fields;
+};
+struct outer address;
+
+#define addr fields.fault.addr
+
/* A macro named UNTIL_<func> is #defined until just before the
definition of the function <func>.