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 <mark@chromium.org>
This commit is contained in:
Mike Wittman 2017-11-29 13:29:37 -08:00 committed by Mark Mentovai
parent 4eeb384f3e
commit b1226959a2
12 changed files with 324 additions and 148 deletions

View file

@ -95,12 +95,14 @@ class SymbolParseHelper {
char **filename); // out
// Parses a |function_line| declaration. Returns true on success.
// Format: FUNC <address> <size> <stack_param_size> <name>.
// Format: FUNC [<multiple>] <address> <size> <stack_param_size> <name>.
// Notice, that this method modifies the input |function_line| which is why it
// can't be const. On success, <address>, <size>, <stack_param_size>, and
// <name> are stored in |*address|, |*size|, |*stack_param_size|, and |*name|.
// No allocation is done, |*name| simply points inside |function_line|.
// can't be const. On success, the presence of <multiple>, <address>, <size>,
// <stack_param_size>, and <name> are stored in |*is_multiple|, |*address|,
// |*size|, |*stack_param_size|, and |*name|. No allocation is done, |*name|
// simply points inside |function_line|.
static bool ParseFunction(char *function_line, // in
bool *is_multiple, // out
uint64_t *address, // out
uint64_t *size, // out
long *stack_param_size, // out
@ -119,12 +121,14 @@ class SymbolParseHelper {
long *source_file); // out
// Parses a |public_line| declaration. Returns true on success.
// Format: PUBLIC <address> <stack_param_size> <name>
// Format: PUBLIC [<multiple>] <address> <stack_param_size> <name>
// Notice, that this method modifies the input |function_line| which is why
// it can't be const. On success, <address>, <stack_param_size>, <name>
// are stored in |*address|, |*stack_param_size|, and |*name|.
// No allocation is done, |*name| simply points inside |public_line|.
// it can't be const. On success, the presence of <multiple>, <address>,
// <stack_param_size>, <name> are stored in |*is_multiple|, |*address|,
// |*stack_param_size|, and |*name|. No allocation is done, |*name| simply
// points inside |public_line|.
static bool ParsePublicSymbol(char *public_line, // in
bool *is_multiple, // out
uint64_t *address, // out
long *stack_param_size, // out
char **name); // out