[Lldb-commits] [PATCH] Merge of Linux and FreeBSD

Johnny Chen johnny.chen at apple.com
Wed Jan 4 16:41:08 PST 2012


Hi Dawn,

The patch looks good.  I have a couple of questions on source/Target/Platform.cpp and source/Target/TargetList.cpp, though.
Please commit the patch except the two files.

Here are my questions:

The Platform.cpp patch looks wrong?

Index: source/Target/Platform.cpp
===================================================================
--- source/Target/Platform.cpp	(revision 147560)
+++ source/Target/Platform.cpp	(working copy)
@@ -572,6 +572,16 @@
                         Error &error)
 {
     ProcessSP process_sp;
+
+    launch_info.GetFlags ().Set (eLaunchFlagDebug);
+    const char *plugin_name = launch_info.GetProcessPluginName();
+    process_sp = target->CreateProcess (listener, plugin_name).get();
+    error = process_sp->Launch (launch_info);
+    return process_sp;
+
+
+#if 0
+    ProcessSP process_sp;
     // Make sure we stop at the entry point
     launch_info.GetFlags ().Set (eLaunchFlagDebug);
     error = LaunchProcess (launch_info);
@@ -602,4 +612,5 @@
         }
     }
     return process_sp;
+#endif
 }

Also, I'll ask Greg to review the TargetList.cpp question you have.
Please don't commit it for the time being.

Index: source/Target/TargetList.cpp
===================================================================
--- source/Target/TargetList.cpp	(revision 147560)
+++ source/Target/TargetList.cpp	(working copy)
@@ -72,7 +72,8 @@
     if (!platform_sp)
         platform_sp = debugger.GetPlatformList().GetSelectedPlatform ();
 
-    ArchSpec arch;
+    // Unclear why I need to init this and others don't
+    ArchSpec arch = Host::GetArchitecture(Host::eSystemDefaultArchitecture);
     
     if (triple_cstr)
     {
@@ -83,6 +84,7 @@
             return error;
         }
     }
+
     error = TargetList::CreateTarget (debugger,
                                       file,
                                       arch,

On Jan 4, 2012, at 3:26 PM, dawn at burble.org wrote:

> 
> This patch combines common code from Linux and FreeBSD into
> a new POSIX platform.  It also contains fixes for 64bit FreeBSD.
> 
> The patch is based on changes by Mark Peek <mp at FreeBSD.org> and
> "K. Macy" <kmacy at freebsd.org> in their 
> github repo located at https://github.com/fbsd/lldb.
> 
> Ok to commit?
> Thanks!
> -Dawn
> <lldb_svnR147560_POSIX.patch>_______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits




More information about the lldb-commits mailing list