diff options
author | Pedro Alves <palves@redhat.com> | 2008-05-03 22:30:51 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2008-05-03 22:30:51 +0000 |
commit | d705c43c5aa1551e91d5dfbd73ea8d4ba0f0758d (patch) | |
tree | 0cd3088b8c0e98bdfd64cabdde74bbf4e453d9e6 /gdb/testsuite/gdb.base/macscp.exp | |
parent | d6350901aab6846f8a3ad3f519d0e1cc37a5d677 (diff) | |
download | gdb-d705c43c5aa1551e91d5dfbd73ea8d4ba0f0758d.zip gdb-d705c43c5aa1551e91d5dfbd73ea8d4ba0f0758d.tar.gz gdb-d705c43c5aa1551e91d5dfbd73ea8d4ba0f0758d.tar.bz2 |
gdb/
* parse.c (parse_exp_in_context): Don't override
expression_context_pc if get_selected_block returned a valid
block.
gdb/testsuite/
* gdb.base/macscp.exp, gdb.base/macscp1.c: Add test for printing
expressions with macros.
Diffstat (limited to 'gdb/testsuite/gdb.base/macscp.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/macscp.exp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/macscp.exp b/gdb/testsuite/gdb.base/macscp.exp index b04fc06..ccefc85 100644 --- a/gdb/testsuite/gdb.base/macscp.exp +++ b/gdb/testsuite/gdb.base/macscp.exp @@ -24,6 +24,7 @@ if $tracelevel then { set prms_id 0 set bug_id 0 +set srcfile macscp1.c set testfile "macscp" set binfile ${objdir}/${subdir}/${testfile} @@ -405,3 +406,25 @@ for {set i 0} {$i < [llength $funcs]} {incr i} { } } } + +gdb_test "break [gdb_get_line_number "set breakpoint here"]" \ + "Breakpoint.*at.* file .*, line.*" \ + "breakpoint macscp_expr" + +gdb_test "continue" "foo = 0;.*" "continue to macsp_expr" + +gdb_test "print M" \ + "No symbol \"M\" in current context\." \ + "print expression with macro before define." + +gdb_test "next" "foo = 1;" "next to definition" + +gdb_test "print M" \ + " = 0" \ + "print expression with macro in scope." + +gdb_test "next" "foo = 2;" "next to definition" + +gdb_test "print M" \ + "No symbol \"M\" in current context\." \ + "print expression with macro after undef." |