summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ObjectFile/JIT
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2020-07-26 19:36:28 +0000
commitcfca06d7963fa0909f90483b42a6d7d194d01e08 (patch)
tree209fb2a2d68f8f277793fc8df46c753d31bc853b /lldb/source/Plugins/ObjectFile/JIT
parent706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff)
Notes
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/JIT')
-rw-r--r--lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp11
-rw-r--r--lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h6
2 files changed, 10 insertions, 7 deletions
diff --git a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
index c55b96d9110b3..93c2c9f945fe9 100644
--- a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
+++ b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
@@ -1,4 +1,4 @@
-//===-- ObjectFileJIT.cpp ---------------------------------------*- C++ -*-===//
+//===-- ObjectFileJIT.cpp -------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -39,6 +39,8 @@
using namespace lldb;
using namespace lldb_private;
+LLDB_PLUGIN_DEFINE(ObjectFileJIT)
+
char ObjectFileJIT::ID;
void ObjectFileJIT::Initialize() {
@@ -118,7 +120,7 @@ Symtab *ObjectFileJIT::GetSymtab() {
if (module_sp) {
std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex());
if (m_symtab_up == nullptr) {
- m_symtab_up.reset(new Symtab(this));
+ m_symtab_up = std::make_unique<Symtab>(this);
std::lock_guard<std::recursive_mutex> symtab_guard(
m_symtab_up->GetMutex());
ObjectFileJITDelegateSP delegate_sp(m_delegate_wp.lock());
@@ -137,7 +139,7 @@ bool ObjectFileJIT::IsStripped() {
void ObjectFileJIT::CreateSections(SectionList &unified_section_list) {
if (!m_sections_up) {
- m_sections_up.reset(new SectionList());
+ m_sections_up = std::make_unique<SectionList>();
ObjectFileJITDelegateSP delegate_sp(m_delegate_wp.lock());
if (delegate_sp) {
delegate_sp->PopulateSectionList(this, *m_sections_up);
@@ -161,7 +163,8 @@ void ObjectFileJIT::Dump(Stream *s) {
SectionList *sections = GetSectionList();
if (sections)
- sections->Dump(s, nullptr, true, UINT32_MAX);
+ sections->Dump(s->AsRawOstream(), s->GetIndentLevel(), nullptr, true,
+ UINT32_MAX);
if (m_symtab_up)
m_symtab_up->Dump(s, nullptr, eSortOrderNone);
diff --git a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h
index c992683cfc3ce..a3a1acea916aa 100644
--- a/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h
+++ b/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.h
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef liblldb_ObjectFileJIT_h_
-#define liblldb_ObjectFileJIT_h_
+#ifndef LLDB_SOURCE_PLUGINS_OBJECTFILE_JIT_OBJECTFILEJIT_H
+#define LLDB_SOURCE_PLUGINS_OBJECTFILE_JIT_OBJECTFILEJIT_H
#include "lldb/Core/Address.h"
#include "lldb/Symbol/ObjectFile.h"
@@ -104,4 +104,4 @@ protected:
lldb::ObjectFileJITDelegateWP m_delegate_wp;
};
-#endif // liblldb_ObjectFileJIT_h_
+#endif // LLDB_SOURCE_PLUGINS_OBJECTFILE_JIT_OBJECTFILEJIT_H