[PATCH] D19571: [PDB] Fix function names for private symbols in PDBs

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 16:56:10 PDT 2016


rnk created this revision.
rnk added a reviewer: zturner.
rnk added a subscriber: llvm-commits.

llvm-symbolizer wants to get linkage names of functions for historical
reasons. Linkage names are only recorded in the PDB for public symbols,
and the linkage name is apparently stored separately in some "public
symbol" record. We had a workaround in PDBContext which would look for
such symbols when the user requested linkage names.

However, when given an address that was truly in a private function and
public funciton, we would accidentally find nearby public symbols and
return those function names. The fix is to look for both function
symbols and public symbols and only prefer the public symbol name if the
addresses of the symbols agree.

Fixes PR27492

http://reviews.llvm.org/D19571

Files:
  lib/DebugInfo/PDB/PDBContext.cpp
  test/tools/llvm-symbolizer/pdb/Inputs/test.cpp
  test/tools/llvm-symbolizer/pdb/Inputs/test.exe
  test/tools/llvm-symbolizer/pdb/Inputs/test.pdb
  test/tools/llvm-symbolizer/pdb/pdb.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19571.55131.patch
Type: text/x-patch
Size: 3847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160426/ea094ec8/attachment.bin>


More information about the llvm-commits mailing list