Fix Clang-tidy modernize-use-override warnings in some files in source/Plugins; other minor fixes.

Differential Revision: http://reviews.llvm.org/D13840

llvm-svn: 250721
This commit is contained in:
Eugene Zelenko 2015-10-19 18:52:10 +00:00
parent 755e502952
commit 0af149a813
17 changed files with 324 additions and 305 deletions

View File

@ -1,4 +1,4 @@
//===-- ProcessElfCore.h ---------------------------------------*- C++ -*-===//
//===-- ProcessElfCore.h ----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -17,11 +17,13 @@
#ifndef liblldb_ProcessElfCore_h_
#define liblldb_ProcessElfCore_h_
// C Includes
// C++ Includes
#include <list>
#include <vector>
// Other libraries and framework includes
// Project includes
#include "lldb/Core/ConstString.h"
#include "lldb/Core/Error.h"
#include "lldb/Target/Process.h"
@ -60,8 +62,7 @@ public:
lldb_private::Listener &listener,
const lldb_private::FileSpec &core_file);
virtual
~ProcessElfCore();
~ProcessElfCore() override;
//------------------------------------------------------------------
// Check if a given Process
@ -157,4 +158,4 @@ private:
AddAddressRangeFromLoadSegment(const elf::ELFProgramHeader *header);
};
#endif // liblldb_ProcessElffCore_h_
#endif // liblldb_ProcessElfCore_h_

View File

@ -1,15 +1,19 @@
//===-- RegisterContextCorePOSIX_arm.h -----------------------*- C++ -*-===//
//===-- RegisterContextCorePOSIX_arm.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_RegisterContextCorePOSIX_arm_H_
#define liblldb_RegisterContextCorePOSIX_arm_H_
#ifndef liblldb_RegisterContextCorePOSIX_arm_h_
#define liblldb_RegisterContextCorePOSIX_arm_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Core/DataBufferHeap.h"
#include "Plugins/Process/Utility/RegisterContextPOSIX_arm.h"
@ -22,39 +26,41 @@ public:
const lldb_private::DataExtractor &gpregset,
const lldb_private::DataExtractor &fpregset);
~RegisterContextCorePOSIX_arm();
virtual bool
ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
virtual bool
WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value);
~RegisterContextCorePOSIX_arm() override;
bool
ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
ReadRegister(const lldb_private::RegisterInfo *reg_info,
lldb_private::RegisterValue &value) override;
bool
WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
WriteRegister(const lldb_private::RegisterInfo *reg_info,
const lldb_private::RegisterValue &value) override;
bool
HardwareSingleStep(bool enable);
ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
bool
WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
bool
HardwareSingleStep(bool enable) override;
protected:
bool
ReadGPR();
ReadGPR() override;
bool
ReadFPR();
ReadFPR() override;
bool
WriteGPR();
WriteGPR() override;
bool
WriteFPR();
WriteFPR() override;
private:
lldb::DataBufferSP m_gpr_buffer;
lldb_private::DataExtractor m_gpr;
};
#endif // #ifndef liblldb_RegisterContextCorePOSIX_arm_H_
#endif // liblldb_RegisterContextCorePOSIX_arm_h_

View File

@ -1,15 +1,19 @@
//===-- RegisterContextCorePOSIX_arm64.h -----------------------*- C++ -*-===//
//===-- RegisterContextCorePOSIX_arm64.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_RegisterContextCorePOSIX_arm64_H_
#define liblldb_RegisterContextCorePOSIX_arm64_H_
#ifndef liblldb_RegisterContextCorePOSIX_arm64_h_
#define liblldb_RegisterContextCorePOSIX_arm64_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Core/DataBufferHeap.h"
#include "Plugins/Process/Utility/RegisterContextPOSIX_arm64.h"
@ -22,39 +26,41 @@ public:
const lldb_private::DataExtractor &gpregset,
const lldb_private::DataExtractor &fpregset);
~RegisterContextCorePOSIX_arm64();
virtual bool
ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
virtual bool
WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value);
~RegisterContextCorePOSIX_arm64() override;
bool
ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
ReadRegister(const lldb_private::RegisterInfo *reg_info,
lldb_private::RegisterValue &value) override;
bool
WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
WriteRegister(const lldb_private::RegisterInfo *reg_info,
const lldb_private::RegisterValue &value) override;
bool
HardwareSingleStep(bool enable);
ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
bool
WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
bool
HardwareSingleStep(bool enable) override;
protected:
bool
ReadGPR();
ReadGPR() override;
bool
ReadFPR();
ReadFPR() override;
bool
WriteGPR();
WriteGPR() override;
bool
WriteFPR();
WriteFPR() override;
private:
lldb::DataBufferSP m_gpr_buffer;
lldb_private::DataExtractor m_gpr;
};
#endif // #ifndef liblldb_RegisterContextCorePOSIX_arm64_H_
#endif // liblldb_RegisterContextCorePOSIX_arm64_h_

View File

