[nemiver: 2/2] Fix issues from patch review (Closes: #527947)
- From: Jonathon Jongsma <jjongsma src gnome org>
- To: svn-commits-list gnome org
- Subject: [nemiver: 2/2] Fix issues from patch review (Closes: #527947)
- Date: Tue, 10 Mar 2009 23:45:57 -0400 (EDT)
commit 0bdceceae8c0d9f01af2ca22c2c3566d059d80d9
Author: Jonathon Jongsma <jonathon jongsma collabora co uk>
Date: Tue Mar 10 22:40:23 2009 -0500
Fix issues from patch review (Closes: #527947)
* src/dbgengine/nmv-gdbmi-parser.cc: only test for <> braces since those are
the only cases I've seen so far. We can add others if we come across
other situations where we need to change our comma-parsing strategy.
* tests/test-gdbmi.cc: Initialize parser with correct variable
---
src/dbgengine/nmv-gdbmi-parser.cc | 8 ++------
tests/test-gdbmi.cc | 3 +--
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/dbgengine/nmv-gdbmi-parser.cc b/src/dbgengine/nmv-gdbmi-parser.cc
index cc9c3b4..802a991 100644
--- a/src/dbgengine/nmv-gdbmi-parser.cc
+++ b/src/dbgengine/nmv-gdbmi-parser.cc
@@ -5841,13 +5841,9 @@ GDBMIParser::parse_member_variable (const UString::size_type a_from,
// "0x40085e <my_func(void*, void*)>"
|| (brace_level > 0))
&& RAW_CHAR_AT (cur) != '}') {
- if (RAW_CHAR_AT (cur) == '(' ||
- RAW_CHAR_AT (cur) == '[' ||
- RAW_CHAR_AT (cur) == '<') {
+ if (RAW_CHAR_AT (cur) == '<') {
++brace_level;
- } else if (RAW_CHAR_AT (cur) == ')' ||
- RAW_CHAR_AT (cur) == ']' ||
- RAW_CHAR_AT (cur) == '>') {
+ } else if (RAW_CHAR_AT (cur) == '>') {
--brace_level;
}
++cur;
diff --git a/tests/test-gdbmi.cc b/tests/test-gdbmi.cc
index 87a347e..09c3ddf 100644
--- a/tests/test-gdbmi.cc
+++ b/tests/test-gdbmi.cc
@@ -420,9 +420,8 @@ test_var_with_comma ()
UString::size_type to = 0;
IDebugger::VariableSafePtr var (new IDebugger::Variable) ;
- GDBMIParser parser (gv_var_with_member);
+ GDBMIParser parser (gv_var_with_member8);
- parser.push_input (gv_var_with_member8);
BOOST_REQUIRE (parser.parse_variable_value (0, to, var)) ;
BOOST_REQUIRE (var) ;
BOOST_REQUIRE (1 == var->members ().size ()) ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]