[all-commits] [llvm/llvm-project] f21203: Add support for a "load binary" LC_NOTE in mach-o ...

Jason Molenda via All-commits all-commits at lists.llvm.org
Mon Dec 13 13:22:12 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f2120328e81879bf14d2a5c381749a11577fa304
      https://github.com/llvm/llvm-project/commit/f2120328e81879bf14d2a5c381749a11577fa304
  Author: Jason Molenda <jason at molenda.com>
  Date:   2021-12-13 (Mon, 13 Dec 2021)

  Changed paths:
    M lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
    M lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.h
    M lldb/test/API/macosx/corefile-default-ptrauth/TestCorefileDefaultPtrauth.py
    M lldb/test/API/macosx/corefile-default-ptrauth/create-corefile.c

  Log Message:
  -----------
  Add support for a "load binary" LC_NOTE in mach-o corefiles

Add lldb support for a Mach-O "load binary" LC_NOTE which provides
a UUID, load address/slide, and possibly a name of a binary that
should be loaded when examining the core.

struct load_binary
{
    uint32_t version;        // currently 1
    uuid_t   uuid;           // all zeroes if uuid not specified
    uint64_t load_address;   // virtual address where the macho is loaded, UINT64_MAX if unavail
    uint64_t slide;          // slide to be applied to file address to get load address, 0 if unavail
    char     name_cstring[]; // must be nul-byte terminated c-string, '\0' alone if name unavail
} __attribute__((packed));

Differential Revision: https://reviews.llvm.org/D115494
rdar://85069250




More information about the All-commits mailing list