nemiver r790 - in branches/0.5: . src/dbgengine tests
- From: dodji svn gnome org
- To: svn-commits-list gnome org
- Subject: nemiver r790 - in branches/0.5: . src/dbgengine tests
- Date: Sun, 6 Apr 2008 20:30:12 +0100 (BST)
Author: dodji
Date: Sun Apr 6 20:30:12 2008
New Revision: 790
URL: http://svn.gnome.org/viewvc/nemiver?rev=790&view=rev
Log:
pulled from trunk:
"make nemiver support pending breakpoints on function names"
The command line was:
svn merge -r786:789 svn+ssh://svn.gnome.org/svn/nemiver/trunk
Modified:
branches/0.5/ChangeLog
branches/0.5/NEWS
branches/0.5/src/dbgengine/nmv-gdb-engine.cc
branches/0.5/src/dbgengine/nmv-gdbmi-parser.cc
branches/0.5/tests/test-gdbmi.cc
Modified: branches/0.5/NEWS
==============================================================================
--- branches/0.5/NEWS (original)
+++ branches/0.5/NEWS Sun Apr 6 20:30:12 2008
@@ -2,13 +2,19 @@
=============
Fixes
---------------
-
+-------
* unplug some immature non regression tests for now
* fix an infinite loop when parsing an output record having a line starting
with '='
+ * support setting breakpoints on functions that are in not-yet-loaded shared
+ libraries.
* fix #526291 â Nemiver doesn't propose to stop the debugging application
+Translations
+-------------
+ * [ja] Takeshi AIHANA
+
+
0.5.1 Release
=============
Modified: branches/0.5/src/dbgengine/nmv-gdb-engine.cc
==============================================================================
--- branches/0.5/src/dbgengine/nmv-gdb-engine.cc (original)
+++ branches/0.5/src/dbgengine/nmv-gdb-engine.cc Sun Apr 6 20:30:12 2008
@@ -2038,7 +2038,7 @@
Command command;
- queue_command (Command ("set breakpoint pending auto"));
+ queue_command (Command ("set breakpoint pending on"));
//tell gdb not to pass the SIGINT signal to the target.
queue_command (Command ("handle SIGINT stop print nopass"));
//tell the linker to do all relocations at program load
@@ -2819,8 +2819,9 @@
LOG_FUNCTION_SCOPE_NORMAL_DD;
THROW_IF_FAIL (m_priv);
queue_command (Command ("set-breakpoint",
- "-break-insert " + a_func_name,
+ "break " + a_func_name,
a_cookie));
+ list_breakpoints (a_cookie);
}
void
@@ -3529,4 +3530,3 @@
}//end extern C
-
Modified: branches/0.5/src/dbgengine/nmv-gdbmi-parser.cc
==============================================================================
--- branches/0.5/src/dbgengine/nmv-gdbmi-parser.cc (original)
+++ branches/0.5/src/dbgengine/nmv-gdbmi-parser.cc Sun Apr 6 20:30:12 2008
@@ -211,21 +211,26 @@
LOG_D ("got pending breakpoint: '" << pending << "'",
GDBMI_OUTPUT_DOMAIN);
vector<UString> str_tab = pending.split (":");
- LOG_D ("filepath: '" << str_tab[0] << "'", GDBMI_OUTPUT_DOMAIN);
- LOG_D ("linenum: '" << str_tab[1] << "'", GDBMI_OUTPUT_DOMAIN);
- if (str_tab.size () != 2) {
+ if (str_tab.size () > 1) {
+ LOG_D ("filepath: '" << str_tab[0] << "'", GDBMI_OUTPUT_DOMAIN);
+ LOG_D ("linenum: '" << str_tab[1] << "'", GDBMI_OUTPUT_DOMAIN);
+ }
+ if (str_tab.size () == 2) {
+ string path = Glib::locale_from_utf8 (str_tab[0]);
+ if (Glib::path_is_absolute (path)) {
+ attrs["file"] = Glib::locale_to_utf8
+ (Glib::path_get_basename (path));
+ attrs["fullname"] = Glib::locale_to_utf8 (path);
+ } else {
+ attrs["file"] = Glib::locale_to_utf8 (path);;
+ }
+ attrs["line"] = str_tab[1];
+ } else if (str_tab.size () == 1) {
+ attrs["func"] = str_tab[0];
+ } else {
LOG_PARSING_ERROR (a_input, cur);
return false;
}
- string path = Glib::locale_from_utf8 (str_tab[0]);
- if (Glib::path_is_absolute (path)) {
- attrs["file"] = Glib::locale_to_utf8
- (Glib::path_get_basename (path));
- attrs["fullname"] = Glib::locale_to_utf8 (path);
- } else {
- attrs["file"] = Glib::locale_to_utf8 (path);;
- }
- attrs["line"] = str_tab[1];
}
map<UString, UString>::iterator iter, null_iter = attrs.end ();
Modified: branches/0.5/tests/test-gdbmi.cc
==============================================================================
--- branches/0.5/tests/test-gdbmi.cc (original)
+++ branches/0.5/tests/test-gdbmi.cc Sun Apr 6 20:30:12 2008
@@ -89,10 +89,13 @@
static const char* gv_memory_values =
"addr=\"0x000013a0\",nr-bytes=\"32\",total-bytes=\"32\",next-row=\"0x000013c0\",prev-row=\"0x0000139c\",next-page=\"0x000013c0\",prev-page=\"0x00001380\",memory=[{addr=\"0x000013a0\",data=[\"0x10\",\"0x11\",\"0x12\",\"0x13\"],ascii=\"xxxx\"}]";
-static const char* gv_breakpoint_table =
+static const char* gv_breakpoint_table0 =
"BreakpointTable={nr_rows=\"1\",nr_cols=\"6\",hdr=[{width=\"3\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"10\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x08081566\",func=\"main\",file=\"main.cc\",fullname=\"/home/jonathon/Projects/agave.git/src/main.cc\",line=\"70\",times=\"0\"}]}";
+static const char* gv_breakpoint_table1 =
+"BreakpointTable={nr_rows=\"2\",nr_cols=\"6\",hdr=[{width=\"7\",alignment=\"-1\",col_name=\"number\",colhdr=\"Num\"},{width=\"14\",alignment=\"-1\",col_name=\"type\",colhdr=\"Type\"},{width=\"4\",alignment=\"-1\",col_name=\"disp\",colhdr=\"Disp\"},{width=\"3\",alignment=\"-1\",col_name=\"enabled\",colhdr=\"Enb\"},{width=\"10\",alignment=\"-1\",col_name=\"addr\",colhdr=\"Address\"},{width=\"40\",alignment=\"2\",col_name=\"what\",colhdr=\"What\"}],body=[bkpt={number=\"1\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"0x0805e404\",func=\"main\",file=\"/usr/include/boost/test/minimal.hpp\",fullname=\"/usr/include/boost/test/minimal.hpp\",line=\"113\",times=\"1\"},bkpt={number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"<PENDING>\",pending=\"nemiver_common_create_dynamic_module_instance\",times=\"0\"}]}";
+
void
test_str0 ()
{
@@ -485,8 +488,8 @@
std::map<int, IDebugger::BreakPoint> breakpoints;
UString::size_type cur = 0;
- BOOST_REQUIRE (parse_breakpoint_table (gv_breakpoint_table,
- cur, cur, breakpoints)) ;
+ BOOST_REQUIRE (parse_breakpoint_table (gv_breakpoint_table0,
+ cur, cur, breakpoints)) ;
BOOST_REQUIRE_EQUAL (breakpoints.size (), 1u);
std::map<int, IDebugger::BreakPoint>::const_iterator iter;
iter = breakpoints.find (1);
@@ -496,8 +499,13 @@
BOOST_REQUIRE_EQUAL (iter->second.address (), "0x08081566");
BOOST_REQUIRE_EQUAL (iter->second.function (), "main");
BOOST_REQUIRE_EQUAL (iter->second.file_name (), "main.cc");
- BOOST_REQUIRE_EQUAL (iter->second.file_full_name (), "/home/jonathon/Projects/agave.git/src/main.cc");
+ BOOST_REQUIRE_EQUAL (iter->second.file_full_name (),
+ "/home/jonathon/Projects/agave.git/src/main.cc");
BOOST_REQUIRE_EQUAL (iter->second.line (), 70);
+
+ cur = 0, cur = 0, breakpoints.clear();
+ BOOST_REQUIRE (parse_breakpoint_table (gv_breakpoint_table1,
+ cur, cur, breakpoints)) ;
}
using boost::unit_test::test_suite ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]