[lldb][NFC] Fix all formatting errors in .cpp file headers
Summary:
A *.cpp file header in LLDB (and in LLDB) should like this:
```
//===-- TestUtilities.cpp -------------------------------------------------===//
```
However in LLDB most of our source files have arbitrary changes to this format and
these changes are spreading through LLDB as folks usually just use the existing
source files as templates for their new files (most notably the unnecessary
editor language indicator `-*- C++ -*-` is spreading and in every review
someone is pointing out that this is wrong, resulting in people pointing out that this
is done in the same way in other files).
This patch removes most of these inconsistencies including the editor language indicators,
all the different missing/additional '-' characters, files that center the file name, missing
trailing `===//` (mostly caused by clang-format breaking the line).
Reviewers: aprantl, espindola, jfb, shafik, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: dexonsmith, wuzish, emaste, sdardis, nemanjai, kbarton, MaskRay, atanasyan, arphaman, jfb, abidh, jsji, JDevlieghere, usaxena95, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D73258
2020-01-24 15:23:27 +08:00
|
|
|
//===-- SBSymbol.cpp ------------------------------------------------------===//
|
2010-06-09 00:52:24 +08:00
|
|
|
//
|
2019-01-19 16:50:56 +08:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2010-06-09 00:52:24 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "lldb/API/SBSymbol.h"
|
2010-09-20 13:20:02 +08:00
|
|
|
#include "lldb/API/SBStream.h"
|
2010-10-06 11:09:58 +08:00
|
|
|
#include "lldb/Core/Disassembler.h"
|
|
|
|
#include "lldb/Core/Module.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
#include "lldb/Symbol/Symbol.h"
|
2010-10-06 11:09:58 +08:00
|
|
|
#include "lldb/Target/ExecutionContext.h"
|
|
|
|
#include "lldb/Target/Target.h"
|
2022-01-20 03:38:26 +08:00
|
|
|
#include "lldb/Utility/Instrumentation.h"
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
using namespace lldb;
|
2010-10-06 11:09:58 +08:00
|
|
|
using namespace lldb_private;
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2022-01-20 03:38:26 +08:00
|
|
|
SBSymbol::SBSymbol() { LLDB_INSTRUMENT_VA(this); }
|
2010-06-09 00:52:24 +08:00
|
|
|
|
|
|
|
SBSymbol::SBSymbol(lldb_private::Symbol *lldb_object_ptr)
|
2010-06-23 09:19:29 +08:00
|
|
|
: m_opaque_ptr(lldb_object_ptr) {}
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2019-03-06 08:06:00 +08:00
|
|
|
SBSymbol::SBSymbol(const lldb::SBSymbol &rhs) : m_opaque_ptr(rhs.m_opaque_ptr) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, rhs);
|
2019-03-06 08:06:00 +08:00
|
|
|
}
|
2010-11-06 07:17:00 +08:00
|
|
|
|
|
|
|
const SBSymbol &SBSymbol::operator=(const SBSymbol &rhs) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, rhs);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2010-11-06 07:17:00 +08:00
|
|
|
m_opaque_ptr = rhs.m_opaque_ptr;
|
2022-01-10 14:54:08 +08:00
|
|
|
return *this;
|
2010-11-06 07:17:00 +08:00
|
|
|
}
|
|
|
|
|
[lldb] NFC modernize codebase with modernize-use-nullptr
Summary:
NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]]
This commit is the result of modernizing the LLDB codebase by using
`nullptr` instread of `0` or `NULL`. See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
for more information.
This is the command I ran and I to fix and format the code base:
```
run-clang-tidy.py \
-header-filter='.*' \
-checks='-*,modernize-use-nullptr' \
-fix ~/dev/llvm-project/lldb/.* \
-format \
-style LLVM \
-p ~/llvm-builds/debug-ninja-gcc
```
NOTE: There were also changes to `llvm/utils/unittest` but I did not
include them because I felt that maybe this library shall be updated in
isolation somehow.
NOTE: I know this is a rather large commit but it is a nobrainer in most
parts.
Reviewers: martong, espindola, shafik, #lldb, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits
Tags: #lldb, #llvm
Differential Revision: https://reviews.llvm.org/D61847
llvm-svn: 361484
2019-05-23 19:14:47 +08:00
|
|
|
SBSymbol::~SBSymbol() { m_opaque_ptr = nullptr; }
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2010-12-07 13:40:31 +08:00
|
|
|
void SBSymbol::SetSymbol(lldb_private::Symbol *lldb_object_ptr) {
|
|
|
|
m_opaque_ptr = lldb_object_ptr;
|
|
|
|
}
|
|
|
|
|
2019-03-06 08:06:00 +08:00
|
|
|
bool SBSymbol::IsValid() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
Add "operator bool" to SB APIs
Summary:
Our python version of the SB API has (the python equivalent of)
operator bool, but the C++ version doesn't.
This is because our python operators are added by modify-python-lldb.py,
which performs postprocessing on the swig-generated interface files.
In this patch, I add the "operator bool" to all SB classes which have an
IsValid method (which is the same logic used by modify-python-lldb.py).
This way, we make the two interfaces more constent, and it allows us to
rely on swig's automatic syntesis of python __nonzero__ methods instead
of doing manual fixups.
Reviewers: zturner, jingham, clayborg, jfb, serge-sans-paille
Subscribers: jdoerfert, lldb-commits
Differential Revision: https://reviews.llvm.org/D58792
llvm-svn: 355824
2019-03-11 21:58:46 +08:00
|
|
|
return this->operator bool();
|
|
|
|
}
|
|
|
|
SBSymbol::operator bool() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
[lldb] NFC modernize codebase with modernize-use-nullptr
Summary:
NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]]
This commit is the result of modernizing the LLDB codebase by using
`nullptr` instread of `0` or `NULL`. See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
for more information.
This is the command I ran and I to fix and format the code base:
```
run-clang-tidy.py \
-header-filter='.*' \
-checks='-*,modernize-use-nullptr' \
-fix ~/dev/llvm-project/lldb/.* \
-format \
-style LLVM \
-p ~/llvm-builds/debug-ninja-gcc
```
NOTE: There were also changes to `llvm/utils/unittest` but I did not
include them because I felt that maybe this library shall be updated in
isolation somehow.
NOTE: I know this is a rather large commit but it is a nobrainer in most
parts.
Reviewers: martong, espindola, shafik, #lldb, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits
Tags: #lldb, #llvm
Differential Revision: https://reviews.llvm.org/D61847
llvm-svn: 361484
2019-05-23 19:14:47 +08:00
|
|
|
return m_opaque_ptr != nullptr;
|
2019-03-06 08:06:00 +08:00
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2013-03-02 08:26:47 +08:00
|
|
|
const char *SBSymbol::GetName() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
[lldb] NFC modernize codebase with modernize-use-nullptr
Summary:
NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]]
This commit is the result of modernizing the LLDB codebase by using
`nullptr` instread of `0` or `NULL`. See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
for more information.
This is the command I ran and I to fix and format the code base:
```
run-clang-tidy.py \
-header-filter='.*' \
-checks='-*,modernize-use-nullptr' \
-fix ~/dev/llvm-project/lldb/.* \
-format \
-style LLVM \
-p ~/llvm-builds/debug-ninja-gcc
```
NOTE: There were also changes to `llvm/utils/unittest` but I did not
include them because I felt that maybe this library shall be updated in
isolation somehow.
NOTE: I know this is a rather large commit but it is a nobrainer in most
parts.
Reviewers: martong, espindola, shafik, #lldb, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits
Tags: #lldb, #llvm
Differential Revision: https://reviews.llvm.org/D61847
llvm-svn: 361484
2019-05-23 19:14:47 +08:00
|
|
|
const char *name = nullptr;
|
2010-06-23 09:19:29 +08:00
|
|
|
if (m_opaque_ptr)
|
2015-07-09 06:32:23 +08:00
|
|
|
name = m_opaque_ptr->GetName().AsCString();
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2010-10-30 12:51:46 +08:00
|
|
|
return name;
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
const char *SBSymbol::GetDisplayName() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
[lldb] NFC modernize codebase with modernize-use-nullptr
Summary:
NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]]
This commit is the result of modernizing the LLDB codebase by using
`nullptr` instread of `0` or `NULL`. See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
for more information.
This is the command I ran and I to fix and format the code base:
```
run-clang-tidy.py \
-header-filter='.*' \
-checks='-*,modernize-use-nullptr' \
-fix ~/dev/llvm-project/lldb/.* \
-format \
-style LLVM \
-p ~/llvm-builds/debug-ninja-gcc
```
NOTE: There were also changes to `llvm/utils/unittest` but I did not
include them because I felt that maybe this library shall be updated in
isolation somehow.
NOTE: I know this is a rather large commit but it is a nobrainer in most
parts.
Reviewers: martong, espindola, shafik, #lldb, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits
Tags: #lldb, #llvm
Differential Revision: https://reviews.llvm.org/D61847
llvm-svn: 361484
2019-05-23 19:14:47 +08:00
|
|
|
const char *name = nullptr;
|
2010-06-23 09:19:29 +08:00
|
|
|
if (m_opaque_ptr)
|
2020-01-31 13:55:18 +08:00
|
|
|
name = m_opaque_ptr->GetMangled().GetDisplayDemangledName().AsCString();
|
2010-10-27 07:49:36 +08:00
|
|
|
|
2010-10-30 12:51:46 +08:00
|
|
|
return name;
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
|
|
|
|
2015-07-07 02:28:46 +08:00
|
|
|
const char *SBSymbol::GetMangledName() const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
[lldb] NFC modernize codebase with modernize-use-nullptr
Summary:
NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]]
This commit is the result of modernizing the LLDB codebase by using
`nullptr` instread of `0` or `NULL`. See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
for more information.
This is the command I ran and I to fix and format the code base:
```
run-clang-tidy.py \
-header-filter='.*' \
-checks='-*,modernize-use-nullptr' \
-fix ~/dev/llvm-project/lldb/.* \
-format \
-style LLVM \
-p ~/llvm-builds/debug-ninja-gcc
```
NOTE: There were also changes to `llvm/utils/unittest` but I did not
include them because I felt that maybe this library shall be updated in
isolation somehow.
NOTE: I know this is a rather large commit but it is a nobrainer in most
parts.
Reviewers: martong, espindola, shafik, #lldb, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits
Tags: #lldb, #llvm
Differential Revision: https://reviews.llvm.org/D61847
llvm-svn: 361484
2019-05-23 19:14:47 +08:00
|
|
|
const char *name = nullptr;
|
2015-07-07 02:28:46 +08:00
|
|
|
if (m_opaque_ptr)
|
2015-07-09 06:32:23 +08:00
|
|
|
name = m_opaque_ptr->GetMangled().GetMangledName().AsCString();
|
2015-07-07 02:28:46 +08:00
|
|
|
return name;
|
|
|
|
}
|
|
|
|
|
2010-06-09 00:52:24 +08:00
|
|
|
bool SBSymbol::operator==(const SBSymbol &rhs) const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, rhs);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2010-10-30 12:51:46 +08:00
|
|
|
return m_opaque_ptr == rhs.m_opaque_ptr;
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
2010-10-30 12:51:46 +08:00
|
|
|
|
2010-06-09 00:52:24 +08:00
|
|
|
bool SBSymbol::operator!=(const SBSymbol &rhs) const {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, rhs);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2010-10-30 12:51:46 +08:00
|
|
|
return m_opaque_ptr != rhs.m_opaque_ptr;
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
|
|
|
|
2010-09-20 13:20:02 +08:00
|
|
|
bool SBSymbol::GetDescription(SBStream &description) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, description);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2011-11-13 14:57:31 +08:00
|
|
|
Stream &strm = description.ref();
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2010-06-23 09:19:29 +08:00
|
|
|
if (m_opaque_ptr) {
|
[lldb] NFC modernize codebase with modernize-use-nullptr
Summary:
NFC = [[ https://llvm.org/docs/Lexicon.html#nfc | Non functional change ]]
This commit is the result of modernizing the LLDB codebase by using
`nullptr` instread of `0` or `NULL`. See
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
for more information.
This is the command I ran and I to fix and format the code base:
```
run-clang-tidy.py \
-header-filter='.*' \
-checks='-*,modernize-use-nullptr' \
-fix ~/dev/llvm-project/lldb/.* \
-format \
-style LLVM \
-p ~/llvm-builds/debug-ninja-gcc
```
NOTE: There were also changes to `llvm/utils/unittest` but I did not
include them because I felt that maybe this library shall be updated in
isolation somehow.
NOTE: I know this is a rather large commit but it is a nobrainer in most
parts.
Reviewers: martong, espindola, shafik, #lldb, JDevlieghere
Reviewed By: JDevlieghere
Subscribers: arsenm, jvesely, nhaehnle, hiraditya, JDevlieghere, teemperor, rnkovacs, emaste, kubamracek, nemanjai, ki.stfu, javed.absar, arichardson, kbarton, jrtc27, MaskRay, atanasyan, dexonsmith, arphaman, jfb, jsji, jdoerfert, lldb-commits, llvm-commits
Tags: #lldb, #llvm
Differential Revision: https://reviews.llvm.org/D61847
llvm-svn: 361484
2019-05-23 19:14:47 +08:00
|
|
|
m_opaque_ptr->GetDescription(&strm, lldb::eDescriptionLevelFull, nullptr);
|
2016-09-07 04:57:50 +08:00
|
|
|
} else
|
2011-11-13 14:57:31 +08:00
|
|
|
strm.PutCString("No value");
|
2010-06-09 00:52:24 +08:00
|
|
|
|
2010-06-23 09:19:29 +08:00
|
|
|
return true;
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
SBInstructionList SBSymbol::GetInstructions(SBTarget target) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, target);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2022-01-10 14:54:08 +08:00
|
|
|
return GetInstructions(target, nullptr);
|
2010-06-09 00:52:24 +08:00
|
|
|
}
|
2010-09-20 13:20:02 +08:00
|
|
|
|
|
|
|
SBInstructionList SBSymbol::GetInstructions(SBTarget target,
|
|
|
|
const char *flavor_string) {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this, target, flavor_string);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2011-11-13 14:57:31 +08:00
|
|
|
SBInstructionList sb_instructions;
|
|
|
|
if (m_opaque_ptr) {
|
2012-01-30 15:41:31 +08:00
|
|
|
TargetSP target_sp(target.GetSP());
|
2011-11-13 14:57:31 +08:00
|
|
|
std::unique_lock<std::recursive_mutex> lock;
|
2020-03-05 20:03:26 +08:00
|
|
|
if (target_sp && m_opaque_ptr->ValueIsAddress()) {
|
2011-11-13 14:57:31 +08:00
|
|
|
lock = std::unique_lock<std::recursive_mutex>(target_sp->GetAPIMutex());
|
2013-03-02 08:26:47 +08:00
|
|
|
const Address &symbol_addr = m_opaque_ptr->GetAddressRef();
|
2012-01-30 15:41:31 +08:00
|
|
|
ModuleSP module_sp = symbol_addr.GetModule();
|
|
|
|
if (module_sp) {
|
2015-06-26 05:46:34 +08:00
|
|
|
AddressRange symbol_range(symbol_addr, m_opaque_ptr->GetByteSize());
|
2021-04-17 07:10:16 +08:00
|
|
|
const bool force_live_memory = true;
|
2012-01-30 04:56:30 +08:00
|
|
|
sb_instructions.SetDisassembler(Disassembler::DisassembleRange(
|
2020-03-05 20:03:26 +08:00
|
|
|
module_sp->GetArchitecture(), nullptr, flavor_string, *target_sp,
|
2021-04-17 07:10:16 +08:00
|
|
|
symbol_range, force_live_memory));
|
2010-10-06 11:09:58 +08:00
|
|
|
}
|
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
2022-01-10 14:54:08 +08:00
|
|
|
return sb_instructions;
|
2010-10-06 11:09:58 +08:00
|
|
|
}
|
|
|
|
|
2010-10-27 07:49:36 +08:00
|
|
|
lldb_private::Symbol *SBSymbol::get() { return m_opaque_ptr; }
|
2010-12-14 12:58:53 +08:00
|
|
|
|
|
|
|
void SBSymbol::reset(lldb_private::Symbol *symbol) { m_opaque_ptr = symbol; }
|
2016-09-07 04:57:50 +08:00
|
|
|
|
2010-12-14 12:58:53 +08:00
|
|
|
SBAddress SBSymbol::GetStartAddress() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2011-03-03 07:01:18 +08:00
|
|
|
SBAddress addr;
|
2010-12-14 12:58:53 +08:00
|
|
|
if (m_opaque_ptr && m_opaque_ptr->ValueIsAddress()) {
|
2020-09-26 02:15:44 +08:00
|
|
|
addr.SetAddress(m_opaque_ptr->GetAddressRef());
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
2022-01-10 14:54:08 +08:00
|
|
|
return addr;
|
2010-12-14 12:58:53 +08:00
|
|
|
}
|
2011-03-03 07:01:18 +08:00
|
|
|
|
|
|
|
SBAddress SBSymbol::GetEndAddress() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2011-03-03 07:01:18 +08:00
|
|
|
SBAddress addr;
|
2012-03-08 05:03:09 +08:00
|
|
|
if (m_opaque_ptr && m_opaque_ptr->ValueIsAddress()) {
|
|
|
|
lldb::addr_t range_size = m_opaque_ptr->GetByteSize();
|
|
|
|
if (range_size > 0) {
|
2020-09-26 02:15:44 +08:00
|
|
|
addr.SetAddress(m_opaque_ptr->GetAddressRef());
|
2012-03-08 05:03:09 +08:00
|
|
|
addr->Slide(m_opaque_ptr->GetByteSize());
|
2011-03-03 07:01:18 +08:00
|
|
|
}
|
2016-09-07 04:57:50 +08:00
|
|
|
}
|
2022-01-10 14:54:08 +08:00
|
|
|
return addr;
|
2011-03-03 07:01:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t SBSymbol::GetPrologueByteSize() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2011-03-03 07:01:18 +08:00
|
|
|
if (m_opaque_ptr)
|
|
|
|
return m_opaque_ptr->GetPrologueByteSize();
|
|
|
|
return 0;
|
|
|
|
}
|
2011-03-31 09:08:07 +08:00
|
|
|
|
|
|
|
SymbolType SBSymbol::GetType() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2011-03-31 09:08:07 +08:00
|
|
|
if (m_opaque_ptr)
|
|
|
|
return m_opaque_ptr->GetType();
|
|
|
|
return eSymbolTypeInvalid;
|
|
|
|
}
|
2012-04-03 04:08:08 +08:00
|
|
|
|
|
|
|
bool SBSymbol::IsExternal() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2012-04-03 04:08:08 +08:00
|
|
|
if (m_opaque_ptr)
|
|
|
|
return m_opaque_ptr->IsExternal();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool SBSymbol::IsSynthetic() {
|
2022-01-20 03:38:26 +08:00
|
|
|
LLDB_INSTRUMENT_VA(this);
|
2019-03-06 08:06:00 +08:00
|
|
|
|
2012-04-03 04:08:08 +08:00
|
|
|
if (m_opaque_ptr)
|
|
|
|
return m_opaque_ptr->IsSynthetic();
|
|
|
|
return false;
|
|
|
|
}
|