- Also refactors TestRegisters.py because test_convenience_registers_with_process_attach now fails with an assert.
TODO: Cross-reference the skipOnLinux decorator with a bugzilla report after root-causing this issue.
llvm-svn: 181737
{ #reg, alt, 0, 0, eEncodingUint, \
eFormatHex, { kind1, kind2, kind3, kind4, gpr_##reg }, NULL, NULL }
+// Dummy data for RegisterInfo::value_regs as expected by DumpRegisterSet.
+static uint32_t value_regs = LLDB_INVALID_REGNUM;
+
#define DEFINE_GPR_i386(reg_i386, reg_x86_64, alt, kind1, kind2, kind3, kind4) \
{ #reg_i386, alt, GPR_i386_SIZE(reg_i386), 0, eEncodingUint, \
- eFormatHex, { kind1, kind2, kind3, kind4, gpr_##reg_i386 }, NULL, NULL }
+ eFormatHex, { kind1, kind2, kind3, kind4, gpr_##reg_i386 }, &value_regs, NULL }
#define DEFINE_FPR(reg, kind1, kind2, kind3, kind4) \
{ #reg, NULL, FPR_SIZE(reg), FPR_OFFSET(reg), eEncodingUint, \
self.buildDefault()
self.convenience_registers()
- @expectedFailureLinux # bugzilla 14600 - Convenience registers not fully supported on Linux
+ @skipOnLinux # Expression evaluation fails after attach by pid
def test_convenience_registers_with_process_attach(self):
"""Test convenience registers after a 'process attach'."""
if not self.getArchitecture() in ['x86_64']:
"""Test convenience registers."""
self.common_setup()
- # The command "register read -a" does output a derived register like eax.
+ # The command "register read -a" does output a derived register like eax...
self.expect("register read -a", matching=True,
substrs = ['eax'])
+ # ...however, the vanilla "register read" command should not output derived registers like eax.
+ self.expect("register read", matching=False,
+ substrs = ['eax'])
+
# Test reading of rax and eax.
self.expect("register read rax eax",
substrs = ['rax = 0x', 'eax = 0x'])
# Check that "register read eax" works.
self.runCmd("register read eax")
- # The vanilla "register read" command should not output derived registers like eax.
- self.expect("register read", matching=False,
- substrs = ['eax'])
-
self.expect("expr -- ($rax & 0xffffffff) == $eax",
substrs = ['true'])
+
self.expect("expr -- $ax == (($ah << 8) | $al)",
substrs = ['true'])