mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2026-01-02 04:34:47 +01:00
Put PUBLIC lines in Mac symbol files.
Exported symbols on Mach-O binaries are defined in a STABS section. This patch makes stabs_reader handle them, adds support for Extern symbols in the Module class (which are output as PUBLIC lines in symbol files), and the proper processing in stabs_to_module to hook it all up. A=mark R=jimb at http://breakpad.appspot.com/163001 and http://breakpad.appspot.com/267001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@778 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
68b256aed3
commit
bf25801d83
9 changed files with 270 additions and 11 deletions
|
|
@ -107,8 +107,19 @@ bool StabsReader::Process() {
|
|||
string_offset_ = next_cu_string_offset_;
|
||||
next_cu_string_offset_ = iterator_->value;
|
||||
++iterator_;
|
||||
} else
|
||||
}
|
||||
#if defined(HAVE_MACH_O_NLIST_H)
|
||||
// Export symbols in Mach-O binaries look like this.
|
||||
// This is necessary in order to be able to dump symbols
|
||||
// from OS X system libraries.
|
||||
else if ((iterator_->type & N_STAB) == 0 &&
|
||||
(iterator_->type & N_TYPE) == N_SECT) {
|
||||
ProcessExtern();
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
++iterator_;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -282,4 +293,19 @@ bool StabsReader::ProcessFunction() {
|
|||
return true;
|
||||
}
|
||||
|
||||
bool StabsReader::ProcessExtern() {
|
||||
#if defined(HAVE_MACH_O_NLIST_H)
|
||||
assert(!iterator_->at_end &&
|
||||
(iterator_->type & N_STAB) == 0 &&
|
||||
(iterator_->type & N_TYPE) == N_SECT);
|
||||
#endif
|
||||
|
||||
// TODO(mark): only do symbols in the text section?
|
||||
if (!handler_->Extern(SymbolString(), iterator_->value))
|
||||
return false;
|
||||
|
||||
++iterator_;
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace google_breakpad
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue