PR macros/13205:
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / macscp.exp
index fa2173a417ec031bd4a950a4b695098bc1934035..44a526b4fe4eb38a950b7ac599612786bae7a1ea 100644 (file)
@@ -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}]"
This page took 0.025204 seconds and 4 git commands to generate.