[Lldb-commits] [lldb] r370856 - [lldb][NFC] Rename ReadRegisterValue to PrintRegisterValue

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 4 02:18:10 PDT 2019


Author: teemperor
Date: Wed Sep  4 02:18:10 2019
New Revision: 370856

URL: http://llvm.org/viewvc/llvm-project?rev=370856&view=rev
Log:
[lldb][NFC] Rename ReadRegisterValue to PrintRegisterValue

That was the actual name I had in mind, but it seems git didn't pick
that change up when committing my previous commit.

Modified:
    lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=370856&r1=370855&r2=370856&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Wed Sep  4 02:18:10 2019
@@ -108,7 +108,7 @@ struct lldb_copy_dyld_cache_local_symbol
   uint32_t nlistCount;
 };
 
-static void ReadRegisterValue(RegisterContext *reg_ctx, const char *name,
+static void PrintRegisterValue(RegisterContext *reg_ctx, const char *name,
                               const char *alt_name, size_t reg_byte_size,
                               Stream &data) {
   const RegisterInfo *reg_info = reg_ctx->GetRegisterInfoByName(name);
@@ -201,27 +201,27 @@ public:
 
       data.PutHex32(GPRRegSet); // Flavor
       data.PutHex32(GPRWordCount);
-      ReadRegisterValue(reg_ctx, "rax", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "rbx", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "rcx", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "rdx", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "rdi", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "rsi", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "rbp", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "rsp", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "r8", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "r9", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "r10", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "r11", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "r12", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "r13", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "r14", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "r15", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "rip", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "rflags", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "cs", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "fs", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "gs", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rax", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rbx", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rcx", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rdx", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rdi", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rsi", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rbp", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rsp", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r8", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r9", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r10", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r11", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r12", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r13", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r14", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "r15", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rip", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "rflags", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "cs", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "fs", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "gs", nullptr, 8, data);
 
       //            // Write out the FPU registers
       //            const size_t fpu_byte_size = sizeof(FPU);
@@ -310,9 +310,9 @@ public:
       // Write out the EXC registers
       data.PutHex32(EXCRegSet);
       data.PutHex32(EXCWordCount);
-      ReadRegisterValue(reg_ctx, "trapno", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "err", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "faultvaddr", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "trapno", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "err", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "faultvaddr", nullptr, 8, data);
       return true;
     }
     return false;
@@ -406,29 +406,29 @@ public:
 
       data.PutHex32(GPRRegSet); // Flavor
       data.PutHex32(GPRWordCount);
-      ReadRegisterValue(reg_ctx, "eax", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "ebx", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "ecx", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "edx", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "edi", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "esi", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "ebp", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "esp", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "ss", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "eflags", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "eip", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "cs", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "ds", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "es", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "fs", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "gs", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "eax", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "ebx", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "ecx", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "edx", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "edi", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "esi", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "ebp", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "esp", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "ss", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "eflags", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "eip", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "cs", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "ds", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "es", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "fs", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "gs", nullptr, 4, data);
 
       // Write out the EXC registers
       data.PutHex32(EXCRegSet);
       data.PutHex32(EXCWordCount);
-      ReadRegisterValue(reg_ctx, "trapno", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "err", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "faultvaddr", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "trapno", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "err", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "faultvaddr", nullptr, 4, data);
       return true;
     }
     return false;
@@ -531,23 +531,23 @@ public:
 
       data.PutHex32(GPRRegSet); // Flavor
       data.PutHex32(GPRWordCount);
-      ReadRegisterValue(reg_ctx, "r0", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r1", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r2", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r3", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r4", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r5", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r6", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r7", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r8", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r9", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r10", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r11", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "r12", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "sp", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "lr", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "pc", nullptr, 4, data);
-      ReadRegisterValue(reg_ctx, "cpsr", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r0", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r1", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r2", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r3", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r4", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r5", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r6", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r7", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r8", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r9", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r10", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r11", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "r12", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "sp", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "lr", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "pc", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "cpsr", nullptr, 4, data);
 
       // Write out the EXC registers
       //            data.PutHex32 (EXCRegSet);
@@ -660,40 +660,40 @@ public:
 
       data.PutHex32(GPRRegSet); // Flavor
       data.PutHex32(GPRWordCount);
-      ReadRegisterValue(reg_ctx, "x0", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x1", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x2", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x3", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x4", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x5", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x6", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x7", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x8", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x9", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x10", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x11", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x12", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x13", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x14", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x15", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x16", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x17", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x18", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x19", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x20", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x21", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x22", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x23", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x24", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x25", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x26", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x27", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "x28", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "fp", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "lr", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "sp", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "pc", nullptr, 8, data);
-      ReadRegisterValue(reg_ctx, "cpsr", nullptr, 4, data);
+      PrintRegisterValue(reg_ctx, "x0", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x1", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x2", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x3", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x4", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x5", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x6", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x7", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x8", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x9", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x10", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x11", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x12", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x13", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x14", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x15", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x16", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x17", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x18", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x19", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x20", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x21", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x22", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x23", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x24", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x25", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x26", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x27", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "x28", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "fp", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "lr", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "sp", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "pc", nullptr, 8, data);
+      PrintRegisterValue(reg_ctx, "cpsr", nullptr, 4, data);
 
       // Write out the EXC registers
       //            data.PutHex32 (EXCRegSet);




More information about the lldb-commits mailing list