@ -1,15 +1,19 @@
//===-- RegisterContextCorePOSIX_mips64.h ----------------------*- C++ -*-===//
//===-- RegisterContextCorePOSIX_mips64.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_RegisterContextCorePOSIX_mips64_H_
#define liblldb_RegisterContextCorePOSIX_mips64_H_
#ifndef liblldb_RegisterContextCorePOSIX_mips64_h_
#define liblldb_RegisterContextCorePOSIX_mips64_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Core/DataBufferHeap.h"
#include "Plugins/Process/Utility/RegisterContextPOSIX_mips64.h"
@ -22,39 +26,41 @@ public:
const lldb_private::DataExtractor &gpregset,
const lldb_private::DataExtractor &fpregset);
~RegisterContextCorePOSIX_mips64();
virtual bool
ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
virtual bool
WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value);
~RegisterContextCorePOSIX_mips64() override;
bool
ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
ReadRegister(const lldb_private::RegisterInfo *reg_info,
lldb_private::RegisterValue &value) override;
bool
WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
WriteRegister(const lldb_private::RegisterInfo *reg_info,
const lldb_private::RegisterValue &value) override;
bool
HardwareSingleStep(bool enable);
ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
bool
WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
bool
HardwareSingleStep(bool enable) override;
protected:
bool
ReadGPR();
ReadGPR() override;
bool
ReadFPR();
ReadFPR() override;
bool
WriteGPR();
WriteGPR() override;
bool
WriteFPR();
WriteFPR() override;
private:
lldb::DataBufferSP m_gpr_buffer;
lldb_private::DataExtractor m_gpr;
};
#endif // #ifndef liblldb_RegisterContextCorePOSIX_mips64_H_
#endif // liblldb_RegisterContextCorePOSIX_mips64_h_

View File

@ -5,11 +5,15 @@
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===---------------------------------------------------------------------===//
//===----------------------------------------------------------------------===//
#ifndef liblldb_RegisterContextCorePOSIX_powerpc_H_
#define liblldb_RegisterContextCorePOSIX_powerpc_H_
#ifndef liblldb_RegisterContextCorePOSIX_powerpc_h_
#define liblldb_RegisterContextCorePOSIX_powerpc_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Core/DataBufferHeap.h"
#include "Plugins/Process/Utility/RegisterContextPOSIX_powerpc.h"
@ -23,41 +27,43 @@ public:
const lldb_private::DataExtractor &fpregset,
const lldb_private::DataExtractor &vregset);
~RegisterContextCorePOSIX_powerpc();
virtual bool
ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
virtual bool
WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value);
~RegisterContextCorePOSIX_powerpc() override;
bool
ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
ReadRegister(const lldb_private::RegisterInfo *reg_info,
lldb_private::RegisterValue &value) override;
bool
WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
WriteRegister(const lldb_private::RegisterInfo *reg_info,
const lldb_private::RegisterValue &value) override;
bool
HardwareSingleStep(bool enable);
ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
bool
WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
bool
HardwareSingleStep(bool enable) override;
protected:
bool
ReadGPR();
ReadGPR() override;
bool
ReadFPR();
ReadFPR() override;
bool
ReadVMX();
ReadVMX() override;
bool
WriteGPR();
WriteGPR() override;
bool
WriteFPR();
WriteFPR() override;
bool
WriteVMX();
WriteVMX() override;
private:
lldb::DataBufferSP m_gpr_buffer;
@ -68,4 +74,4 @@ private:
lldb_private::DataExtractor m_vec;
};
#endif // #ifndef liblldb_RegisterContextCorePOSIX_powerpc_H_
#endif // liblldb_RegisterContextCorePOSIX_powerpc_h_

View File

@ -1,15 +1,19 @@
//===-- RegisterContextCorePOSIX_x86_64.h ----------------------*- C++ -*-===//
//===-- RegisterContextCorePOSIX_x86_64.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_RegisterContextCorePOSIX_x86_64_H_
#define liblldb_RegisterContextCorePOSIX_x86_64_H_
#ifndef liblldb_RegisterContextCorePOSIX_x86_64_h_
#define liblldb_RegisterContextCorePOSIX_x86_64_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "Plugins/Process/Utility/RegisterContextPOSIX_x86.h"
class RegisterContextCorePOSIX_x86_64 :
@ -21,38 +25,40 @@ public:
const lldb_private::DataExtractor &gpregset,
const lldb_private::DataExtractor &fpregset);
~RegisterContextCorePOSIX_x86_64();
virtual bool
ReadRegister(const lldb_private::RegisterInfo *reg_info, lldb_private::RegisterValue &value);
virtual bool
WriteRegister(const lldb_private::RegisterInfo *reg_info, const lldb_private::RegisterValue &value);
~RegisterContextCorePOSIX_x86_64() override;
bool
ReadAllRegisterValues(lldb::DataBufferSP &data_sp);
ReadRegister(const lldb_private::RegisterInfo *reg_info,
lldb_private::RegisterValue &value) override;
bool
WriteAllRegisterValues(const lldb::DataBufferSP &data_sp);
WriteRegister(const lldb_private::RegisterInfo *reg_info,
const lldb_private::RegisterValue &value) override;
bool
HardwareSingleStep(bool enable);
ReadAllRegisterValues(lldb::DataBufferSP &data_sp) override;
bool
WriteAllRegisterValues(const lldb::DataBufferSP &data_sp) override;
bool
HardwareSingleStep(bool enable) override;
protected:
bool
ReadGPR();
ReadGPR() override;
bool
ReadFPR();
ReadFPR() override;
bool
WriteGPR();
WriteGPR() override;
bool
WriteFPR();
WriteFPR() override;
private:
uint8_t *m_gpregset;
};
#endif // #ifndef liblldb_RegisterContextCorePOSIX_x86_64_H_
#endif // liblldb_RegisterContextCorePOSIX_x86_64_h_

