[PATCH] D68620: DebugInfo: Use base address selection entries for debug_loc

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 9 10:56:59 PDT 2019


probinson added a comment.

> I'll ask re Sony debugger. I have no direct visibility to that code.

My debugger guys say they have code to handle it and some hand-coded tests, so they are cautiously optimistic that nothing bad will happen.



================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:2328
+        BaseIsSet = true;
+        if (UseDwarf5) {
+          Asm->OutStreamer->AddComment(StringifyEnum(BaseAddressx));
----------------
Would it be more readable this way?
```
if (!UseDwarf5) {
  Base = NewBase;
  BaseIsSet = true;
  Asm-OutStreamer->EmitIntValue(-1, Size);
  // etc
} else if (NewBase != Begin || P.second.size() > 1) {
  Base = NewBase;
  BaseIsSet = true;
  Asm->OutStreamer->AddComment(StringifyEnum(BaseAddressx);
  // etc
}
```
As there are only 2 lines in common.  (My eye caught `if (!UseDwarf5` and two lines later `if (UseDwarf5)` and did a double-take.)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68620/new/

https://reviews.llvm.org/D68620





More information about the llvm-commits mailing list