tcmalloc: use relative addresses with the windows addr2line wrapper

Modifies the Windows addr2line wrapper to expect addresses relative to
DllBase to better simulate how addr2line works with modules in Linux.

Windows DLLs have a concept of "default load address" which hints to the OS
where to load the binary image after relocation. The dbghelp.dll
symbolization library will load the module at this location in the virtual
address space meaning the caller of these functions would need to be aware
of the base address. This makes things unnecessarily complex in the face of
ASLR and also diverges from the behavior of addr2line when used with linux-
style DSOs. This CL simply adds the module base address to the incoming
addresses, thereby making the input relative addresses for the module which
both is easier to use and lines up better with linux's addr2line behavior.

These changes were made originally as part of CL
https://codereview.chromium.org/2730473002.

BUG=724399,b:70905156

Change-Id: I0abe9e0c380e7e60ae29a11021bb805b31718d08
Reviewed-on: https://chromium-review.googlesource.com/1147668
Commit-Queue: Gabriel Marin <gmx@chromium.org>
Reviewed-by: Albert J. Wong <ajwong@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#578096}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 73d72081d54976e5723d930eb8fa67559a22264d
1 file changed
tree: 39d8ca2ee221e05f9c0118779130cfc165434b6d
  1. src/