View File

@ -1,4 +1,4 @@
//===-- ThreadElfCore.h ----------------------------------------*- C++ -*-===//
//===-- ThreadElfCore.h -----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -10,8 +10,12 @@
#ifndef liblldb_ThreadElfCore_h_
#define liblldb_ThreadElfCore_h_
// C Includes
// C++ Includes
#include <string>
// Other libraries and framework includes
// Project includes
#include "lldb/Target/Thread.h"
#include "lldb/Core/DataExtractor.h"
@ -104,7 +108,6 @@ struct ELFLinuxPrPsInfo
return 0;
}
}
};
struct ThreadData
@ -122,20 +125,19 @@ class ThreadElfCore : public lldb_private::Thread
public:
ThreadElfCore (lldb_private::Process &process, const ThreadData &td);
virtual
~ThreadElfCore ();
~ThreadElfCore() override;
virtual void
RefreshStateAfterStop();
void
RefreshStateAfterStop() override;
virtual lldb::RegisterContextSP
GetRegisterContext ();
lldb::RegisterContextSP
GetRegisterContext() override;
virtual lldb::RegisterContextSP
CreateRegisterContextForFrame (lldb_private::StackFrame *frame);
lldb::RegisterContextSP
CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override;
virtual void
ClearStackFrames ();
void
ClearStackFrames() override;
static bool
ThreadIDIsValid (lldb::tid_t thread)
@ -143,8 +145,8 @@ public:
return thread != 0;
}
virtual const char *
GetName ()
const char *
GetName() override
{
if (m_thread_name.empty())
return NULL;
@ -152,7 +154,7 @@ public:
}
void
SetName (const char *name)
SetName(const char *name) override
{
if (name && name[0])
m_thread_name.assign (name);
@ -173,8 +175,7 @@ protected:
lldb_private::DataExtractor m_fpregset_data;
lldb_private::DataExtractor m_vregset_data;
virtual bool CalculateStopInfo();
bool CalculateStopInfo() override;
};
#endif // liblldb_ThreadElfCore_h_
#endif // liblldb_ThreadElfCore_h_

View File

@ -11,12 +11,12 @@
#define liblldb_ProcessMachCore_h_
// C Includes
// C++ Includes
#include <list>
#include <vector>
// Other libraries and framework includes
// Project includes
#include "lldb/Core/ConstString.h"
#include "lldb/Core/Error.h"
#include "lldb/Target/Process.h"
@ -29,6 +29,12 @@ public:
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
ProcessMachCore(lldb::TargetSP target_sp,
lldb_private::Listener &listener,
const lldb_private::FileSpec &core_file);
~ProcessMachCore() override;
static lldb::ProcessSP
CreateInstance (lldb::TargetSP target_sp,
lldb_private::Listener &listener,
@ -46,16 +52,6 @@ public:
static const char *
GetPluginDescriptionStatic();
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
ProcessMachCore(lldb::TargetSP target_sp,
lldb_private::Listener &listener,
const lldb_private::FileSpec &core_file);
virtual
~ProcessMachCore();
//------------------------------------------------------------------
// Check if a given Process
//------------------------------------------------------------------
@ -117,7 +113,7 @@ protected:
void
Clear ( );
virtual bool
bool
UpdateThreadList (lldb_private::ThreadList &old_thread_list,
lldb_private::ThreadList &new_thread_list) override;
@ -161,8 +157,8 @@ private:
lldb::addr_t m_dyld_addr;
lldb::addr_t m_mach_kernel_addr;
lldb_private::ConstString m_dyld_plugin_name;
DISALLOW_COPY_AND_ASSIGN (ProcessMachCore);
};
#endif // liblldb_ProcessMachCore_h_
#endif // liblldb_ProcessMachCore_h_

View File

@ -10,8 +10,12 @@
#ifndef liblldb_ThreadMachCore_h_
#define liblldb_ThreadMachCore_h_
// C Includes
// C++ Includes
#include <string>
// Other libraries and framework includes
// Project includes
#include "lldb/Target/Thread.h"
class ProcessMachCore;
@ -22,20 +26,19 @@ public:
ThreadMachCore (lldb_private::Process &process,
lldb::tid_t tid);
virtual
~ThreadMachCore ();
~ThreadMachCore() override;
virtual void
RefreshStateAfterStop();
void
RefreshStateAfterStop() override;
virtual const char *
GetName ();
const char *
GetName() override;
virtual lldb::RegisterContextSP
GetRegisterContext ();
lldb::RegisterContextSP
GetRegisterContext() override;
virtual lldb::RegisterContextSP
CreateRegisterContextForFrame (lldb_private::StackFrame *frame);
lldb::RegisterContextSP
CreateRegisterContextForFrame(lldb_private::StackFrame *frame) override;
static bool
ThreadIDIsValid (lldb::tid_t thread);
@ -47,7 +50,7 @@ public:
GetBasicInfoAsString ();
void
SetName (const char *name)
SetName(const char *name) override
{
if (name && name[0])
m_thread_name.assign (name);
@ -68,7 +71,6 @@ public:
}
protected:
friend class ProcessMachCore;
//------------------------------------------------------------------
@ -78,11 +80,12 @@ protected:
std::string m_dispatch_queue_name;
lldb::addr_t m_thread_dispatch_qaddr;
lldb::RegisterContextSP m_thread_reg_ctx_sp;
//------------------------------------------------------------------
// Protected member functions.
//------------------------------------------------------------------
virtual bool
CalculateStopInfo ();
bool
CalculateStopInfo() override;
};
#endif // liblldb_ThreadMachCore_h_
#endif // liblldb_ThreadMachCore_h_

