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

Greg Clayton gclayton at apple.com
Fri Dec 17 07:57:29 PST 2010


committed:

File: /Volumes/work/gclayton/Documents/src/lldb/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp
Revision: 122060
Date: Friday, December 17, 2010 7:54:09 AM PT
Author: gclayton

Removed darwin specific CPU type defines to make UnwindAssemblyProfiler_x86 able to compile on linux (patch from Stephen Wilson).

Changes:
	M /lldb/trunk/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp


On Dec 16, 2010, at 9:21 PM, Stephen Wilson wrote:

> 
> Hi Greg,
> 
> Greg Clayton <gclayton at apple.com> writes:
>> Stephen, let me know what issue you run into when tryingo t build these?
> 
> OK.  I definitely jumped the gun on this one -- I thought the code in
> Process/Utility was a bit more interdependent than it is :)
> 
> Does the following patch look OK to you?  This is the only issue I found
> among UnwindAssemblyProfiler-x86, ArchDefaultUnwindPlan-x86, and
> ArchVolatileRegs-x86.
> 
> The only remaining problem is how to get the Makefiles working for this
> directory.  I will take a closer look at the LLVM Makefiles, but I do
> not remember seeing a way to exclude files within a directory from the
> build.
> 
> Would it be unreasonable to split up Process/Utility with a few more
> logical subdirectories in which we place platform-specific components if
> it turns out the current Makefile system cannot be pushed into dealing
> with the layout as is?
> 
> 
> Thanks!
> 
> 
> diff --git a/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp b/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp
> index 6b64886..61e3c70 100644
> --- a/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp
> +++ b/source/Plugins/Process/Utility/UnwindAssemblyProfiler-x86.cpp
> @@ -844,11 +844,11 @@ UnwindAssemblyProfiler_x86::FirstNonPrologueInsn (AddressRange& func, Target& ta
> lldb_private::UnwindAssemblyProfiler *
> UnwindAssemblyProfiler_x86::CreateInstance (const lldb_private::ArchSpec &arch)
> {
> -   uint32_t cpu = arch.GetCPUType ();
> -   if (cpu != CPU_TYPE_X86_64 && cpu != CPU_TYPE_I386)
> +    ArchSpec::CPU cpu = arch.GetGenericCPUType ();
> +    if (cpu != ArchSpec::eCPU_x86_64 && cpu != ArchSpec::eCPU_i386)
>        return NULL;
> 
> -   return new UnwindAssemblyProfiler_x86 (cpu == CPU_TYPE_X86_64 ? k_x86_64 : k_i386);
> +   return new UnwindAssemblyProfiler_x86 (cpu == ArchSpec::eCPU_x86_64 ? k_x86_64 : k_i386);
> }
> 
> 





More information about the lldb-commits mailing list