[Lldb-commits] [lldb] r160158 - in /lldb/trunk/source: Host/macosx/Symbols.cpp Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
Greg Clayton
gclayton at apple.com
Thu Jul 12 18:20:25 PDT 2012
Author: gclayton
Date: Thu Jul 12 20:20:25 2012
New Revision: 160158
URL: http://llvm.org/viewvc/llvm-project?rev=160158&view=rev
Log:
Resolve source paths that start with ~ when doing substitutions.
Modified:
lldb/trunk/source/Host/macosx/Symbols.cpp
lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
Modified: lldb/trunk/source/Host/macosx/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/macosx/Symbols.cpp?rev=160158&r1=160157&r2=160158&view=diff
==============================================================================
--- lldb/trunk/source/Host/macosx/Symbols.cpp (original)
+++ lldb/trunk/source/Host/macosx/Symbols.cpp Thu Jul 12 20:20:25 2012
@@ -388,6 +388,11 @@
char build_src_path[PATH_MAX];
::CFStringGetFileSystemRepresentation (actual_src_cfpath, actual_src_path, sizeof(actual_src_path));
::CFStringGetFileSystemRepresentation (build_src_cfpath, build_src_path, sizeof(build_src_path));
+ if (actual_src_path[0] == '~')
+ {
+ FileSpec resolved_source_path(actual_src_path, true);
+ resolved_source_path.GetPath(actual_src_path, sizeof(actual_src_path));
+ }
module_spec.GetSourceMappingList().Append (ConstString(build_src_path), ConstString(actual_src_path), true);
}
}
Modified: lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp?rev=160158&r1=160157&r2=160158&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp Thu Jul 12 20:20:25 2012
@@ -245,7 +245,8 @@
const char *node_content = (const char *)::xmlNodeGetContent(value_node);
if (node_content)
{
- strncpy(DBGSourcePath, node_content, sizeof(DBGSourcePath));
+ FileSpec resolved_source_path(node_content, true);
+ resolved_source_path.GetPath(DBGSourcePath, sizeof(DBGSourcePath));
}
}
key_node = value_node;
More information about the lldb-commits
mailing list