View File

@ -10,6 +10,10 @@
#ifndef liblldb_ScriptInterpreterNone_h_
#define liblldb_ScriptInterpreterNone_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Interpreter/ScriptInterpreter.h"
namespace lldb_private
@ -20,14 +24,14 @@ class ScriptInterpreterNone : public ScriptInterpreter
public:
ScriptInterpreterNone(CommandInterpreter &interpreter);
~ScriptInterpreterNone();
~ScriptInterpreterNone() override;
bool
ExecuteOneLine(const char *command, CommandReturnObject *result,
const ExecuteScriptOptions &options = ExecuteScriptOptions());
const ExecuteScriptOptions &options = ExecuteScriptOptions()) override;
void
ExecuteInterpreterLoop();
ExecuteInterpreterLoop() override;
//------------------------------------------------------------------
// Static Functions
@ -50,13 +54,13 @@ class ScriptInterpreterNone : public ScriptInterpreter
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
virtual lldb_private::ConstString
GetPluginName();
lldb_private::ConstString
GetPluginName() override;
virtual uint32_t
GetPluginVersion();
uint32_t
GetPluginVersion() override;
};
} // namespace lldb_private
#endif // #ifndef liblldb_ScriptInterpreterNone_h_
#endif // liblldb_ScriptInterpreterNone_h_

View File

@ -10,17 +10,20 @@
#ifndef SymbolFileDWARF_DWARFASTParserClang_h_
#define SymbolFileDWARF_DWARFASTParserClang_h_
#include "DWARFDefines.h"
#include "DWARFASTParser.h"
// C Includes
// C++ Includes
// Other libraries and framework includes
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "clang/AST/CharUnits.h"
// Project includes
#include "lldb/Core/ClangForward.h"
#include "lldb/Core/PluginInterface.h"
#include "lldb/Symbol/ClangASTContext.h"
#include "DWARFDefines.h"
#include "DWARFASTParser.h"
class DWARFDebugInfoEntry;
class DWARFDIECollection;
@ -30,7 +33,7 @@ class DWARFASTParserClang : public DWARFASTParser
public:
DWARFASTParserClang (lldb_private::ClangASTContext &ast);
virtual ~DWARFASTParserClang ();
~DWARFASTParserClang() override;
lldb::TypeSP
ParseTypeFromDWARF (const lldb_private::SymbolContext& sc,
@ -39,25 +42,25 @@ public:
bool *type_is_new_ptr) override;
virtual lldb_private::Function *
lldb_private::Function *
ParseFunctionFromDWARF (const lldb_private::SymbolContext& sc,
const DWARFDIE &die) override;
virtual bool
bool
CompleteTypeFromDWARF (const DWARFDIE &die,
lldb_private::Type *type,
lldb_private::CompilerType &compiler_type) override;
virtual lldb_private::CompilerDecl
lldb_private::CompilerDecl
GetDeclForUIDFromDWARF (const DWARFDIE &die) override;
virtual std::vector<DWARFDIE>
std::vector<DWARFDIE>
GetDIEForDeclContext (lldb_private::CompilerDeclContext decl_context) override;
virtual lldb_private::CompilerDeclContext
lldb_private::CompilerDeclContext
GetDeclContextForUIDFromDWARF (const DWARFDIE &die) override;
virtual lldb_private::CompilerDeclContext
lldb_private::CompilerDeclContext
GetDeclContextContainingUIDFromDWARF (const DWARFDIE &die) override;
bool
@ -67,8 +70,8 @@ public:
llvm::DenseMap<const clang::FieldDecl *, uint64_t> &field_offsets,
llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits> &base_offsets,
llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits> &vbase_offsets);
protected:
protected:
class DelayedAddObjCClassProperty;
typedef std::vector <DelayedAddObjCClassProperty> DelayedPropertyList;
@ -128,7 +131,6 @@ protected:
std::vector<clang::ParmVarDecl*>& function_param_decls,
unsigned &type_quals);
void
ParseChildArrayInfo (const lldb_private::SymbolContext& sc,
const DWARFDIE &parent_die,
@ -137,7 +139,6 @@ protected:
uint32_t& byte_stride,
uint32_t& bit_stride);
size_t
ParseChildEnumerators (const lldb_private::SymbolContext& sc,
lldb_private::CompilerType &compiler_type,
@ -189,4 +190,4 @@ protected:
RecordDeclToLayoutMap m_record_decl_to_layout_map;
};
#endif // SymbolFileDWARF_DWARFASTParserClang_h_
#endif // SymbolFileDWARF_DWARFASTParserClang_h_

