[Lldb-commits] [PATCH] D16186: Unconditionally accept symbol sizes from elf

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 15 09:49:36 PST 2016


clayborg requested changes to this revision.
clayborg added a comment.
This revision now requires changes to proceed.

See inlined comments.


================
Comment at: source/Symbol/Symtab.cpp:974-978
@@ -973,5 +973,7 @@
                         Symbol &symbol = m_symbols[entry.data];
-
-                        symbol.SetByteSize(end_section_file_addr - symbol_file_addr);
-                        symbol.SetSizeIsSynthesized(true);
+                        if (!symbol.GetByteSizeIsValid())
+                        {
+                            symbol.SetByteSize(end_section_file_addr - symbol_file_addr);
+                            symbol.SetSizeIsSynthesized(true);
+                        }
                     }
----------------
You can remove this if statement right? Symbol byte size will always be valid no?

================
Comment at: source/Symbol/Symtab.cpp:1070-1071
@@ +1069,4 @@
+        Symbol* symbol = SymbolAtIndex(entry->data);
+        if (symbol->ContainsFileAddress(file_addr))
+            return symbol;
+    }
----------------
Why do we need to check this? Won't "m_file_addr_to_index.FindEntryThatContains(file_addr);" already check this for us?


http://reviews.llvm.org/D16186





More information about the lldb-commits mailing list