On Sat, Nov 5, 2016 at 11:16 PM, steven shi <[email protected]> wrote:
> Hi Vyukov,
> Thank you for the response. BTW, If I hope to enable the DEBUG(dbgs() << ...
> "\n") message, see below code example, and see the Asan instrumentation
> debug output during the compiling pass. What build option should I use?
> Also, I see there are some debug flags in the AddressSanitizer.cpp, e.g.
> ClDebugStack, ClDebugFunc. I'm quite interested in their usage. I'm enabling
> the Asan in my firmware and please let me know if there are some useful
> debug tips and methods to trace the Asan behavior. I'm OK if I need rebuild
> a new debug version LLVM/CLANG. I appreciate any suggestion.
>
> http://llvm.org/svn/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
> line 1321: DEBUG(dbgs() << "GLOBAL: " << *G << "\n");
> line 1892: DEBUG(dbgs() << "ASAN instrumenting:\n" << F << "\n");


Hi Steven,

You can enable llvm debug output with: "-mllvm -debug" flags. But it
will produce lots of debug output from other passes as well.
For debugging purposes I usually build the binary or just a single
object file and then use objdump -d or nm to check and verify the
result.
Also it may be simpler to enable the instrumentation for just a single
simple file in your system, make it work, and then enable
instrumentation to other files.

-- 
You received this message because you are subscribed to the Google Groups 
"address-sanitizer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to