x32: Fix gdb.trace/mi-trace-frame-collected.exp
authorPedro Alves <palves@redhat.com>
Fri, 19 Aug 2016 11:07:46 +0000 (12:07 +0100)
committerPedro Alves <palves@redhat.com>
Fri, 19 Aug 2016 11:13:47 +0000 (12:13 +0100)
commit0646e07d6e88045d650ee1ec5b674da1cdeaa6b6
treec98b69025c01de1c68407455ca3eb9c3486b86e0
parentf077e978deccac00fea013c4f120122bf6726834
x32: Fix gdb.trace/mi-trace-frame-collected.exp

gdb.trace/mi-trace-frame-collected.exp has a couple failures on x32:

 FAIL: gdb.trace/mi-trace-frame-collected.exp: live: -trace-frame-collected (register)
 FAIL: gdb.trace/mi-trace-frame-collected.exp: tfile: -trace-frame-collected (register)

gdb.log:

 -trace-frame-collected
 ^done,explicit-variables=[{name="gdb_char_test",value="0 '\\000'"}],computed-expressions=[],registers=[{number="16",value="0x4004dc"},{number="204",value="0x4004dc"}],tvars
 =[],memory=[{address="0x00601060",length="1"}]
 (gdb)
 FAIL: gdb.trace/mi-trace-frame-collected.exp: live: -trace-frame-collected (register)
[...]
 -trace-frame-collected
 ^done,explicit-variables=[{name="gdb_char_test",value="0 '\\000'"}],computed-expressions=[],registers=[{number="16",value="0x4004dc"},{number="204",value="0x4004dc"}],tvars
 =[],memory=[{address="0x00601060",length="1"}]
 (gdb)
 FAIL: gdb.trace/mi-trace-frame-collected.exp: tfile: -trace-frame-collected (register)

This test only collects the PC, and thus expects to only see one
register in the output of -trace-frame-collected.  However, while on
the 64-bit ABI gdb only exposes 64-bit $pc/$rip (register 16 above),
on x32, GDB exposes 32-bit $eip as well, as a pseudo-register
(register 204 above).  Thus, collecting $pc/$rip automatically always
collects $eip as well.

gdb/testsuite/ChangeLog:
2016-08-19  Pedro Alves  <palves@redhat.com>

* gdb.trace/mi-trace-frame-collected.exp
(test_trace_frame_collected): On x32, expect two registers.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/mi-trace-frame-collected.exp