[PATCH] [compiler-rt] [asan] Refactor DescribeAddressIfStack to allow reuse for debugging API

Kuba Brecka kuba.brecka at gmail.com
Wed Jul 16 13:05:05 PDT 2014


Hi kcc, glider,

Refactoring the DescribeAddressIfStack function in asan_report.cc to be able to reuse it for http://reviews.llvm.org/D4527. The plan is to use the newly extracted functions in this manner:

const char *frame_descr = t->GetFrameNameByAddr(addr, &offset, &frame_pc);
uptr n_objects = NumberOfVarsInFrame(frame_descr);
InternalScopedBuffer<StackVarDescr> vars(n_objects);
GetFrameVars(frame_descr, vars, n_objects);
for (uptr i = 0; i < n_objects; i++) {
	... do stuff ...
}

http://reviews.llvm.org/D4545

Files:
  lib/asan/asan_report.cc
  lib/asan/asan_report.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4545.11525.patch
Type: text/x-patch
Size: 3727 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140716/ec276e03/attachment.bin>


More information about the llvm-commits mailing list