summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/FormatEntity.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-11-08 20:36:40 +0000
committerJim Ingham <jingham@apple.com>2016-11-08 20:36:40 +0000
commit6a9767c7e6983c3211e35757899fb83afb2eb807 (patch)
treed3d4fc44de0827c79099978569ee676feb81c604 /lldb/source/Core/FormatEntity.cpp
parentedc183e4375ab9b5be5487035327ca14ab7c322b (diff)
downloadbcm5719-llvm-6a9767c7e6983c3211e35757899fb83afb2eb807.tar.gz
bcm5719-llvm-6a9767c7e6983c3211e35757899fb83afb2eb807.zip
Clean up the stop printing header lines.
I added a "thread-stop-format" to distinguish between the form that is just the thread info (since the stop printing immediately prints the frame info) and one with more frame 0 info - which is useful for "thread list" and the like. I also added a frame.no-debug boolean to the format entities so you can print frame information differently between frames with source info and those without. This closes https://reviews.llvm.org/D26383. <rdar://problem/28273697> llvm-svn: 286288
Diffstat (limited to 'lldb/source/Core/FormatEntity.cpp')
-rw-r--r--lldb/source/Core/FormatEntity.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp
index f252ff55211..85965be35e5 100644
--- a/lldb/source/Core/FormatEntity.cpp
+++ b/lldb/source/Core/FormatEntity.cpp
@@ -97,6 +97,7 @@ static FormatEntity::Entry::Definition g_frame_child_entries[] = {
ENTRY("fp", FrameRegisterFP, UInt64),
ENTRY("sp", FrameRegisterSP, UInt64),
ENTRY("flags", FrameRegisterFlags, UInt64),
+ ENTRY("no-debug", FrameNoDebug, None),
ENTRY_CHILDREN("reg", FrameRegisterByName, UInt64, g_string_entry),
};
@@ -320,6 +321,7 @@ const char *FormatEntity::Entry::TypeToCString(Type t) {
ENUM_TO_CSTR(File);
ENUM_TO_CSTR(Lang);
ENUM_TO_CSTR(FrameIndex);
+ ENUM_TO_CSTR(FrameNoDebug);
ENUM_TO_CSTR(FrameRegisterPC);
ENUM_TO_CSTR(FrameRegisterSP);
ENUM_TO_CSTR(FrameRegisterFP);
@@ -1445,6 +1447,15 @@ bool FormatEntity::Format(const Entry &entry, Stream &s,
}
return false;
+ case Entry::Type::FrameNoDebug:
+ if (exe_ctx) {
+ StackFrame *frame = exe_ctx->GetFramePtr();
+ if (frame) {
+ return !frame->HasDebugInformation();
+ }
+ }
+ return true;
+
case Entry::Type::FrameRegisterByName:
if (exe_ctx) {
StackFrame *frame = exe_ctx->GetFramePtr();
OpenPOWER on IntegriCloud