diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2010-04-01 20:02:10 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2010-04-01 20:02:10 +0000 |
commit | fe01d6681b7451f8ae035fc4d0e69e75fb14fdf7 (patch) | |
tree | 53ce09d70bc54564a91de4d7bc6cc6bb3560f53d /gdb/testsuite/gdb.arch | |
parent | bdabb07895854f0a2109bbbe9755b8ea6d6a9611 (diff) | |
download | gdb-fe01d6681b7451f8ae035fc4d0e69e75fb14fdf7.zip gdb-fe01d6681b7451f8ae035fc4d0e69e75fb14fdf7.tar.gz gdb-fe01d6681b7451f8ae035fc4d0e69e75fb14fdf7.tar.bz2 |
Support "ah", "bh", "ch", "dh" on amd64.
gdb/
2010-04-01 H.J. Lu <hongjiu.lu@intel.com>
* amd64-tdep.c (amd64_byte_names): Add "ah", "bh", "ch", "dh".
(AMD64_NUM_LOWER_BYTE_REGS): New.
(amd64_pseudo_register_read): Handle "ah", "bh", "ch", "dh".
(amd64_pseudo_register_write): Likewise.
(amd64_init_abi): Set num_byte_regs to 20.
gdb/testsuite/
2010-04-01 H.J. Lu <hongjiu.lu@intel.com>
* gdb.arch/amd64-byte.exp: Check "ah", "bh", "ch", "dh".
Diffstat (limited to 'gdb/testsuite/gdb.arch')
-rw-r--r-- | gdb/testsuite/gdb.arch/amd64-byte.exp | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.arch/amd64-byte.exp b/gdb/testsuite/gdb.arch/amd64-byte.exp index 9a14099..c76876b 100644 --- a/gdb/testsuite/gdb.arch/amd64-byte.exp +++ b/gdb/testsuite/gdb.arch/amd64-byte.exp @@ -52,7 +52,6 @@ if ![runto_main] then { gdb_suppress_tests } -set nr_regs 14 set byte_regs(1) al set byte_regs(2) bl set byte_regs(3) cl @@ -67,6 +66,10 @@ set byte_regs(11) r12l set byte_regs(12) r13l set byte_regs(13) r14l set byte_regs(14) r15l +set byte_regs(15) ah +set byte_regs(16) bh +set byte_regs(17) ch +set byte_regs(18) dh gdb_test "break [gdb_get_line_number "first breakpoint here"]" \ "Breakpoint .* at .*${srcfile}.*" \ @@ -79,12 +82,19 @@ for { set r 1 } { $r <= 6 } { incr r } { "check contents of %$byte_regs($r)" } +for { set r 1 } { $r <= 4 } { incr r } { + set h [expr $r + 14] + gdb_test "print/x \$$byte_regs($h)" \ + ".. = 0x[format %x $r]2" \ + "check contents of %$byte_regs($h)" +} + gdb_test "break [gdb_get_line_number "second breakpoint here"]" \ "Breakpoint .* at .*${srcfile}.*" \ "set second breakpoint in main" gdb_continue_to_breakpoint "continue to second breakpoint in main" -for { set r 7 } { $r <= $nr_regs } { incr r } { +for { set r 7 } { $r <= 14 } { incr r } { gdb_test "print/x \$$byte_regs($r)" \ ".. = 0x[format %x $r]1" \ "check contents of %$byte_regs($r)" @@ -94,6 +104,11 @@ for { set r 1 } { $r <= 6 } { incr r } { gdb_test "set var \$$byte_regs($r) = $r" "" "set %$byte_regs($r)" } +for { set r 1 } { $r <= 4 } { incr r } { + set h [expr $r + 14] + gdb_test "set var \$$byte_regs($h) = $h" "" "set %$byte_regs($h)" +} + gdb_test "break [gdb_get_line_number "third breakpoint here"]" \ "Breakpoint .* at .*${srcfile}.*" \ "set third breakpoint in main" @@ -105,7 +120,14 @@ for { set r 1 } { $r <= 6 } { incr r } { "check contents of %$byte_regs($r)" } -for { set r 7 } { $r <= $nr_regs } { incr r } { +for { set r 1 } { $r <= 4 } { incr r } { + set h [expr $r + 14] + gdb_test "print \$$byte_regs($h)" \ + ".. = $h" \ + "check contents of %$byte_regs($h)" +} + +for { set r 7 } { $r <= 14 } { incr r } { gdb_test "set var \$$byte_regs($r) = $r" "" "set %$byte_regs($r)" } @@ -114,7 +136,7 @@ gdb_test "break [gdb_get_line_number "forth breakpoint here"]" \ "set forth breakpoint in main" gdb_continue_to_breakpoint "continue to forth breakpoint in main" -for { set r 7 } { $r <= $nr_regs } { incr r } { +for { set r 7 } { $r <= 14 } { incr r } { gdb_test "print \$$byte_regs($r)" \ ".. = $r" \ "check contents of %$byte_regs($r)" |