From fd18beeb5c817aa3ecdb21caceee8e6ce08c6ab3 Mon Sep 17 00:00:00 2001 From: jimblandy Date: Fri, 11 Mar 2011 22:16:12 +0000 Subject: Google Breakpad Issue 417: Handle DWARF that omits function names. This patch makes sure dump_syms behaves properly when presented with malformed DWARF data that provides no name for a function. We print a warning message to stderr, and subsitute "" for the empty string, so that the "FUNC" record written to the symbol file for the function is still well-formed. (We may have line number data covering the function, so it would be a shame to omit the function altogether.) Unit tests included. a=jimblandy, r=ted.mielczarek git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@779 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/common/dwarf_cu_to_module.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/common/dwarf_cu_to_module.h') diff --git a/src/common/dwarf_cu_to_module.h b/src/common/dwarf_cu_to_module.h index 2b59350f..a262f3b5 100644 --- a/src/common/dwarf_cu_to_module.h +++ b/src/common/dwarf_cu_to_module.h @@ -158,6 +158,11 @@ class DwarfCUToModule: public dwarf2reader::RootDIEHandler { // covered by no function. virtual void UncoveredLine(const Module::Line &line); + // The DW_TAG_subprogram DIE at OFFSET has no name specified directly + // in the DIE, nor via a DW_AT_specification or DW_AT_abstract_origin + // link. + virtual void UnnamedFunction(uint64 offset); + protected: string filename_; uint64 cu_offset_; -- cgit v1.2.1