From 2566b08bc8fd992f7f2ac0cb3ff378fb8adeca18 Mon Sep 17 00:00:00 2001 From: "beard%netscape.com" Date: Fri, 5 May 2000 04:44:51 +0000 Subject: [PATCH] Needed to use namespace Interpreter to see Context, using LineReader instead of istream. git-svn-id: svn://10.0.0.236/trunk@68337 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/js/js2/debugger.cpp | 11 ++++++----- mozilla/js2/src/debugger.cpp | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/mozilla/js/js2/debugger.cpp b/mozilla/js/js2/debugger.cpp index 852127a4102..efd580c59d7 100644 --- a/mozilla/js/js2/debugger.cpp +++ b/mozilla/js/js2/debugger.cpp @@ -34,14 +34,15 @@ #include "world.h" #include "debugger.h" -#include #include #include #include namespace JavaScript { namespace Debugger { - + + using namespace Interpreter; + enum ShellCommand { ASSEMBLE, AMBIGUOUS, @@ -191,7 +192,8 @@ registers, or set the value of a single register."}, static string lastLine("help\n"); string line; - + LineReader reader(mIn); + do { ICodeModule *iCode = cx->getICode(); InstructionIterator pc = cx->getPC(); @@ -200,8 +202,7 @@ registers, or set the value of a single register."}, printFormat (stdOut, "%04X", (pc - iCode->its_iCode->begin())); stdOut << "]> "; - if (std::getline(mIn, line).eof()) - std::exit(0); + reader.readLine(line); if (line.size() == 0) line = lastLine; diff --git a/mozilla/js2/src/debugger.cpp b/mozilla/js2/src/debugger.cpp index 852127a4102..efd580c59d7 100644 --- a/mozilla/js2/src/debugger.cpp +++ b/mozilla/js2/src/debugger.cpp @@ -34,14 +34,15 @@ #include "world.h" #include "debugger.h" -#include #include #include #include namespace JavaScript { namespace Debugger { - + + using namespace Interpreter; + enum ShellCommand { ASSEMBLE, AMBIGUOUS, @@ -191,7 +192,8 @@ registers, or set the value of a single register."}, static string lastLine("help\n"); string line; - + LineReader reader(mIn); + do { ICodeModule *iCode = cx->getICode(); InstructionIterator pc = cx->getPC(); @@ -200,8 +202,7 @@ registers, or set the value of a single register."}, printFormat (stdOut, "%04X", (pc - iCode->its_iCode->begin())); stdOut << "]> "; - if (std::getline(mIn, line).eof()) - std::exit(0); + reader.readLine(line); if (line.size() == 0) line = lastLine;