[all-commits] [llvm/llvm-project] 4c44dc: Support soft failure on DWP section overflow, prod...

Jinjie Huang via All-commits all-commits at lists.llvm.org
Fri Dec 1 12:01:43 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4c44dcffd5f1557bde2c21773221081437308895
      https://github.com/llvm/llvm-project/commit/4c44dcffd5f1557bde2c21773221081437308895
  Author: Jinjie Huang <huangjinjie at bytedance.com>
  Date:   2023-12-01 (Fri, 01 Dec 2023)

  Changed paths:
    M llvm/include/llvm/DWP/DWP.h
    M llvm/lib/DWP/DWP.cpp
    M llvm/tools/llvm-dwp/Opts.td
    M llvm/tools/llvm-dwp/llvm-dwp.cpp

  Log Message:
  -----------
  Support soft failure on DWP section overflow, producing a truncated but valid DWP(#71902)

When 'ContinueOnCuIndexOverflow' enables without this modification, the
forcibly generated '.dwp' won't be recognized by Debugger(gdb 10.1)
correctly.
<img width="657" alt="image"
src="https://github.com/llvm/llvm-project/assets/150100070/31732775-2548-453a-a47a-fa04c6d05fe9">
it looks like there's a problem with processing the dwarf header, which
makes debugging completely impossible. (unless the consumer walks the debug_info section to rebuild that column (if that's the only section that overflowed - if it's another section, there's no recovery))

**About patch:**
When llvm-dwp enables option '--continue-on-cu-index-overflow=soft-stop'
and recognizes the overflow problem , it will stop packing and generate
the '.dwp' file at once, discarding any DWO files that would not fit
within the 32 bit/4GB limits of the format.
<img width="625" alt="image"
src="https://github.com/llvm/llvm-project/assets/150100070/77d6be24-262b-4f4c-afc0-9a6c49e133c7">




More information about the All-commits mailing list