diff options
author | Caroline Tice <ctice@apple.com> | 2011-04-08 23:33:06 +0000 |
---|---|---|
committer | Caroline Tice <ctice@apple.com> | 2011-04-08 23:33:06 +0000 |
commit | 25d61ac2ed3f3bfad00d43b1ca94b1a32649cf0a (patch) | |
tree | 67a4c6b9f658dea252289c67890f499d32337703 /lldb/source/API | |
parent | e094ee0a34fe8acd6073ec16c19720a89504780d (diff) | |
download | bcm5719-llvm-25d61ac2ed3f3bfad00d43b1ca94b1a32649cf0a.tar.gz bcm5719-llvm-25d61ac2ed3f3bfad00d43b1ca94b1a32649cf0a.zip |
Fix various things in the instruction emulation code:
- Add ability to control whether or not the emulator advances the
PC register (in the emulation state), if the instruction itself
does not change the pc value..
- Fix a few typos in asm description strings.
- Fix bug in the carry flag calculation.
llvm-svn: 129168
Diffstat (limited to 'lldb/source/API')
-rw-r--r-- | lldb/source/API/SBInstruction.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/lldb/source/API/SBInstruction.cpp b/lldb/source/API/SBInstruction.cpp index e46e8696ed0..a4ab1558fd0 100644 --- a/lldb/source/API/SBInstruction.cpp +++ b/lldb/source/API/SBInstruction.cpp @@ -116,7 +116,7 @@ SBInstruction::Print (FILE *out) } bool -SBInstruction::EmulateWithFrame (lldb::SBFrame &frame) +SBInstruction::EmulateWithFrame (lldb::SBFrame &frame, bool auto_advance_pc) { if (m_opaque_sp && frame.get()) { @@ -126,6 +126,7 @@ SBInstruction::EmulateWithFrame (lldb::SBFrame &frame) lldb_private::ArchSpec arch = target->GetArchitecture(); return m_opaque_sp->Emulate (arch, + auto_advance_pc, (void *) frame.get(), &lldb_private::EmulateInstruction::ReadMemoryFrame, &lldb_private::EmulateInstruction::WriteMemoryFrame, @@ -142,12 +143,8 @@ SBInstruction::DumpEmulation (const char *triple) { lldb_private::ArchSpec arch (triple, NULL); - return m_opaque_sp->Emulate (arch, - NULL, - &lldb_private::EmulateInstruction::ReadMemoryDefault, - &lldb_private::EmulateInstruction::WriteMemoryDefault, - &lldb_private::EmulateInstruction::ReadRegisterDefault, - &lldb_private::EmulateInstruction::WriteRegisterDefault); + return m_opaque_sp->DumpEmulation (arch); + } return false; } |