[lldb-dev] sharing code between lldb and AddressSanitizer
kcc at google.com
Wed Nov 30 16:39:32 CST 2011
On Tue, Nov 29, 2011 at 11:08 PM, Benjamin Kramer
<benny.kra at googlemail.com>wrote:
> On 30.11.2011, at 02:57, Kostya Serebryany <kcc at google.com> wrote:
> I am working on integrating AddressSanitizer (aka asan,
> http://clang.llvm.org/docs/AddressSanitizer.html) run-time library with
> the llvm compiler-rt.
> Asan needs to symbolize PCs, i.e. given a value of a PC it needs to
> produce the file name and the line number (if debug info is present).
> Currently, this is achieved by printing the PCs as
> /path/to/object/file+offset and filtering the output with a script which
> uses addr2line/atos.
> Ideally, symbolization should happen inside the process and should not
> require post processing.
> I would expect that lldb already has such functionality, right?
> Somewhere in include/lldb/Symbol/Symtab.h?
> Does it work on both Linux and Mac?
> Do you think that it is possible/desirable to have this kind of code
> sharing between lldb and asan?
> Will that work with the current build system (where lldb and
> compiler-rt/lib/asan are separate subprojects)?
> I recently extracted the DWARF parsing that's necessary to get line
> numbers from addresses out of lldb into LLVM. Take a look at llvm-dwarfdump
> and the DebugInfo library.
Nice! This will solve the build dependency problem. We'll look into it.
> It requires relocations to be resolved upfront though, so it won't work on
> Linux out of the box (DWARF doesn't use relocations on OS X).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lldb-dev