From b1226959a25b6a5311801d6f204b088c706e7c25 Mon Sep 17 00:00:00 2001 From: Mike Wittman Date: Wed, 29 Nov 2017 13:29:37 -0800 Subject: Add optional field indicating multiple symbols at an address Adds an optional 'm' as the first field in FUNCTION and PUBLIC records to indicate that the address corresponds to more than one symbol. Controls this by a command line flag for now to give symbol file users a chance to update. Also reduces the number of IDiaSymbols retained in memory to one per address. This reduces memory consumption by 8% when processing chrome.dll.pdb. Updates the processor to parse the new optional field. Bug: google-breakpad:751 Change-Id: I6503edaf057312d21a1d63d9c84e5a4fa019dc46 Reviewed-on: https://chromium-review.googlesource.com/773418 Reviewed-by: Mark Mentovai --- docs/symbol_files.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/symbol_files.md b/docs/symbol_files.md index 90782016..237b6567 100644 --- a/docs/symbol_files.md +++ b/docs/symbol_files.md @@ -100,12 +100,17 @@ the file; it may contain spaces. A `FUNC` record describes a source-language function. It has the form: -> `FUNC` _address_ _size_ _parameter\_size_ _name_ +> `FUNC` _[m]_ _address_ _size_ _parameter\_size_ _name_ -For example: `FUNC c184 30 0 nsQueryInterfaceWithError::operator()(nsID const&, +For example: `FUNC m c184 30 0 nsQueryInterfaceWithError::operator()(nsID const&, void**) const ` +The _m_ field is optional. If present it indicates that multiple symbols +reference this function's instructions. (In which case, only one symbol name is +mentioned within the breakpad file.) Multiple symbols referencing the same +instructions may occur due to identical code folding by the linker. + The _address_ and _size_ fields are hexadecimal numbers indicating the start address and length in bytes of the machine code instructions the function occupies. (Breakpad symbol files cannot accurately describe functions whose code @@ -158,9 +163,9 @@ A `PUBLIC` record describes a publicly visible linker symbol, such as that used to identify an assembly language entry point or region of memory. It has the form: -> PUBLIC _address_ _parameter\_size_ _name_ +> PUBLIC _[m]_ _address_ _parameter\_size_ _name_ -For example: `PUBLIC 2160 0 Public2_1 +For example: `PUBLIC m 2160 0 Public2_1 ` The Breakpad processor essentially treats a `PUBLIC` record as defining a @@ -168,6 +173,11 @@ function with no line number data and an indeterminate size: the code extends to the next address mentioned. If a given address is covered by both a `PUBLIC` record and a `FUNC` record, the processor uses the `FUNC` data. +The _m_ field is optional. If present it indicates that multiple symbols +reference this function's instructions. (In which case, only one symbol name is +mentioned within the breakpad file.) Multiple symbols referencing the same +instructions may occur due to identical code folding by the linker. + The _address_ field is a hexadecimal number indicating the symbol's address, relative to the module's load address. -- cgit v1.2.1