[all-commits] [llvm/llvm-project] 3dbf52: [LLDB][NativePDB] Fix a crash when S_DEFRANGE_SUBF...

Zequan Wu via All-commits all-commits at lists.llvm.org
Thu Apr 14 11:06:35 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3dbf524ad75bf4aa6d4a1f72b82000943a1d967c
      https://github.com/llvm/llvm-project/commit/3dbf524ad75bf4aa6d4a1f72b82000943a1d967c
  Author: Zequan Wu <zequanwu at google.com>
  Date:   2022-04-14 (Thu, 14 Apr 2022)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/NativePDB/PdbUtil.cpp
    A lldb/test/Shell/SymbolFile/NativePDB/Inputs/subfield_register_simple_type.lldbinit
    A lldb/test/Shell/SymbolFile/NativePDB/subfield_register_simple_type.s

  Log Message:
  -----------
  [LLDB][NativePDB] Fix a crash when S_DEFRANGE_SUBFIELD_REGISTER descirbes a simple type

When a variable is simple type and has 64 bits, the debug info may look like the following when targeting 32bit windows. The variable's content is split into two 32bits registers.
```
480 | S_LOCAL [size = 12] `x`
      type=0x0013 (__int64), flags = param
492 | S_DEFRANGE_SUBFIELD_REGISTER [size = 20]
      register = EAX, may have no name = true, offset in parent = 0
      range = [0001:0073,+7), gaps = []
512 | S_DEFRANGE_SUBFIELD_REGISTER [size = 20]
      register = ECX, may have no name = true, offset in parent = 4
      range = [0001:0073,+7), gaps = []
```

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D122943




More information about the All-commits mailing list