[nemiver] Fix runtestvarwalker hang



commit 3b8087d7ff0310d09205dfaa7d8854753c0c23c3
Author: Dodji Seketeli <dodji redhat com>
Date:   Sat Jun 19 18:32:29 2010 +0200

    Fix runtestvarwalker hang
    
    	* src/dbgengine/nmv-gdb-engine.cc
    	(GDBEngine::Priv::on_gdb_stdout_signal): Style cleanup.
    	(OnVariableTypeHandler::can_handle): Look for "ptype " string in
    	the debugger console output, not the debugger log output.
    	(OnVariableTypeHandler::can_handle): Likewise, use the content of
    	the debugger console output, not the debugger log output.

 src/dbgengine/nmv-gdb-engine.cc |   17 ++++++++++-------
 1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/src/dbgengine/nmv-gdb-engine.cc b/src/dbgengine/nmv-gdb-engine.cc
index e2de66a..dd534c5 100644
--- a/src/dbgengine/nmv-gdb-engine.cc
+++ b/src/dbgengine/nmv-gdb-engine.cc
@@ -411,12 +411,14 @@ public:
             stdout_signal.emit (command_and_output);
             from = to;
             while (from < end && isspace (a_buf.raw ()[from])) {++from;}
-            if (output.has_result_record ()/*gdb acknowledged previous cmd*/) {
+            if (output.has_result_record ()/*gdb acknowledged previous
+                                             cmd*/
+                || !output.parsing_succeeded ()) {
                 LOG_DD ("here");
                 if (!started_commands.empty ()) {
                     started_commands.erase (started_commands.begin ());
                     LOG_DD ("clearing the line");
-                    //we can send another cmd down the wire
+                    // we can send another cmd down the wire
                     line_busy = false;
                 }
                 if (!line_busy
@@ -1940,10 +1942,11 @@ struct OnVariableTypeHandler : OutputHandler {
             for (it = a_in.output ().out_of_band_records ().begin ();
                  it != a_in.output ().out_of_band_records ().end ();
                  ++it) {
-                LOG_DD ("checking debugger log: "
-                        << it->stream_record ().debugger_log ());
+                
+                LOG_DD ("checking debugger console: "
+                        << it->stream_record ().debugger_console ());
                 if (it->has_stream_record ()
-                    && !it->stream_record ().debugger_log ().compare
+                    && !it->stream_record ().debugger_console ().compare
                                                             (0, 6, "ptype ")) {
 
                     LOG_DD ("handler selected");
@@ -1963,10 +1966,10 @@ struct OnVariableTypeHandler : OutputHandler {
         list<Output::OutOfBandRecord>::const_iterator it;
         it = a_in.output ().out_of_band_records ().begin ();
         THROW_IF_FAIL2 (it->has_stream_record ()
-                        && !it->stream_record ().debugger_log ().compare
+                        && !it->stream_record ().debugger_console ().compare
                                                (0, 6, "ptype "),
                         "stream_record: " +
-                        it->stream_record ().debugger_log ());
+                        it->stream_record ().debugger_console ());
         ++it;
         if (!it->has_stream_record ()
             || it->stream_record ().debugger_console ().compare



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]