diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-03-06 21:33:38 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-03-06 21:33:38 +0000 |
commit | 19e08fb3c990098cfc35353ce30f8a319b3d3cf9 (patch) | |
tree | b6ef100f5301d954d75aca932b44c78e352ab35c | |
parent | 05102e700f432b759dd94d873a366c5085d40351 (diff) | |
download | gdb-19e08fb3c990098cfc35353ce30f8a319b3d3cf9.zip gdb-19e08fb3c990098cfc35353ce30f8a319b3d3cf9.tar.gz gdb-19e08fb3c990098cfc35353ce30f8a319b3d3cf9.tar.bz2 |
2000-03-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* mi-disassemble.exp: Don't assume numbers for the offset
values. They can be different depending on the architecture.
* mi-watch.exp (test_watchpoint_triggering): In same cases the
type can be 'hw wathcpoint' not just 'watchpoint'. Adjust for that.
* basics.c (callee4): Make the function return something,
otherwise the return value is undefined.
-rw-r--r-- | gdb/testsuite/gdb.mi/ChangeLog-mi | 11 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/basics.c | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-disassemble.exp | 18 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-watch.exp | 2 |
4 files changed, 24 insertions, 11 deletions
diff --git a/gdb/testsuite/gdb.mi/ChangeLog-mi b/gdb/testsuite/gdb.mi/ChangeLog-mi index 287e37f..54cd191 100644 --- a/gdb/testsuite/gdb.mi/ChangeLog-mi +++ b/gdb/testsuite/gdb.mi/ChangeLog-mi @@ -1,5 +1,16 @@ 2000-03-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com> + * mi-disassemble.exp: Don't assume numbers for the offset + values. They can be different depending on the architecture. + + * mi-watch.exp (test_watchpoint_triggering): In same cases the + type can be 'hw wathcpoint' not just 'watchpoint'. Adjust for that. + + * basics.c (callee4): Make the function return something, + otherwise the return value is undefined. + +2000-03-06 Elena Zannoni <ezannoni@kwikemart.cygnus.com> + * mi-basics.exp: Comment out test for a still unimplemented operation. * mi-disassemble.exp: Rewrite most of the tests to conform to new diff --git a/gdb/testsuite/gdb.mi/basics.c b/gdb/testsuite/gdb.mi/basics.c index 52fe0ed..ca8db98 100644 --- a/gdb/testsuite/gdb.mi/basics.c +++ b/gdb/testsuite/gdb.mi/basics.c @@ -3,15 +3,15 @@ * on function calls. Useful to test printing frames, stepping, etc. */ -callee4 (void) +int callee4 (void) { int A=1; int B=2; int C; C = A + B; + return 0; } - callee3 (char *strarg) { callee4 (); diff --git a/gdb/testsuite/gdb.mi/mi-disassemble.exp b/gdb/testsuite/gdb.mi/mi-disassemble.exp index 26ec9ef..79eaefb 100644 --- a/gdb/testsuite/gdb.mi/mi-disassemble.exp +++ b/gdb/testsuite/gdb.mi/mi-disassemble.exp @@ -90,6 +90,7 @@ proc test_running_the_program {} { proc test_disassembly_only {} { global mi_gdb_prompt global hex + global decimal # Test disassembly more only for the current function. # Tests: @@ -98,17 +99,18 @@ proc test_disassembly_only {} { mi_gdb_test "print/x \$pc" "" "" mi_gdb_test "111-data-disassemble -s \$pc -e \"\$pc + 12\" -- 0" \ - "111\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"4\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"8\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"12\",inst=\".*\"\}\}" \ + "111\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\},\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\}" \ "data-disassemble from pc to pc+12 assembly only" mi_gdb_test "222-data-disassemble -f basics.c -l 32 -- 0" \ - "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"100\",inst=\".*\"\}\}" \ + "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \ "data-disassemble file & line, assembly only" } proc test_disassembly_lines_limit {} { global mi_gdb_prompt global hex + global decimal # Test disassembly more only for the current function. # Tests: @@ -118,7 +120,7 @@ proc test_disassembly_lines_limit {} { mi_gdb_test "print/x \$pc" "" "" mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 0" \ - "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"76\",inst=\".*\"\}\}" \ + "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \ "data-disassemble file, line, number assembly only" mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 0 -- 0" \ @@ -126,7 +128,7 @@ proc test_disassembly_lines_limit {} { "data-disassemble file, line, number (zero lines) assembly only" mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 50 -- 0" \ - "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"100\",inst=\".*\"\}\}" \ + "222\\^done,asm_insns=\{\{address=\"$hex\",func-name=\"main\",offset=\"0\",inst=\".*\"\},.*,\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}" \ "data-disassemble file, line, number (more than main lines) assembly only" } @@ -151,7 +153,7 @@ proc test_disassembly_mixed {} { # which we are now, even if we have specified that the range is only 2 insns. # mi_gdb_test "003-data-disassemble -s \$pc -e \"\$pc+4\" -- 1" \ - "003\\^done,asm_insns=\{src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"main\",offset=\"4\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}\}\}" \ + "003\\^done,asm_insns=\{src_and_asm_line=\{line=\"$decimal\",file=\".*basics.c\",line_asm_insn=\{\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}.*\{address=\"$hex\",func-name=\"main\",offset=\"$decimal\",inst=\".*\"\}\}\}\}" \ "data-disassemble range assembly mixed" } @@ -162,9 +164,9 @@ proc test_disassembly_mixed_lines_limit {} { # Test disassembly more only for the current function. # Tests: - # -data-disassembly -f basics.c -l 32 -n 20 -- 0 - # -data-disassembly -f basics.c -l 32 -n 0 -- 0 - # -data-disassembly -f basics.c -l 32 -n 50 -- 0 + # -data-disassembly -f basics.c -l 32 -n 20 -- 1 + # -data-disassembly -f basics.c -l 32 -n 0 -- 1 + # -data-disassembly -f basics.c -l 32 -n 50 -- 1 mi_gdb_test "print/x \$pc" "" "" mi_gdb_test "222-data-disassemble -f basics.c -l 32 -n 20 -- 1" \ diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp index 6c81106..bb26f5c 100644 --- a/gdb/testsuite/gdb.mi/mi-watch.exp +++ b/gdb/testsuite/gdb.mi/mi-watch.exp @@ -61,7 +61,7 @@ proc test_watchpoint_creation_and_listing {} { "break-watch operation" mi_gdb_test "222-break-list" \ - "222\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"1\"\},bkpt=\{number=\"2\",type=\"watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\}" \ + "222\\^done,BreakpointTable=\{hdr=\{.*\},bkpt=\{number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"callee4\",file=\".*basics.c\",line=\"8\",times=\"1\"\},bkpt=\{number=\"2\",type=\".*watchpoint\",disp=\"keep\",enabled=\"y\",addr=\"\",what=\"C\",times=\"0\"\}\}" \ "list of watchpoints" } |