[Lldb-commits] [lldb] r164770 - in /lldb/branches/windows/source: Core/Windows.cpp Host/common/FileSpec.cpp Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp lldb.cpp
Carlo Kok
ck at remobjects.com
Thu Sep 27 05:30:24 PDT 2012
Author: carlokok
Date: Thu Sep 27 07:30:24 2012
New Revision: 164770
URL: http://llvm.org/viewvc/llvm-project?rev=164770&view=rev
Log:
Registration of more plugins on Windows & proper Filespec support on Windows.
Modified:
lldb/branches/windows/source/Core/Windows.cpp
lldb/branches/windows/source/Host/common/FileSpec.cpp
lldb/branches/windows/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
lldb/branches/windows/source/lldb.cpp
Modified: lldb/branches/windows/source/Core/Windows.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Core/Windows.cpp?rev=164770&r1=164769&r2=164770&view=diff
==============================================================================
--- lldb/branches/windows/source/Core/Windows.cpp (original)
+++ lldb/branches/windows/source/Core/Windows.cpp Thu Sep 27 07:30:24 2012
@@ -178,12 +178,21 @@
char* basename(char *path)
{
- return 0;
+ char* l1 = strrchr(path, '\\');
+ char* l2 = strrchr(path, '/');
+ if (l2 > l1) l1 = l2;
+ if (!l1) return path; // no base name
+ return &l1[1];
}
char *dirname(char *path)
{
- return 0;
+ char* l1 = strrchr(path, '\\');
+ char* l2 = strrchr(path, '/');
+ if (l2 > l1) l1 = l2;
+ if (!l1) return NULL; // no dir name
+ *l1 = 0;
+ return path;
}
#include "lldb/lldb-windows.h"
Modified: lldb/branches/windows/source/Host/common/FileSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Host/common/FileSpec.cpp?rev=164770&r1=164769&r2=164770&view=diff
==============================================================================
--- lldb/branches/windows/source/Host/common/FileSpec.cpp (original)
+++ lldb/branches/windows/source/Host/common/FileSpec.cpp Thu Sep 27 07:30:24 2012
@@ -297,6 +297,7 @@
// be split up into a directory and filename and stored as uniqued
// string values for quick comparison and efficient memory usage.
//------------------------------------------------------------------
+
void
FileSpec::SetFile (const char *pathname, bool resolve)
{
@@ -334,7 +335,11 @@
// Truncate the basename off the end of the resolved path
// Only attempt to get the dirname if it looks like we have a path
- if (strchr(resolved_path, '/'))
+ if (strchr(resolved_path, '/')
+#ifdef _WIN32
+ || strchr(resolved_path, '\\')
+#endif
+ )
{
char *directory = ::dirname (resolved_path);
@@ -344,7 +349,13 @@
m_directory.SetCString(directory);
else
{
- char *last_resolved_path_slash = strrchr(resolved_path, '/');
+ char *last_resolved_path_slash =
+#ifdef _WIN32
+ max(strrchr(resolved_path, '/'), strrchr(resolved_path, '\\'));
+#else
+ strrchr(resolved_path, '/');
+#endif
+
if (last_resolved_path_slash)
{
*last_resolved_path_slash = '\0';
@@ -1002,7 +1013,7 @@
ConstString extension (GetFileNameExtension());
if (extension)
{
- static RegularExpression g_source_file_regex ("^(c|m|mm|cpp|c\\+\\+|cxx|cc|cp|s|asm|f|f77|f90|f95|f03|for|ftn|fpp|ada|adb|ads)$",
+ static RegularExpression g_source_file_regex ("^(c|m|mm|cpp|c\\+\\+|cxx|cc|cp|s|asm|f|f77|f90|f95|f03|for|ftn|fpp|ada|adb|ads|pas)$",
llvm::Regex::IgnoreCase);
return g_source_file_regex.Execute (extension.GetCString());
}
Modified: lldb/branches/windows/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp?rev=164770&r1=164769&r2=164770&view=diff
==============================================================================
--- lldb/branches/windows/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp (original)
+++ lldb/branches/windows/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp Thu Sep 27 07:30:24 2012
@@ -186,6 +186,11 @@
case DW_FORM_ref_addr :
form_size = cu->GetAddressByteSize();
break;
+
+ // zero sized field
+ case DW_FORM_flag_present:
+ form_size = 0;
+ break;
// 1 byte values
case DW_FORM_data1 :
@@ -332,6 +337,11 @@
form_size = cu_addr_size;
break;
+ // zero sized field
+ case DW_FORM_flag_present:
+ form_size = 0;
+ break;
+
// 1 byte values
case DW_FORM_data1 :
case DW_FORM_flag :
Modified: lldb/branches/windows/source/lldb.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/branches/windows/source/lldb.cpp?rev=164770&r1=164769&r2=164770&view=diff
==============================================================================
--- lldb/branches/windows/source/lldb.cpp (original)
+++ lldb/branches/windows/source/lldb.cpp Thu Sep 27 07:30:24 2012
@@ -110,12 +110,12 @@
DisassemblerLLVMC::Initialize();
DisassemblerLLVM::Initialize();
ObjectContainerBSDArchive::Initialize();
+ EmulateInstructionARM::Initialize ();
+#endif
+ ObjectFilePECOFF::Initialize ();
ObjectFileELF::Initialize();
SymbolFileDWARF::Initialize();
SymbolFileSymtab::Initialize();
- EmulateInstructionARM::Initialize ();
- ObjectFilePECOFF::Initialize ();
-#endif
UnwindAssemblyInstEmulation::Initialize();
UnwindAssembly_x86::Initialize();
DynamicLoaderPOSIXDYLD::Initialize ();
@@ -132,7 +132,6 @@
//----------------------------------------------------------------------
DynamicLoaderDarwinKernel::Initialize();
OperatingSystemDarwinKernel::Initialize();
- SymbolFileDWARFDebugMap::Initialize();
ItaniumABILanguageRuntime::Initialize();
AppleObjCRuntimeV2::Initialize();
AppleObjCRuntimeV1::Initialize();
@@ -141,6 +140,7 @@
ProcessMachCore::Initialize();
SymbolVendorMacOSX::Initialize();
#endif
+ SymbolFileDWARFDebugMap::Initialize();
PlatformRemoteiOS::Initialize();
PlatformMacOSX::Initialize();
PlatformiOSSimulator::Initialize();
@@ -196,36 +196,36 @@
DisassemblerLLVM::Terminate();
ObjectContainerBSDArchive::Terminate();
ObjectFileELF::Terminate();
- SymbolFileDWARF::Terminate();
- SymbolFileSymtab::Terminate();
UnwindAssembly_x86::Terminate();
UnwindAssemblyInstEmulation::Terminate();
EmulateInstructionARM::Terminate ();
+#endif
+ SymbolFileDWARF::Terminate();
+ SymbolFileSymtab::Terminate();
ObjectFilePECOFF::Terminate ();
DynamicLoaderPOSIXDYLD::Terminate ();
-#endif
#ifndef LLDB_DISABLE_PYTHON
OperatingSystemPython::Terminate();
#endif
-#if defined (__APPLE__)
DynamicLoaderMacOSXDYLD::Terminate();
+#if defined (__APPLE__)
DynamicLoaderDarwinKernel::Terminate();
OperatingSystemDarwinKernel::Terminate();
- SymbolFileDWARFDebugMap::Terminate();
ItaniumABILanguageRuntime::Terminate();
AppleObjCRuntimeV2::Terminate();
AppleObjCRuntimeV1::Terminate();
- ObjectContainerUniversalMachO::Terminate();
- ObjectFileMachO::Terminate();
ProcessMachCore::Terminate();
ProcessGDBRemote::Terminate();
ProcessKDP::Terminate();
SymbolVendorMacOSX::Terminate();
+#endif
+ SymbolFileDWARFDebugMap::Terminate();
+ ObjectContainerUniversalMachO::Terminate();
+ ObjectFileMachO::Terminate();
PlatformMacOSX::Terminate();
PlatformRemoteiOS::Terminate();
PlatformiOSSimulator::Terminate();
-#endif
Debugger::SettingsTerminate ();
More information about the lldb-commits
mailing list