-
-
Save mstange/1d7a5789829bc3893acb46568a1cf603 to your computer and use it in GitHub Desktop.
Patch to make dump_syms use elf.rs for pdb symbol dumping
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/dumper.rs b/src/dumper.rs | |
index 6e5cc8b..ff3a4ba 100644 | |
--- a/src/dumper.rs | |
+++ b/src/dumper.rs | |
@@ -305,7 +305,8 @@ pub fn single_file(config: &Config, filename: &str) -> common::Result<()> { | |
FileType::Pdb => store( | |
&config.output, | |
config.check_cfi, | |
- PDBInfo::get_dbg(arch, &buf, path, &filename, file_mapping)?, | |
+ ElfInfo::get_dbg(arch, &buf, path, &filename, file_mapping)?, | |
+ // PDBInfo::get_dbg(arch, &buf, path, &filename, file_mapping)?, | |
), | |
FileType::Pe => { | |
if let Ok(pdb_info) = PDBInfo::get_pe(config, &buf, path, &filename, file_mapping) { | |
diff --git a/src/linux/elf.rs b/src/linux/elf.rs | |
index 7d0173a..82f6521 100644 | |
--- a/src/linux/elf.rs | |
+++ b/src/linux/elf.rs | |
@@ -11,7 +11,7 @@ use std::io::{Cursor, Write}; | |
use std::sync::Arc; | |
use symbolic::cfi::AsciiCfiWriter; | |
use symbolic::common::{Language, Name, NameMangling}; | |
-use symbolic::debuginfo::{Function, Object, ObjectDebugSession}; | |
+use symbolic::debuginfo::{Function, Object}; | |
use symbolic::demangle::{Demangle, DemangleOptions}; | |
use super::source::{SourceFiles, SourceMap}; | |
@@ -295,12 +295,6 @@ impl Collector { | |
source: &mut SourceFiles, | |
) -> common::Result<()> { | |
let ds = o.debug_session()?; | |
- let ds = if let ObjectDebugSession::Dwarf(ds) = ds { | |
- ds | |
- } else { | |
- unreachable!(); | |
- }; | |
- | |
for fun in ds.functions() { | |
match fun { | |
Ok(fun) => { | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment