Summary: This plugin resembles the already existing Windows-only Minidump plugin. The WinMinidumpPlugin uses the Windows API for parsing Minidumps while this plugin is cross-platform because it includes a Minidump parser (which is already commited) It is able to produce a backtrace, to read the general puprose regiters, inspect local variables, show image list, do memory reads, etc. For now the only arches that this supports are x86_32 and x86_64. This is because I have only written register contexts for those. Others will come in next CLs. I copied the WinMinidump tests and adapted them a little bit for them to work with the new plugin (and they pass) I will add more tests, aiming for better code coverage. There is still functionality to be added, see TODOs in code. Reviewers: labath, zturner Subscribers: beanz, mgorny, modocache, lldb-commits, amccarth Differential Revision: https://reviews.llvm.org/D25905 llvm-svn: 285587
53 lines
1.2 KiB
C++
53 lines
1.2 KiB
C++
//===-- ThreadMinidump.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_ThreadMinidump_h_
|
|
#define liblldb_ThreadMinidump_h_
|
|
|
|
// Project includes
|
|
#include "MinidumpTypes.h"
|
|
|
|
// Other libraries and framework includes
|
|
#include "lldb/Target/Thread.h"
|
|
|
|
// C Includes
|
|
// C++ Includes
|
|
|
|
namespace lldb_private {
|
|
|
|
namespace minidump {
|
|
|
|
class ThreadMinidump : public Thread {
|
|
public:
|
|
ThreadMinidump(Process &process, const MinidumpThread &td,
|
|
llvm::ArrayRef<uint8_t> gpregset_data);
|
|
|
|
~ThreadMinidump() override;
|
|
|
|
void RefreshStateAfterStop() override;
|
|
|
|
lldb::RegisterContextSP GetRegisterContext() override;
|
|
|
|
lldb::RegisterContextSP
|
|
CreateRegisterContextForFrame(StackFrame *frame) override;
|
|
|
|
void ClearStackFrames() override;
|
|
|
|
protected:
|
|
lldb::RegisterContextSP m_thread_reg_ctx_sp;
|
|
llvm::ArrayRef<uint8_t> m_gpregset_data;
|
|
|
|
bool CalculateStopInfo() override;
|
|
};
|
|
|
|
} // namespace minidump
|
|
} // namespace lldb_private
|
|
|
|
#endif // liblldb_ThreadMinidump_h_
|