summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectTarget.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-05-05 01:03:36 +0000
committerJim Ingham <jingham@apple.com>2011-05-05 01:03:36 +0000
commitc60695a7653c5405330b20182a9f249d9c3f3830 (patch)
tree4f4d46cd41190fe3ce635e018c3aef830b1fd0ee /lldb/source/Commands/CommandObjectTarget.cpp
parent330a5b42a5294a2d4fc85146b7537eed43422aec (diff)
downloadbcm5719-llvm-c60695a7653c5405330b20182a9f249d9c3f3830.tar.gz
bcm5719-llvm-c60695a7653c5405330b20182a9f249d9c3f3830.zip
Fix the "target stop-hook add" input reader so that it won't say the stop hook was added if the input was interrupted.
llvm-svn: 130907
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectTarget.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp
index 5913bf1ea75..1399fb0de46 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -3077,6 +3077,7 @@ public:
{
File &out_file = reader.GetDebugger().GetOutputFile();
Target::StopHook *new_stop_hook = ((Target::StopHook *) baton);
+ static bool got_interrupted;
switch (notification)
{
@@ -3085,6 +3086,7 @@ public:
if (reader.GetPrompt())
out_file.Printf ("%s", reader.GetPrompt());
out_file.Flush();
+ got_interrupted = false;
break;
case eInputReaderDeactivate:
@@ -3096,6 +3098,7 @@ public:
out_file.Printf ("%s", reader.GetPrompt());
out_file.Flush();
}
+ got_interrupted = false;
break;
case eInputReaderAsynchronousOutputWritten:
@@ -3125,6 +3128,7 @@ public:
reader.SetIsDone (true);
}
+ got_interrupted = true;
break;
case eInputReaderEndOfFile:
@@ -3132,7 +3136,8 @@ public:
break;
case eInputReaderDone:
- out_file.Printf ("Stop hook #%d added.\n", new_stop_hook->GetID());
+ if (!got_interrupted)
+ out_file.Printf ("Stop hook #%d added.\n", new_stop_hook->GetID());
break;
}
OpenPOWER on IntegriCloud