[all-commits] [llvm/llvm-project] 9abd8c: [elf-core] Improve reading memory from core file

Djordje Todorovic via All-commits all-commits at lists.llvm.org
Mon Feb 8 00:19:58 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9abd8c1a4c3870f2831ee805cd3c0cec516a1c17
      https://github.com/llvm/llvm-project/commit/9abd8c1a4c3870f2831ee805cd3c0cec516a1c17
  Author: Djordje Todorovic <djordje.todorovic at syrmia.com>
  Date:   2021-02-08 (Mon, 08 Feb 2021)

  Changed paths:
    M lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
    M lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py

  Log Message:
  -----------
  [elf-core] Improve reading memory from core file

This patch tries to improve memory-read from core files
(in order to improve disassembly functionality).

I am using RHEL 7.7 (linux kernel 3.10) and for a lot of cases,
I was not able to disassemble some functions from backtrace when
debugging crashes from core files. It outputs some dummy code.

The cause of the problem was the fact we are returning all the zeros
from ProcessElfCore::ReadMemory() that is being called within
Disassembler::ParseInstructions() and it disassembles some dummy
opcodes from the buffer returned. Therefore, we are removing zero
bytes filling (padding) completely.

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




More information about the All-commits mailing list