[Lldb-commits] [lldb] r105923 - /lldb/trunk/source/lldb.cpp
Jim Ingham
jingham at apple.com
Mon Jun 14 11:09:01 PDT 2010
I don't think we need to solve the problem of building for cross debugging right now, but as you make changes to get lldb building in Linux, it would be good to differentiate between ifdef's that are host related, and ones like those below that we're going to have to come back and fix to get Linux->MacOS X debugging working. gdb mixed these all up so that while you could do cross architecture debugging okay, it was harder to do cross OS debugging. It would be great to avoid that limitation in lldb.
Maybe just put in a FIXME - cross-debugging everywhere, like here, where that is appropriate. Then when we get some time to come back and make this work, we won't have lost the information from your first pass...
Jim
On Jun 13, 2010, at 12:36 PM, Eli Friedman wrote:
> Author: efriedma
> Date: Sun Jun 13 14:36:42 2010
> New Revision: 105923
>
> URL: http://llvm.org/viewvc/llvm-project?rev=105923&view=rev
> Log:
> Make include paths work on Linux. ifdef out stuff that isn't relevant to
> Linux or doesn't compile on Linux.
>
>
> Modified:
> lldb/trunk/source/lldb.cpp
>
> Modified: lldb/trunk/source/lldb.cpp
> URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/lldb.cpp?rev=105923&r1=105922&r2=105923&view=diff
> ==============================================================================
> --- lldb/trunk/source/lldb.cpp (original)
> +++ lldb/trunk/source/lldb.cpp Sun Jun 13 14:36:42 2010
> @@ -9,23 +9,28 @@
>
> #include "lldb/lldb-private.h"
> #include "lldb/lldb-private-log.h"
> +#include "lldb/Core/ArchSpec.h"
> #include "lldb/Core/Log.h"
> #include "lldb/Core/Timer.h"
> #include "lldb/Host/Host.h"
> -#include "ABIMacOSX_i386.h"
> -#include "ABISysV_x86_64.h"
> -#include "DisassemblerLLVM.h"
> -#include "DynamicLoaderMacOSXDYLD.h"
> -#include "ObjectContainerBSDArchive.h"
> -#include "ObjectContainerUniversalMachO.h"
> -#include "ObjectFileELF.h"
> -#include "ObjectFileMachO.h"
> -#include "ProcessMacOSX.h"
> -#include "ProcessGDBRemote.h"
> -#include "SymbolFileDWARF.h"
> -#include "SymbolFileDWARFDebugMap.h"
> -#include "SymbolFileSymtab.h"
> -#include "SymbolVendorMacOSX.h"
> +#include "lldb/Host/Mutex.h"
> +
> +#include "Plugins/Disassembler/llvm/DisassemblerLLVM.h"
> +#include "Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.h"
> +#include "Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h"
> +#include "Plugins/ObjectFile/ELF/ObjectFileELF.h"
> +#include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
> +#include "Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h"
> +#include "Plugins/SymbolFile/Symtab/SymbolFileSymtab.h"
> +#ifdef __APPLE__
> +#include "Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.h"
> +#include "Plugins/ABI/SysV-x86_64/ABISysV_x86_64.h"
> +#include "Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.h"
> +#include "Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.h"
> +#include "Plugins/ObjectFile/Mach-O/ObjectFileMachO.h"
> +#include "Plugins/Process/MacOSX-User/source/ProcessMacOSX.h"
> +#include "Plugins/Process/gdb-remote/ProcessGDBRemote.h"
> +#endif
>
> using namespace lldb_private;
>
> @@ -47,20 +52,22 @@
> Log::Callbacks log_callbacks = { DisableLog, EnableLog, ListLogCategories };
>
> Log::RegisterLogChannel ("lldb", log_callbacks);
> + DisassemblerLLVM::Initialize();
> + ObjectContainerBSDArchive::Initialize();
> + ObjectFileELF::Initialize();
> + SymbolVendorMacOSX::Initialize();
> + SymbolFileDWARF::Initialize();
> + SymbolFileDWARFDebugMap::Initialize();
> + SymbolFileSymtab::Initialize();
> +#ifdef __APPLE__
> ABIMacOSX_i386::Initialize();
> ABISysV_x86_64::Initialize();
> - DisassemblerLLVM::Initialize();
> DynamicLoaderMacOSXDYLD::Initialize();
> ObjectContainerUniversalMachO::Initialize();
> - ObjectContainerBSDArchive::Initialize();
> - ObjectFileELF::Initialize();
> ObjectFileMachO::Initialize();
> ProcessGDBRemote::Initialize();
> ProcessMacOSX::Initialize();
> - SymbolFileDWARF::Initialize();
> - SymbolFileDWARFDebugMap::Initialize();
> - SymbolFileSymtab::Initialize();
> - SymbolVendorMacOSX::Initialize();
> +#endif
> }
> }
>
> @@ -75,17 +82,19 @@
> {
> Timer scoped_timer (__PRETTY_FUNCTION__, __PRETTY_FUNCTION__);
> DisassemblerLLVM::Terminate();
> - DynamicLoaderMacOSXDYLD::Terminate();
> - ObjectContainerUniversalMachO::Terminate();
> ObjectContainerBSDArchive::Terminate();
> ObjectFileELF::Terminate();
> - ObjectFileMachO::Terminate();
> - ProcessGDBRemote::Terminate();
> - ProcessMacOSX::Terminate();
> + SymbolVendorMacOSX::Terminate();
> SymbolFileDWARF::Terminate();
> SymbolFileDWARFDebugMap::Terminate();
> SymbolFileSymtab::Terminate();
> - SymbolVendorMacOSX::Terminate();
> +#ifdef __APPLE__
> + DynamicLoaderMacOSXDYLD::Terminate();
> + ObjectContainerUniversalMachO::Terminate();
> + ObjectFileMachO::Terminate();
> + ProcessGDBRemote::Terminate();
> + ProcessMacOSX::Terminate();
> +#endif
> }
>
> const char *
>
>
> _______________________________________________
> 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