Files
clang-p2996/lldb/source/Plugins/Process/Utility/LinuxProcMaps.h
Greg Clayton 026e1bf56a Cache memory regions in ProcessMinidump and use the linux maps as the source of the information if available
Breakpad creates minidump files that sometimes have:
- linux maps textual content
- no MemoryInfoList

Right now unless the file has a MemoryInfoList we get no region information.

This patch:

- reads and caches the memory region info one time and sorts it for easy subsequent access
- get the region info from the best source in this order:
  - linux maps info (if available)
  - MemoryInfoList (if available)
  - MemoryList or Memory64List
- returns memory region info for the gaps between regions (before the first and after the last)

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

llvm-svn: 349182
2018-12-14 19:36:01 +00:00

29 lines
845 B
C++

//===-- LinuxProcMaps.h -----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_LinuxProcMaps_H_
#define liblldb_LinuxProcMaps_H_
#include "lldb/lldb-forward.h"
#include "llvm/ADT/StringRef.h"
#include <functional>
namespace lldb_private {
typedef std::function<bool(const lldb_private::MemoryRegionInfo &,
const lldb_private::Status &)> LinuxMapCallback;
void ParseLinuxMapRegions(llvm::StringRef linux_map,
LinuxMapCallback const &callback);
} // namespace lldb_private
#endif // liblldb_LinuxProcMaps_H_