[PATCH] D49676: [DWARF] support for .debug_addr (consumer)

Victor Leschuk via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 27 20:30:42 PDT 2018


vleschuk marked 11 inline comments as done.
vleschuk added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFDebugAddr.cpp:72
+
+  // Perform basic validation of the remaining header fields.
+  if (HeaderData.Version != SuggestedVersion)
----------------
jhenderson wrote:
> jhenderson wrote:
> > It may be worth saying that Version != 5 is not supported (except for the special case)?
> It might have lost track. Which error message shows this exactly?
Example:


```
# ERR: section is not large enough to contain a .debug_addr table of length 0x10 at offset 0x0
# ERR-NOT: {{.}}                                                                
                                                                                
# too small section to contain section of given length                          
  .section  .debug_addr,"", at progbits                                            
.Ldebug_addr0:                                                                  
  .long 12 # unit_length                                                        
  .short 5 # version                                                            
  .byte 4 # address_size                                                        
  .byte 0 # segment_selector_size  
```

I added a test for this.


================
Comment at: test/tools/llvm-dwarfdump/X86/debug_addr.s:22
+
+# ERR:            DWARF version is not defined, assuming version 5
+# ERR:            DWARF version is not defined, assuming version 5
----------------
jhenderson wrote:
> It would be nice to have a test case that doesn't produce this warning.
We already have on: see debug_addr_version_mismatch.s - the first table produces the warning, the second one doesn't.


https://reviews.llvm.org/D49676





More information about the llvm-commits mailing list