[PATCH] D12153: Support inline functions symbolization in Addr2Line symbolizer.

Maxim Ostapenko via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 25 10:49:42 PDT 2015


m.ostepenko added inline comments.

================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc:202
@@ +201,3 @@
+    // 1. First one, corresponding to given offset to be symbolized
+    // (may be equal to OUTPUT_TERMINATOR_ if offset is not valid).
+    // 2. Second one for OUTPUT_TERMINATOR_ itself to mark the end of output.
----------------
samsonov wrote:
> Please fix variable names in the comment - there are no OUTPUT_TERMINATOR_ and TERMINATOR_LEN
Ah, sorry, these are GCC habits.

================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc:209
@@ +208,3 @@
+    if (is_terminated) {
+      effective_length = length - terminator_len;
+      return true;
----------------
samsonov wrote:
> class members should end with _
> 
> Use of static class variable here is really weird - it adds implicit restriction that you will *always* call ReachedEndOfOutput, followed by TrimOutputBuffer with the same buffer, and that there will be no several instances of this class. I think the latter is false even now.
Ok, I can accumulate effective_length_ in object's member, but I'll need to remove "const" keyword from ReachedEndOfOutput method. Is this OK?


http://reviews.llvm.org/D12153





More information about the llvm-commits mailing list