[Lldb-commits] [PATCH] First cut of PowerPC(64) support in LLDB.

Ed Maste emaste at freebsd.org
Thu Oct 30 20:05:35 PDT 2014


REPOSITORY
  rL LLVM

================
Comment at: source/Core/ArchSpec.cpp:22
@@ -21,2 +21,3 @@
 #include "lldb/Utility/SafeMachO.h"
+#include "lldb/Core/Log.h"
 #include "lldb/Core/RegularExpression.h"
----------------
Leftover from earlier debugging?


================
Comment at: source/Host/freebsd/Host.cpp:304
@@ +303,3 @@
+
+    ps_strings_addr = (void *)0xffffdff0;
+    pid.piod_op = PIOD_READ_D;
----------------
Do we have a source for the magic constant?

================
Comment at: source/Host/freebsd/Host.cpp:312
@@ +311,3 @@
+        buf_ap.release();
+        goto done;
+    }
----------------
can we just return buf_sp here instead?

================
Comment at: source/Plugins/ABI/CMakeLists.txt:2-3
@@ -1,2 +1,4 @@
 add_subdirectory(SysV-hexagon)
+add_subdirectory(SysV-ppc64)
+add_subdirectory(SysV-ppc)
 add_subdirectory(SysV-x86_64)
----------------
ppc should sort before ppc64

================
Comment at: source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp:264
@@ +263,3 @@
+
+    if (args.size() > 8) // TODO handle more than 8 arguments
+        return false;
----------------
Should we have a log for this?

================
Comment at: source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp:634
@@ +633,3 @@
+        {
+            if (type_flags & eTypeIsComplex)
+            {
----------------
Debug log or error return for these cases?

================
Comment at: source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp:1032
@@ +1031,3 @@
+        const char *name = reg_info->name;
+        if (name[0] == 'r')
+        {
----------------
you should be able to use a register ID in kinds here rather than comparing strings, I'd think

================
Comment at: source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp:331
@@ +330,3 @@
+	case llvm::Triple::ppc64:
+		{
+			static const uint8_t g_ppc_opcode[] = { 0x7f, 0xe0, 0x00, 0x08 };
----------------
Maybe a phabricator issue, but whitespace seems off here - tabs vs. spaces?

================
Comment at: source/Plugins/Process/elf-core/RegisterContextPOSIXCore_powerpc.cpp:51
@@ +50,3 @@
+{
+    assert(0);
+    return false;
----------------
llvm_unreachable("powerpc::WriteFPR unimplemented"); perhaps?

================
Comment at: source/Target/Thread.cpp:2284-2285
@@ -2283,2 +2283,4 @@
             case llvm::Triple::mips64:
+            case llvm::Triple::ppc64:
+            case llvm::Triple::ppc:
             case llvm::Triple::hexagon:
----------------
ppc should sort first

================
Comment at: source/lldb.cpp:232
@@ -227,2 +231,3 @@
     ABISysV_x86_64::Terminate();
+    ABISysV_ppc64::Terminate();
     DisassemblerLLVMC::Terminate();
----------------
ppc and ppc64 ::Initialize but only pp64 ::Terminate

http://reviews.llvm.org/D5988






More information about the lldb-commits mailing list