View File

@ -1,4 +1,4 @@
//===-- DWARFASTParserGo.h -----------------------------------*- C++ -*-===//
//===-- DWARFASTParserGo.h --------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -10,61 +10,66 @@
#ifndef SymbolFileDWARF_DWARFASTParserGo_h_
#define SymbolFileDWARF_DWARFASTParserGo_h_
#include "DWARFDefines.h"
#include "DWARFASTParser.h"
#include "DWARFDIE.h"
// C Includes
// C++ Includes
// Other libraries and framework includes
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
// Project includes
#include "lldb/Core/PluginInterface.h"
#include "lldb/Symbol/GoASTContext.h"
#include "DWARFDefines.h"
#include "DWARFASTParser.h"
#include "DWARFDIE.h"
class DWARFDebugInfoEntry;
class DWARFDIECollection;
class DWARFASTParserGo : public DWARFASTParser
{
public:
public:
DWARFASTParserGo(lldb_private::GoASTContext &ast);
virtual ~DWARFASTParserGo();
~DWARFASTParserGo() override;
lldb::TypeSP ParseTypeFromDWARF(const lldb_private::SymbolContext &sc, const DWARFDIE &die, lldb_private::Log *log,
bool *type_is_new_ptr) override;
virtual lldb_private::Function *ParseFunctionFromDWARF(const lldb_private::SymbolContext &sc,
const DWARFDIE &die) override;
lldb_private::Function *
ParseFunctionFromDWARF(const lldb_private::SymbolContext &sc,
const DWARFDIE &die) override;
virtual bool CompleteTypeFromDWARF(const DWARFDIE &die, lldb_private::Type *type,
lldb_private::CompilerType &go_type) override;
bool
CompleteTypeFromDWARF(const DWARFDIE &die, lldb_private::Type *type,
lldb_private::CompilerType &go_type) override;
virtual lldb_private::CompilerDeclContext
lldb_private::CompilerDeclContext
GetDeclContextForUIDFromDWARF(const DWARFDIE &die) override
{
return lldb_private::CompilerDeclContext();
}
virtual lldb_private::CompilerDeclContext
lldb_private::CompilerDeclContext
GetDeclContextContainingUIDFromDWARF(const DWARFDIE &die) override
{
return lldb_private::CompilerDeclContext();
}
virtual lldb_private::CompilerDecl
lldb_private::CompilerDecl
GetDeclForUIDFromDWARF (const DWARFDIE &die) override
{
return lldb_private::CompilerDecl();
}
virtual std::vector<DWARFDIE>
std::vector<DWARFDIE>
GetDIEForDeclContext (lldb_private::CompilerDeclContext decl_context) override
{
return std::vector<DWARFDIE>();
}
private:
private:
size_t ParseChildParameters(const lldb_private::SymbolContext &sc, const DWARFDIE &parent_die, bool &is_variadic,
std::vector<lldb_private::CompilerType> &function_param_types);
void ParseChildArrayInfo(const lldb_private::SymbolContext &sc, const DWARFDIE &parent_die, int64_t &first_index,

View File

@ -1,4 +1,4 @@
//===-- LogChannelDWARF.h --------------------------------------*- C++ -*-===//
//===-- LogChannelDWARF.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -13,7 +13,6 @@
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/Core/Log.h"
@ -34,8 +33,7 @@ class LogChannelDWARF : public lldb_private::LogChannel
public:
LogChannelDWARF ();
virtual
~LogChannelDWARF ();
~LogChannelDWARF() override;
static void
Initialize();
@ -52,26 +50,26 @@ public:
static lldb_private::LogChannel *
CreateInstance ();
virtual lldb_private::ConstString
GetPluginName();
lldb_private::ConstString
GetPluginName() override;
virtual uint32_t
GetPluginVersion();
uint32_t
GetPluginVersion() override;
virtual void
Disable (const char** categories, lldb_private::Stream *feedback_strm);
void
Disable(const char** categories, lldb_private::Stream *feedback_strm) override;
void
Delete ();
virtual bool
Enable (lldb::StreamSP &log_stream_sp,
uint32_t log_options,
lldb_private::Stream *feedback_strm, // Feedback stream for argument errors etc
const char **categories); // The categories to enable within this logging stream, if empty, enable default set
bool
Enable(lldb::StreamSP &log_stream_sp,
uint32_t log_options,
lldb_private::Stream *feedback_strm, // Feedback stream for argument errors etc
const char **categories) override; // The categories to enable within this logging stream, if empty, enable default set
virtual void
ListCategories (lldb_private::Stream *strm);
void
ListCategories(lldb_private::Stream *strm) override;
static lldb_private::Log *
GetLog ();
@ -86,4 +84,4 @@ public:
LogIf (uint32_t mask, const char *format, ...);
};
#endif // SymbolFileDWARF_LogChannelDWARF_h_
#endif // SymbolFileDWARF_LogChannelDWARF_h_

View File

@ -1,4 +1,4 @@
//===-- SymbolFileDWARFDebugMap.cpp ----------------------------*- C++ -*-===//
//===-- SymbolFileDWARFDebugMap.cpp -----------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "SymbolFileDWARFDebugMap.h"
#include "DWARFDebugAranges.h"
@ -41,9 +45,6 @@ using namespace lldb_private;
// (so we can fixup the object file sections) and also for "Module::GetSymbolVendor()"
// (so we can fixup the symbol file id.
const SymbolFileDWARFDebugMap::FileRangeMap &
SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(SymbolFileDWARFDebugMap *exe_symfile)
{
@ -173,7 +174,6 @@ SymbolFileDWARFDebugMap::CompileUnitInfo::GetFileRangeMap(SymbolFileDWARFDebugMa
return file_range_map;
}
class DebugMapModule : public Module
{
public:
@ -190,14 +190,10 @@ public:
{
}
virtual
~DebugMapModule ()
{
}
~DebugMapModule() override = default;
virtual SymbolVendor*
GetSymbolVendor(bool can_create = true, lldb_private::Stream *feedback_strm = NULL)
SymbolVendor*
GetSymbolVendor(bool can_create = true, lldb_private::Stream *feedback_strm = NULL) override
{
// Scope for locker
if (m_symfile_ap.get() || can_create == false)
@ -259,7 +255,6 @@ SymbolFileDWARFDebugMap::Terminate()
PluginManager::UnregisterPlugin (CreateInstance);
}
lldb_private::ConstString
SymbolFileDWARFDebugMap::GetPluginNameStatic()
{
@ -279,7 +274,6 @@ SymbolFileDWARFDebugMap::CreateInstance (ObjectFile* obj_file)
return new SymbolFileDWARFDebugMap (obj_file);
}
SymbolFileDWARFDebugMap::SymbolFileDWARFDebugMap (ObjectFile* ofile) :
SymbolFile(ofile),
m_flags(),
@ -290,7 +284,6 @@ SymbolFileDWARFDebugMap::SymbolFileDWARFDebugMap (ObjectFile* ofile) :
{
}
SymbolFileDWARFDebugMap::~SymbolFileDWARFDebugMap()
{
}
@ -508,7 +501,6 @@ SymbolFileDWARFDebugMap::GetModuleByCompUnitInfo (CompileUnitInfo *comp_unit_inf
return NULL;
}
bool
SymbolFileDWARFDebugMap::GetFileSpecForSO (uint32_t oso_idx, FileSpec &file_spec)
{
@ -523,8 +515,6 @@ SymbolFileDWARFDebugMap::GetFileSpecForSO (uint32_t oso_idx, FileSpec &file_spec
return false;
}
ObjectFile *
SymbolFileDWARFDebugMap::GetObjectFileByOSOIndex (uint32_t oso_idx)
{
@ -552,7 +542,6 @@ SymbolFileDWARFDebugMap::GetObjectFileByCompUnitInfo (CompileUnitInfo *comp_unit
return NULL;
}
uint32_t
SymbolFileDWARFDebugMap::GetCompUnitInfoIndex (const CompileUnitInfo *comp_unit_info)
{
@ -628,7 +617,6 @@ SymbolFileDWARFDebugMap::GetNumCompileUnits()
return m_compile_unit_infos.size();
}
CompUnitSP
SymbolFileDWARFDebugMap::ParseCompileUnitAtIndex(uint32_t cu_idx)
{
@ -679,7 +667,6 @@ SymbolFileDWARFDebugMap::GetCompUnitInfo (const SymbolContext& sc)
return NULL;
}
size_t
SymbolFileDWARFDebugMap::GetCompUnitInfosForModule (const lldb_private::Module *module, std::vector<CompileUnitInfo *>& cu_infos)
{
@ -746,7 +733,6 @@ SymbolFileDWARFDebugMap::ParseFunctionBlocks (const SymbolContext& sc)
return 0;
}
size_t
SymbolFileDWARFDebugMap::ParseTypes (const SymbolContext& sc)
{
@ -756,7 +742,6 @@ SymbolFileDWARFDebugMap::ParseTypes (const SymbolContext& sc)
return 0;
}
size_t
SymbolFileDWARFDebugMap::ParseVariablesForContext (const SymbolContext& sc)
{
@ -766,8 +751,6 @@ SymbolFileDWARFDebugMap::ParseVariablesForContext (const SymbolContext& sc)
return 0;
}
Type*
SymbolFileDWARFDebugMap::ResolveTypeUID(lldb::user_id_t type_uid)
{
@ -838,7 +821,6 @@ SymbolFileDWARFDebugMap::ResolveSymbolContext (const Address& exe_so_addr, uint3
return resolved_flags;
}
uint32_t
SymbolFileDWARFDebugMap::ResolveSymbolContext (const FileSpec& file_spec, uint32_t line, bool check_inlines, uint32_t resolve_scope, SymbolContextList& sc_list)
{
@ -949,7 +931,6 @@ SymbolFileDWARFDebugMap::FindGlobalVariables (const ConstString &name,
return variables.GetSize() - original_size;
}
uint32_t
SymbolFileDWARFDebugMap::FindGlobalVariables (const RegularExpression& regex, bool append, uint32_t max_matches, VariableList& variables)
{
@ -991,7 +972,6 @@ SymbolFileDWARFDebugMap::FindGlobalVariables (const RegularExpression& regex, bo
return variables.GetSize() - original_size;
}
int
SymbolFileDWARFDebugMap::SymbolContainsSymbolWithIndex (uint32_t *symbol_idx_ptr, const CompileUnitInfo *comp_unit_info)
{
@ -1006,7 +986,6 @@ SymbolFileDWARFDebugMap::SymbolContainsSymbolWithIndex (uint32_t *symbol_idx_ptr
return 1;
}
int
SymbolFileDWARFDebugMap::SymbolContainsSymbolWithID (user_id_t *symbol_idx_ptr, const CompileUnitInfo *comp_unit_info)
{
@ -1021,7 +1000,6 @@ SymbolFileDWARFDebugMap::SymbolContainsSymbolWithID (user_id_t *symbol_idx_ptr,
return 1;
}
SymbolFileDWARFDebugMap::CompileUnitInfo*
SymbolFileDWARFDebugMap::GetCompileUnitInfoForSymbolWithIndex (uint32_t symbol_idx, uint32_t *oso_idx_ptr)
{
@ -1070,7 +1048,6 @@ SymbolFileDWARFDebugMap::GetCompileUnitInfoForSymbolWithID (user_id_t symbol_id,
return comp_unit_info;
}
static void
RemoveFunctionsWithModuleNotEqualTo (const ModuleSP &module_sp, SymbolContextList &sc_list, uint32_t start_idx)
{
@ -1128,7 +1105,6 @@ SymbolFileDWARFDebugMap::FindFunctions(const ConstString &name,
return sc_list.GetSize() - initial_size;
}
uint32_t
SymbolFileDWARFDebugMap::FindFunctions (const RegularExpression& regex, bool include_inlines, bool append, SymbolContextList& sc_list)
{
@ -1163,8 +1139,7 @@ SymbolFileDWARFDebugMap::GetTypes (SymbolContextScope *sc_scope,
Timer scoped_timer (__PRETTY_FUNCTION__,
"SymbolFileDWARFDebugMap::GetTypes (type_mask = 0x%8.8x)",
type_mask);
uint32_t initial_size = type_list.GetSize();
SymbolFileDWARF *oso_dwarf = NULL;
if (sc_scope)
@ -1190,7 +1165,6 @@ SymbolFileDWARFDebugMap::GetTypes (SymbolContextScope *sc_scope,
return type_list.GetSize() - initial_size;
}
TypeSP
SymbolFileDWARFDebugMap::FindDefinitionTypeForDWARFDeclContext (const DWARFDeclContext &die_decl_ctx)
{
@ -1202,8 +1176,6 @@ SymbolFileDWARFDebugMap::FindDefinitionTypeForDWARFDeclContext (const DWARFDeclC
return type_sp;
}
bool
SymbolFileDWARFDebugMap::Supports_DW_AT_APPLE_objc_complete_type (SymbolFileDWARF *skip_dwarf_oso)
{
@ -1414,7 +1386,6 @@ SymbolFileDWARFDebugMap::GetCompileUnitInfo (SymbolFileDWARF *oso_dwarf)
return NULL;
}
void
SymbolFileDWARFDebugMap::SetCompileUnit (SymbolFileDWARF *oso_dwarf, const CompUnitSP &cu_sp)
{
@ -1589,4 +1560,3 @@ SymbolFileDWARFDebugMap::AddOSOARanges (SymbolFileDWARF* dwarf2Data, DWARFDebugA
}
return num_line_entries_added;
}

View File

@ -21,8 +21,7 @@ class SymbolFileDWARFDwo : public SymbolFileDWARF
public:
SymbolFileDWARFDwo(lldb::ObjectFileSP objfile, DWARFCompileUnit* dwarf_cu);
virtual
~SymbolFileDWARFDwo() = default;
~SymbolFileDWARFDwo() override = default;
const lldb_private::DWARFDataExtractor&
GetCachedSectionData(uint32_t got_flag,
@ -67,4 +66,4 @@ protected:
DWARFCompileUnit* m_base_dwarf_cu;
};
#endif // SymbolFileDWARFDwo_SymbolFileDWARFDwo_h_
#endif // SymbolFileDWARFDwo_SymbolFileDWARFDwo_h_

View File

@ -10,13 +10,25 @@
#ifndef liblldb_SymbolFileSymtab_h_
#define liblldb_SymbolFileSymtab_h_
// C Includes
// C++ Includes
#include <vector>
// Other libraries and framework includes
// Project includes
#include "lldb/Symbol/SymbolFile.h"
#include "lldb/Symbol/Symtab.h"
#include <vector>
class SymbolFileSymtab : public lldb_private::SymbolFile
{
public:
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
SymbolFileSymtab(lldb_private::ObjectFile* obj_file);
~SymbolFileSymtab() override;
//------------------------------------------------------------------
// Static Functions
//------------------------------------------------------------------
@ -35,71 +47,68 @@ public:
static lldb_private::SymbolFile*
CreateInstance (lldb_private::ObjectFile* obj_file);
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
SymbolFileSymtab(lldb_private::ObjectFile* obj_file);
virtual
~SymbolFileSymtab();
virtual uint32_t CalculateAbilities ();
uint32_t
CalculateAbilities() override;
//------------------------------------------------------------------
// Compile Unit function calls
//------------------------------------------------------------------
virtual uint32_t
GetNumCompileUnits();
uint32_t
GetNumCompileUnits() override;
virtual lldb::CompUnitSP
ParseCompileUnitAtIndex(uint32_t index);
lldb::CompUnitSP
ParseCompileUnitAtIndex(uint32_t index) override;
virtual lldb::LanguageType
ParseCompileUnitLanguage (const lldb_private::SymbolContext& sc);
lldb::LanguageType
ParseCompileUnitLanguage(const lldb_private::SymbolContext& sc) override;
virtual size_t
ParseCompileUnitFunctions (const lldb_private::SymbolContext& sc);
size_t
ParseCompileUnitFunctions(const lldb_private::SymbolContext& sc) override;
virtual bool
ParseCompileUnitLineTable (const lldb_private::SymbolContext& sc);
bool
ParseCompileUnitLineTable(const lldb_private::SymbolContext& sc) override;
virtual bool
ParseCompileUnitSupportFiles (const lldb_private::SymbolContext& sc, lldb_private::FileSpecList &support_files);
bool
ParseCompileUnitSupportFiles(const lldb_private::SymbolContext& sc,
lldb_private::FileSpecList &support_files) override;
virtual bool
ParseImportedModules (const lldb_private::SymbolContext &sc, std::vector<lldb_private::ConstString> &imported_modules);
bool
ParseImportedModules(const lldb_private::SymbolContext &sc,
std::vector<lldb_private::ConstString> &imported_modules) override;
virtual size_t
ParseFunctionBlocks (const lldb_private::SymbolContext& sc);
size_t
ParseFunctionBlocks(const lldb_private::SymbolContext& sc) override;
virtual size_t
ParseTypes (const lldb_private::SymbolContext& sc);
size_t
ParseTypes(const lldb_private::SymbolContext& sc) override;
virtual size_t
ParseVariablesForContext (const lldb_private::SymbolContext& sc);
size_t
ParseVariablesForContext(const lldb_private::SymbolContext& sc) override;
virtual lldb_private::Type*
ResolveTypeUID(lldb::user_id_t type_uid);
lldb_private::Type*
ResolveTypeUID(lldb::user_id_t type_uid) override;
virtual bool
CompleteType (lldb_private::CompilerType& compiler_type);
bool
CompleteType(lldb_private::CompilerType& compiler_type) override;
virtual uint32_t
ResolveSymbolContext (const lldb_private::Address& so_addr, uint32_t resolve_scope, lldb_private::SymbolContext& sc);
uint32_t
ResolveSymbolContext(const lldb_private::Address& so_addr,
uint32_t resolve_scope,
lldb_private::SymbolContext& sc) override;
virtual size_t
GetTypes (lldb_private::SymbolContextScope *sc_scope,
uint32_t type_mask,
lldb_private::TypeList &type_list);
size_t
GetTypes(lldb_private::SymbolContextScope *sc_scope,
uint32_t type_mask,
lldb_private::TypeList &type_list) override;
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
virtual lldb_private::ConstString
GetPluginName();
lldb_private::ConstString
GetPluginName() override;
virtual uint32_t
GetPluginVersion();
uint32_t
GetPluginVersion() override;
protected:
typedef std::map<lldb_private::ConstString, lldb::TypeSP> TypeMap;
@ -115,5 +124,4 @@ private:
DISALLOW_COPY_AND_ASSIGN (SymbolFileSymtab);
};
#endif // liblldb_SymbolFileSymtab_h_
#endif // liblldb_SymbolFileSymtab_h_

View File

@ -1,4 +1,4 @@
//===-- SymbolVendorELF.h ------------------------------------*- C++ -*-===//
//===-- SymbolVendorELF.h ---------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@ -10,12 +10,23 @@
#ifndef liblldb_SymbolVendorELF_h_
#define liblldb_SymbolVendorELF_h_
// C Includes
// C++ Includes
// Other libraries and framework includes
// Project includes
#include "lldb/lldb-private.h"
#include "lldb/Symbol/SymbolVendor.h"
class SymbolVendorELF : public lldb_private::SymbolVendor
{
public:
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
SymbolVendorELF (const lldb::ModuleSP &module_sp);
~SymbolVendorELF() override;
//------------------------------------------------------------------
// Static Functions
//------------------------------------------------------------------
@ -34,25 +45,17 @@ public:
static lldb_private::SymbolVendor*
CreateInstance (const lldb::ModuleSP &module_sp, lldb_private::Stream *feedback_strm);
//------------------------------------------------------------------
// Constructors and Destructors
//------------------------------------------------------------------
SymbolVendorELF (const lldb::ModuleSP &module_sp);
virtual
~SymbolVendorELF();
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
virtual lldb_private::ConstString
GetPluginName();
lldb_private::ConstString
GetPluginName() override;
virtual uint32_t
GetPluginVersion();
uint32_t
GetPluginVersion() override;
private:
DISALLOW_COPY_AND_ASSIGN (SymbolVendorELF);
};
#endif // liblldb_SymbolVendorELF_h_
#endif // liblldb_SymbolVendorELF_h_