mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-30 09:01:19 +00:00
Revert " [sanitizer] adapt for 75f1f158812dabc03e70697b6b9c272230bce63d"
This reverts commit de4c038c7b
.
The change that triggered this fix got reverted.
This commit is contained in:
parent
b3b3cb2d2f
commit
de088dd3a0
@ -41,16 +41,6 @@ static llvm::symbolize::PrinterConfig getDefaultPrinterConfig() {
|
||||
return Config;
|
||||
}
|
||||
|
||||
static llvm::symbolize::ErrorHandler symbolize_error_handler(
|
||||
llvm::raw_string_ostream &OS) {
|
||||
return
|
||||
[&](const llvm::ErrorInfoBase &ErrorInfo, llvm::StringRef ErrorBanner) {
|
||||
OS << ErrorBanner;
|
||||
ErrorInfo.log(OS);
|
||||
OS << '\n';
|
||||
};
|
||||
}
|
||||
|
||||
namespace __sanitizer {
|
||||
int internal_snprintf(char *buffer, uintptr_t length, const char *format,
|
||||
...);
|
||||
@ -67,8 +57,8 @@ bool __sanitizer_symbolize_code(const char *ModuleName, uint64_t ModuleOffset,
|
||||
llvm::raw_string_ostream OS(Result);
|
||||
llvm::symbolize::PrinterConfig Config = getDefaultPrinterConfig();
|
||||
llvm::symbolize::Request Request{ModuleName, ModuleOffset};
|
||||
auto Printer = std::make_unique<llvm::symbolize::LLVMPrinter>(
|
||||
OS, symbolize_error_handler(OS), Config);
|
||||
auto Printer =
|
||||
std::make_unique<llvm::symbolize::LLVMPrinter>(OS, OS, Config);
|
||||
|
||||
// TODO: it is neccessary to set proper SectionIndex here.
|
||||
// object::SectionedAddress::UndefSection works for only absolute addresses.
|
||||
@ -96,8 +86,8 @@ bool __sanitizer_symbolize_data(const char *ModuleName, uint64_t ModuleOffset,
|
||||
llvm::symbolize::PrinterConfig Config = getDefaultPrinterConfig();
|
||||
llvm::raw_string_ostream OS(Result);
|
||||
llvm::symbolize::Request Request{ModuleName, ModuleOffset};
|
||||
auto Printer = std::make_unique<llvm::symbolize::LLVMPrinter>(
|
||||
OS, symbolize_error_handler(OS), Config);
|
||||
auto Printer =
|
||||
std::make_unique<llvm::symbolize::LLVMPrinter>(OS, OS, Config);
|
||||
|
||||
// TODO: it is neccessary to set proper SectionIndex here.
|
||||
// object::SectionedAddress::UndefSection works for only absolute addresses.
|
||||
|
Loading…
Reference in New Issue
Block a user