-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lldb] Remove (unused) SymbolContext::Dump #123211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We still have GetDescription and DumpStopContext which serve a similar purpose. (The main reason this is bothering me is because I'm working through the uses of (deprecated) Function::GetAddressRange.)
@llvm/pr-subscribers-lldb Author: Pavel Labath (labath) ChangesWe still have GetDescription and DumpStopContext which serve a similar purpose. (The main reason this is bothering me is because I'm working through the uses of (deprecated) Function::GetAddressRange.) Full diff: https://github.com/llvm/llvm-project/pull/123211.diff 2 Files Affected:
diff --git a/lldb/include/lldb/Symbol/SymbolContext.h b/lldb/include/lldb/Symbol/SymbolContext.h
index f65f57b0d11034..07769cd8dffae7 100644
--- a/lldb/include/lldb/Symbol/SymbolContext.h
+++ b/lldb/include/lldb/Symbol/SymbolContext.h
@@ -91,15 +91,6 @@ class SymbolContext {
/// their default state.
void Clear(bool clear_target);
- /// Dump a description of this object to a Stream.
- ///
- /// Dump a description of the contents of this object to the supplied stream
- /// \a s.
- ///
- /// \param[in] s
- /// The stream to which to dump the object description.
- void Dump(Stream *s, Target *target) const;
-
/// Dump the stop context in this object to a Stream.
///
/// Dump the best description of this object to the stream. The information
diff --git a/lldb/source/Symbol/SymbolContext.cpp b/lldb/source/Symbol/SymbolContext.cpp
index 19b6ff6a5302b7..f4270ee8396760 100644
--- a/lldb/source/Symbol/SymbolContext.cpp
+++ b/lldb/source/Symbol/SymbolContext.cpp
@@ -317,65 +317,6 @@ uint32_t SymbolContext::GetResolvedMask() const {
return resolved_mask;
}
-void SymbolContext::Dump(Stream *s, Target *target) const {
- *s << this << ": ";
- s->Indent();
- s->PutCString("SymbolContext");
- s->IndentMore();
- s->EOL();
- s->IndentMore();
- s->Indent();
- *s << "Module = " << module_sp.get() << ' ';
- if (module_sp)
- module_sp->GetFileSpec().Dump(s->AsRawOstream());
- s->EOL();
- s->Indent();
- *s << "CompileUnit = " << comp_unit;
- if (comp_unit != nullptr)
- s->Format(" {{{0:x-16}} {1}", comp_unit->GetID(),
- comp_unit->GetPrimaryFile());
- s->EOL();
- s->Indent();
- *s << "Function = " << function;
- if (function != nullptr) {
- s->Format(" {{{0:x-16}} {1}, address-range = ", function->GetID(),
- function->GetType()->GetName());
- function->GetAddressRange().Dump(s, target, Address::DumpStyleLoadAddress,
- Address::DumpStyleModuleWithFileAddress);
- s->EOL();
- s->Indent();
- Type *func_type = function->GetType();
- if (func_type) {
- *s << " Type = ";
- func_type->Dump(s, false);
- }
- }
- s->EOL();
- s->Indent();
- *s << "Block = " << block;
- if (block != nullptr)
- s->Format(" {{{0:x-16}}", block->GetID());
- s->EOL();
- s->Indent();
- *s << "LineEntry = ";
- line_entry.Dump(s, target, true, Address::DumpStyleLoadAddress,
- Address::DumpStyleModuleWithFileAddress, true);
- s->EOL();
- s->Indent();
- *s << "Symbol = " << symbol;
- if (symbol != nullptr && symbol->GetMangled())
- *s << ' ' << symbol->GetName().AsCString();
- s->EOL();
- *s << "Variable = " << variable;
- if (variable != nullptr) {
- s->Format(" {{{0:x-16}} {1}", variable->GetID(),
- variable->GetType()->GetName());
- s->EOL();
- }
- s->IndentLess();
- s->IndentLess();
-}
-
bool lldb_private::operator==(const SymbolContext &lhs,
const SymbolContext &rhs) {
return lhs.function == rhs.function && lhs.symbol == rhs.symbol &&
|
Originally the idea was that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We still have GetDescription and DumpStopContext which serve a similar purpose.
(The main reason this is bothering me is because I'm working through the uses of (deprecated) Function::GetAddressRange.)