[Lldb-commits] [PATCH] D12757: Fix prologue end handling when code compiled by gcc

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 15 15:45:49 PDT 2015


clayborg added a comment.

Blech... Ok, one more try: does GCC always emit the same line and file with the same address? If so we could do:

  {
      // GCC don't use the is_prologue_end flag to mark the first instruction after the prologue.
      // Instead of it it is issueing a line table entry for the first instruction of the prologue
      // and one for the first instruction after the prologue. If the size of the prologue is 0
      // instruction then the 2 line entry will have the same file address. Removing it will remove
      // our ability to properly detect the location of the end of prologe so we set the prologue_end
      // flag to preserve this information (setting the prologue_end flag for an entry what is after
      // the prologue end don't have any effect)
      entry.is_prologue_end = entry.file == entries.back().file && entry.line == entries.back().line;
      entries.back() = entry;
  }

Otherwise we could settle on just making sure the file is the same:

  {
      // GCC don't use the is_prologue_end flag to mark the first instruction after the prologue.
      // Instead of it it is issueing a line table entry for the first instruction of the prologue
      // and one for the first instruction after the prologue. If the size of the prologue is 0
      // instruction then the 2 line entry will have the same file address. Removing it will remove
      // our ability to properly detect the location of the end of prologe so we set the prologue_end
      // flag to preserve this information (setting the prologue_end flag for an entry what is after
      // the prologue end don't have any effect)
      entry.is_prologue_end = entry.file == entries.back().file;
      entries.back() = entry;
  }


http://reviews.llvm.org/D12757





More information about the lldb-commits mailing list