[Lldb-commits] [PATCH 3/3] Rearrange #include's, initialization/termination.

Greg Clayton gclayton at apple.com
Thu Dec 16 13:43:05 PST 2010


This one shouldn't be committed, we will need to get the UnwindAssemblyProfiler-x86, ArchDefaultUnwindPlan-x86, and the ArchVolatileRegs-x86 to compile and build on linux. They are the basis for our i386/x86_64 unwinder. This unwinder should be able to be used by the linux debugger plug-in as the unwinder for both i386 and for x86_64. 

Do these files not build on linux? Is the make system just not building these? If the build system isn't then it should be.

Stephen, let me know what issue you run into when tryingo t build these?

Greg Clayton


On Dec 16, 2010, at 12:54 PM, Stephen Wilson wrote:

> Guard #include's and component initialization/termination with the __APPLE__
> define to allow compilation on non-Apple platforms.
> 
> diff --git a/source/lldb.cpp b/source/lldb.cpp
> index 137ad86..ae8fe6a 100644
> --- a/source/lldb.cpp
> +++ b/source/lldb.cpp
> @@ -24,9 +24,6 @@
> #include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
> #include "Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h"
> #include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h"
> -#include "Plugins/Process/Utility/UnwindAssemblyProfiler-x86.h"
> -#include "Plugins/Process/Utility/ArchDefaultUnwindPlan-x86.h"
> -#include "Plugins/Process/Utility/ArchVolatileRegs-x86.h"
> 
> #ifdef __APPLE__
> #include "Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h"
> @@ -39,6 +36,9 @@
> #include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
> #include "Plugins/Process/MacOSX-User/source/ProcessMacOSX.h"
> #include "Plugins/Process/gdb-remote/ProcessGDBRemote.h"
> +#include "Plugins/Process/Utility/UnwindAssemblyProfiler-x86.h"
> +#include "Plugins/Process/Utility/ArchDefaultUnwindPlan-x86.h"
> +#include "Plugins/Process/Utility/ArchVolatileRegs-x86.h"
> #endif
> 
> #ifdef __linux__
> @@ -73,11 +73,11 @@ lldb_private::Initialize ()
>         SymbolFileDWARF::Initialize();
>         SymbolFileDWARFDebugMap::Initialize();
>         SymbolFileSymtab::Initialize();
> +
> +#ifdef __APPLE__
>         UnwindAssemblyProfiler_x86::Initialize();
>         ArchDefaultUnwindPlan_x86::Initialize();
>         ArchVolatileRegs_x86::Initialize();
> -
> -#ifdef __APPLE__
>         ABIMacOSX_i386::Initialize();
>         ABISysV_x86_64::Initialize();
>         DynamicLoaderMacOSXDYLD::Initialize();
> @@ -112,11 +112,11 @@ lldb_private::Terminate ()
>     SymbolFileDWARF::Terminate();
>     SymbolFileDWARFDebugMap::Terminate();
>     SymbolFileSymtab::Terminate();
> +
> +#ifdef __APPLE__
>     UnwindAssemblyProfiler_x86::Terminate();
>     ArchDefaultUnwindPlan_x86::Terminate();
>     ArchVolatileRegs_x86::Terminate();
> -
> -#ifdef __APPLE__
>     DynamicLoaderMacOSXDYLD::Terminate();
>     ItaniumABILanguageRuntime::Terminate();
>     AppleObjCRuntimeV2::Terminate();
> -- 
> 1.7.3.2
> 
> _______________________________________________
> 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