fixing parse_nano_core_symbol_file to support size columns printed in hex (for large sections)
@@ -1158,7 +1158,13 @@ pub fn parse_nano_core_symbol_file(mapped_pages: MappedPages,
error!("parse_nano_core_symbols(): error parsing virtual address Value at line {}: {:?}\n line: {}", _line_num + 1, e, line);
"parse_nano_core_symbols(): couldn't parse virtual address (value column)"
})?;
- let sec_size = usize::from_str_radix(sec_size, 10).map_err(|e| {
+ let sec_size = usize::from_str_radix(sec_size, 10)
+ .or_else(|e| {
+ sec_size.get(2 ..).ok_or(e).and_then(|sec_size_hex|
+ usize::from_str_radix(sec_size_hex, 16)
+ )
+ })
+ .map_err(|e| {
error!("parse_nano_core_symbols(): error parsing size at line {}: {:?}\n line: {}", _line_num + 1, e, line);
"parse_nano_core_symbols(): couldn't parse size column"
})?;
