[Lldb-commits] [lldb] r163259 - /lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
Greg Clayton
gclayton at apple.com
Wed Sep 5 15:30:51 PDT 2012
Author: gclayton
Date: Wed Sep 5 17:30:51 2012
New Revision: 163259
URL: http://llvm.org/viewvc/llvm-project?rev=163259&view=rev
Log:
<rdar://problem/12237556>
Fixed an issue where we didn't parse N_SO stab pairs where the first N_SO was a relative path.
Modified:
lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=163259&r1=163258&r2=163259&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Wed Sep 5 17:30:51 2012
@@ -1481,36 +1481,36 @@
FileSpec dsc_filespec(dsc_path, false);
// We need definitions of two structures in the on-disk DSC, copy them here manually
-struct lldb_copy_dyld_cache_header
-{
- char magic[16];
- uint32_t mappingOffset;
- uint32_t mappingCount;
- uint32_t imagesOffset;
- uint32_t imagesCount;
- uint64_t dyldBaseAddress;
- uint64_t codeSignatureOffset;
- uint64_t codeSignatureSize;
- uint64_t slideInfoOffset;
- uint64_t slideInfoSize;
- uint64_t localSymbolsOffset;
- uint64_t localSymbolsSize;
-};
-struct lldb_copy_dyld_cache_local_symbols_info
-{
- uint32_t nlistOffset;
- uint32_t nlistCount;
- uint32_t stringsOffset;
- uint32_t stringsSize;
- uint32_t entriesOffset;
- uint32_t entriesCount;
-};
-struct lldb_copy_dyld_cache_local_symbols_entry
-{
- uint32_t dylibOffset;
- uint32_t nlistStartIndex;
- uint32_t nlistCount;
-};
+ struct lldb_copy_dyld_cache_header
+ {
+ char magic[16];
+ uint32_t mappingOffset;
+ uint32_t mappingCount;
+ uint32_t imagesOffset;
+ uint32_t imagesCount;
+ uint64_t dyldBaseAddress;
+ uint64_t codeSignatureOffset;
+ uint64_t codeSignatureSize;
+ uint64_t slideInfoOffset;
+ uint64_t slideInfoSize;
+ uint64_t localSymbolsOffset;
+ uint64_t localSymbolsSize;
+ };
+ struct lldb_copy_dyld_cache_local_symbols_info
+ {
+ uint32_t nlistOffset;
+ uint32_t nlistCount;
+ uint32_t stringsOffset;
+ uint32_t stringsSize;
+ uint32_t entriesOffset;
+ uint32_t entriesCount;
+ };
+ struct lldb_copy_dyld_cache_local_symbols_entry
+ {
+ uint32_t dylibOffset;
+ uint32_t nlistStartIndex;
+ uint32_t nlistCount;
+ };
/* The dyld_cache_header has a pointer to the dyld_cache_local_symbols_info structure (localSymbolsOffset).
The dyld_cache_local_symbols_info structure gives us three things:
@@ -1830,8 +1830,12 @@
m_nlist_idx_to_sym_idx[nlist_idx] = sym_idx - 1;
}
}
+ else
+ {
+ // This could be a relative path to a N_SO
+ N_SO_index = sym_idx;
+ }
}
-
break;
case StabObjectFileName:
@@ -2549,6 +2553,11 @@
m_nlist_idx_to_sym_idx[nlist_idx] = sym_idx - 1;
}
}
+ else
+ {
+ // This could be a relative path to a N_SO
+ N_SO_index = sym_idx;
+ }
}
break;
More information about the lldb-commits
mailing list