aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectFrame.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2010-08-30 19:44:40 +0000
committerJim Ingham <jingham@apple.com>2010-08-30 19:44:40 +0000
commite40e42181fcc0c9742d6fcb654b0e1dee07a2513 (patch)
tree978294983a64a9dd49370beea737aadf3932f94b /lldb/source/Commands/CommandObjectFrame.cpp
parent9026d4b4887e88cbca40cc1de43ad91005b9c769 (diff)
downloadllvm-e40e42181fcc0c9742d6fcb654b0e1dee07a2513.zip
llvm-e40e42181fcc0c9742d6fcb654b0e1dee07a2513.tar.gz
llvm-e40e42181fcc0c9742d6fcb654b0e1dee07a2513.tar.bz2
Added a way to open the current source file & line in an external editor, and you can turn this on with:
lldb -e llvm-svn: 112502
Diffstat (limited to 'lldb/source/Commands/CommandObjectFrame.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectFrame.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectFrame.cpp b/lldb/source/Commands/CommandObjectFrame.cpp
index 316b0f7..cd9ee08 100644
--- a/lldb/source/Commands/CommandObjectFrame.cpp
+++ b/lldb/source/Commands/CommandObjectFrame.cpp
@@ -114,12 +114,19 @@ public:
if (exe_ctx.frame)
{
+ bool already_shown = false;
+ SymbolContext frame_sc(exe_ctx.frame->GetSymbolContext(eSymbolContextLineEntry));
+ if (interpreter.GetDebugger().UseExternalEditor() && frame_sc.line_entry.file && frame_sc.line_entry.line != 0)
+ {
+ already_shown = Host::OpenFileInExternalEditor (frame_sc.line_entry.file, frame_sc.line_entry.line);
+ }
+
if (DisplayFrameForExecutionContext (exe_ctx.thread,
exe_ctx.frame,
interpreter,
result.GetOutputStream(),
true,
- true,
+ !already_shown,
3,
3))
{