[nemiver] Add comments and cleanup white space
- From: Dodji Seketeli <dodji src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nemiver] Add comments and cleanup white space
- Date: Sun, 2 Jun 2013 20:36:10 +0000 (UTC)
commit 48a366df44bdcbe33528f9be0e31035d5dce2fdd
Author: Dodji Seketeli <dodji seketeli org>
Date: Sun Jun 2 22:15:21 2013 +0200
Add comments and cleanup white space
* src/dbgengine/nmv-gdbmi-parser.cc
(GDBMIParser::parse_breakpoint_with_one_loc): Cleanup white
spaces and add comments.
* src/persp/dbgperspective/nmv-dbg-perspective.cc
(DBGPerspective::{get_source_editor_from_path,
append_breakpoint}): Add comments.
src/dbgengine/nmv-gdbmi-parser.cc | 27 +++++++++++++++++++-
src/persp/dbgperspective/nmv-dbg-perspective.cc | 29 +++++++++++++++++++++++
2 files changed, 54 insertions(+), 2 deletions(-)
---
diff --git a/src/dbgengine/nmv-gdbmi-parser.cc b/src/dbgengine/nmv-gdbmi-parser.cc
index 29499dd..e41428e 100644
--- a/src/dbgengine/nmv-gdbmi-parser.cc
+++ b/src/dbgengine/nmv-gdbmi-parser.cc
@@ -2201,6 +2201,30 @@ fetch_gdbmi_result:
return true;
}
+/// Parse a GDBMI expression that contains only one breakpoint.
+///
+/// The expression parsed has either the form:
+///
+/// bkpt={number="1",type="breakpoint",disp="keep",
+/// enabled="y",addr="0x000100d0",func="main",file="hello.c",
+/// fullname="/home/foo/hello.c",line="5",thread-groups=["i1"],
+/// times="0"}
+///
+/// Or the form:
+///
+/// {number="1",type="breakpoint",disp="keep",
+/// enabled="y",addr="0x000100d0",func="main",file="hello.c",
+/// fullname="/home/foo/hello.c",line="5",thread-groups=["i1"],
+/// times="0"}
+///
+/// \parm a_from the index from which to parse the MI string.
+///
+/// \param a_to where the index has been advanced to, upon completion
+/// of this function.
+///
+/// \param is_sub_breakpoint if true, means we are parsing the second
+/// form of breakpoint expression above. Otherwise, means we are
+/// parsing the first form.
bool
GDBMIParser::parse_breakpoint_with_one_loc (Glib::ustring::size_type a_from,
Glib::ustring::size_type &a_to,
@@ -2298,7 +2322,6 @@ GDBMIParser::parse_breakpoint_with_one_loc (Glib::ustring::size_type a_from,
// Non regular breakpoints like those set to catch fork
// events can have an empty address when set.
// || (iter = attrs.find ("addr")) == null_iter
-
) {
LOG_PARSING_ERROR2 (cur);
return false;
@@ -2315,7 +2338,7 @@ GDBMIParser::parse_breakpoint_with_one_loc (Glib::ustring::size_type a_from,
num = parts[0];
a_bkpt.number (atoi (num.c_str ()));
}
-
+
if (attrs["enabled"] == "y") {
a_bkpt.enabled (true);
} else {
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index b2dbcf5..ccbee1e 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -4279,6 +4279,27 @@ DBGPerspective::source_view_to_root_window_coordinates (int a_x, int a_y,
return true;
}
+/// For a given file path, find the file (open it in a source editor
+/// if it's not opened yet) and return the source editor that contains
+/// the contents of the file.
+///
+/// If the file could not be located, note that this function tries to
+/// ask the user (via a dialog box) to locate it, and the user can
+/// decide not to locate the file after all.
+///
+/// In the end if the file could not be located then a NULL pointer is
+/// returned, so callers have to deal with that.
+///
+/// \param a_path the path to the source file to consider.
+///
+/// \param a_actual_file_path the resulting absolute path at which the
+/// file was actually located.
+///
+/// \param whether to only consider the basename of the file in the
+/// search.
+///
+/// \return a pointer to the resulting source editor or NULL if the
+/// file could not be located.
SourceEditor*
DBGPerspective::get_source_editor_from_path (const UString &a_path,
UString &a_actual_file_path,
@@ -6921,6 +6942,14 @@ DBGPerspective::re_initialize_set_breakpoints ()
}
}
+/// Given a breakpoint that was set in the inferior, graphically
+/// represent it and show it to the user.
+///
+/// Note that this function doesn't not try to set a breakpoint that
+/// is reported to be 'pending' because then we are not even sure if
+/// source code exists for that breakpoint.
+///
+/// \param a_breakpoint the breakpoint that was set.
void
DBGPerspective::append_breakpoint (const IDebugger::Breakpoint &a_breakpoint)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]