[all-commits] [llvm/llvm-project] 344bde: [LLDB] Avoid using InitializeContext for zero-init...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Wed Nov 27 00:44:54 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 344bdeb797b31bb99158010f255a7219fe77e2ec
      https://github.com/llvm/llvm-project/commit/344bdeb797b31bb99158010f255a7219fe77e2ec
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-11-27 (Wed, 27 Nov 2019)

  Changed paths:
    M lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp

  Log Message:
  -----------
  [LLDB] Avoid using InitializeContext for zero-initializing a CONTEXT. NFC.

InitializeContext is useful for allocating a (potentially variable
size) CONTEXT struct in an unaligned byte buffer. In this case, we
already have a fixed size CONTEXT we want to initialize, and we only
used this as a very roundabout way of zero initializing it.

Instead just memset the CONTEXT we have, and set the ContextFlags field
manually.

This matches how it is done in NativeRegisterContextWindows_*.cpp.

This also makes LLDB run successfully in Wine (for a trivial tested
case at least), as Wine hasn't implemented the InitializeContext
function.

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


  Commit: 943513b79929fba1a9dccdf81cb68a41ce29cd03
      https://github.com/llvm/llvm-project/commit/943513b79929fba1a9dccdf81cb68a41ce29cd03
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-11-27 (Wed, 27 Nov 2019)

  Changed paths:
    M llvm/lib/Target/X86/X86FrameLowering.cpp
    A llvm/test/CodeGen/X86/win64-stackprobe-overflow.ll

  Log Message:
  -----------
  [X86] [Win64] Avoid truncating large (> 32 bit) stack allocations

This fixes PR44129, which was broken in a7adc3185b (in 7.0.0
and newer).

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


  Commit: 47046f05e66c23567d6672ea5a1afd8ed2c411ed
      https://github.com/llvm/llvm-project/commit/47046f05e66c23567d6672ea5a1afd8ed2c411ed
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-11-27 (Wed, 27 Nov 2019)

  Changed paths:
    M llvm/lib/MC/MCDwarf.cpp
    A llvm/test/MC/COFF/cfi-sections.s

  Log Message:
  -----------
  [MC] Produce proper section relative relocations for COFF in .debug_frame

The third parameter to Streamer.EmitSymbolValue() is "bool
IsSectionRelative = false".

For ELF, these debug sections are mapped to address zero, so a normal,
absolute address relocation works just fine, but COFF needs a section
relative relocation, and COFF is the only target where
needsDwarfSectionOffsetDirective() returns true. This matches how
EmitSymbolValue is called elsewhere in the same source file.

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


  Commit: d11dc9e77b63b245f4b07fb60b2acae226e3fdcb
      https://github.com/llvm/llvm-project/commit/d11dc9e77b63b245f4b07fb60b2acae226e3fdcb
  Author: Martin Storsjö <martin at martin.st>
  Date:   2019-11-27 (Wed, 27 Nov 2019)

  Changed paths:
    M llvm/tools/llvm-objcopy/COFF/Object.h

  Log Message:
  -----------
  [llvm-objcopy] [COFF] Fix a typo in a comment. NFC.


Compare: https://github.com/llvm/llvm-project/compare/3a280422b66a...d11dc9e77b63


More information about the All-commits mailing list