summaryrefslogtreecommitdiffstats
path: root/src/d8-debug.cc
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-12 15:51:54 +0100
committerSteve Block <steveblock@google.com>2011-05-12 16:12:25 +0100
commit9fac840a46e8b7e26894f4792ba26dde14c56b04 (patch)
tree0b8b71befb5175abac552daa0d084fc51c1090b8 /src/d8-debug.cc
parentb0fe1620dcb4135ac3ab2d66ff93072373911299 (diff)
downloadandroid_external_v8-9fac840a46e8b7e26894f4792ba26dde14c56b04.tar.gz
android_external_v8-9fac840a46e8b7e26894f4792ba26dde14c56b04.tar.bz2
android_external_v8-9fac840a46e8b7e26894f4792ba26dde14c56b04.zip
Update V8 to r6190 as required by WebKit r75315
Change-Id: I0b2f598e4d8748df417ad350fc47a1c465ad1fef
Diffstat (limited to 'src/d8-debug.cc')
-rw-r--r--src/d8-debug.cc19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/d8-debug.cc b/src/d8-debug.cc
index 5f3ed766..8a3886c6 100644
--- a/src/d8-debug.cc
+++ b/src/d8-debug.cc
@@ -34,12 +34,21 @@
namespace v8 {
-void PrintPrompt() {
- printf("dbg> ");
+static bool was_running = true;
+
+void PrintPrompt(bool is_running) {
+ const char* prompt = is_running? "> " : "dbg> ";
+ was_running = is_running;
+ printf("%s", prompt);
fflush(stdout);
}
+void PrintPrompt() {
+ PrintPrompt(was_running);
+}
+
+
void HandleDebugEvent(DebugEvent event,
Handle<Object> exec_state,
Handle<Object> event_data,
@@ -91,7 +100,7 @@ void HandleDebugEvent(DebugEvent event,
bool running = false;
while (!running) {
char command[kBufferSize];
- PrintPrompt();
+ PrintPrompt(running);
char* str = fgets(command, kBufferSize, stdin);
if (str == NULL) break;
@@ -284,7 +293,9 @@ void RemoteDebugger::HandleMessageReceived(char* message) {
} else {
printf("???\n");
}
- PrintPrompt();
+
+ bool is_running = details->Get(String::New("running"))->ToBoolean()->Value();
+ PrintPrompt(is_running);
}