summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/macscp.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base/macscp.exp')
-rw-r--r--gdb/testsuite/gdb.base/macscp.exp10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp
index fa2173a417e..44a526b4fe4 100644
--- a/gdb/testsuite/gdb.base/macscp.exp
+++ b/gdb/testsuite/gdb.base/macscp.exp
@@ -227,6 +227,10 @@ list_and_check_macro macscp3_2 WHERE {macscp3.h macscp1.c {before macscp3_2}}
gdb_test "info macro FROM_COMMANDLINE" \
"Defined at \[^\r\n\]*:0\r\n-DFROM_COMMANDLINE=ARG"
+gdb_test "info macro __FILE__" "#define __FILE__ \".*macscp3.h\"" \
+ "info macro __FILE__ before running"
+gdb_test "info macro __LINE__" "#define __LINE__ 26" \
+ "info macro __LINE__ before running"
# Although GDB's macro table structures distinguish between multiple
# #inclusions of the same file, GDB's other structures don't. So the
@@ -466,7 +470,7 @@ gdb_test "print MACRO_TO_EXPAND" \
" = 0" \
"print expression with macro after removing override"
-gdb_test "next" "foo = 2;" "next to definition 2"
+gdb_test "next" "foo = 2;.*" "next to definition 2"
gdb_test "print MACRO_TO_EXPAND" \
"No symbol \"MACRO_TO_EXPAND\" in current context\." \
@@ -673,3 +677,7 @@ gdb_test_no_output "macro define si_addr fields.fault.si_addr" \
gdb_test "macro expand siginfo.si_addr" \
"expands to: siginfo.fields.fault.si_addr" \
"macro expand siginfo.si_addr"
+
+gdb_test "print __FILE__" " = \".*macscp1.c\""
+gdb_test "print __LINE__" \
+ " = [gdb_get_line_number {stopping point for line test}]"