[llvm] cc26222 - [Orc] Print section load-addresses for debug objects as hex again

Stefan Gränitz via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 3 02:39:09 PDT 2023


Author: Stefan Gränitz
Date: 2023-04-03T11:38:05+02:00
New Revision: cc26222eb4a68b388e2ad9d7cb0382187bded718

URL: https://github.com/llvm/llvm-project/commit/cc26222eb4a68b388e2ad9d7cb0382187bded718
DIFF: https://github.com/llvm/llvm-project/commit/cc26222eb4a68b388e2ad9d7cb0382187bded718.diff

LOG: [Orc] Print section load-addresses for debug objects as hex again

Apparently, the refactor in 8b1771bd9f304be39d4dcbdcccedb6d3bcd18200 broke the logic behind formatv here:
```
  140736272011264 .rodata
  140736272015360 .text
  140736272011424 .eh_frame
```

Added: 
    

Modified: 
    llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp b/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
index 0446fa66aca2f..0f0839e00e515 100644
--- a/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/DebugObjectManagerPlugin.cpp
@@ -93,8 +93,8 @@ Error ELFDebugObjectSection<ELFT>::validateInBounds(StringRef Buffer,
 
 template <typename ELFT>
 void ELFDebugObjectSection<ELFT>::dump(raw_ostream &OS, StringRef Name) {
-  if (Header->sh_addr) {
-    OS << formatv("  {0:x16} {1}\n", Header->sh_addr, Name);
+  if (uint64_t Addr = Header->sh_addr) {
+    OS << formatv("  {0:x16} {1}\n", Addr, Name);
   } else {
     OS << formatv("                     {0}\n", Name);
   }


        


More information about the llvm-commits mailing list