[PATCH] Various logging and style tweaking
- From: Dodji Seketeli <dodji seketeli org>
- To: Nemiver Development <nemiver-list gnome org>
- Subject: [PATCH] Various logging and style tweaking
- Date: Sun, 14 Apr 2013 15:38:24 +0200
Hello,
While looking at debugging an issue, I felt the need to add some new
logs, and I stumbled accross some places that could use some style
cleanups.
Thus this patch, tested an applied to the master branch.
* src/common/nmv-proc-utils.cc (launch_program): Use LOD_DD to log
to the default domain.
* src/dbgengine/nmv-gdb-engine.cc (GDBEngine::launch_gdb): Add
more logs.
(GDBEngine::load_program): Remove trailing white space and add
mode logs.
* src/persp/dbgperspective/nmv-dbg-perspective.cc
(DBGPerspective::execute_program): Simplify logic. What was I
thinking ...
---
src/common/nmv-proc-utils.cc | 2 +-
src/dbgengine/nmv-gdb-engine.cc | 4 +++-
src/persp/dbgperspective/nmv-dbg-perspective.cc | 4 +---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/common/nmv-proc-utils.cc b/src/common/nmv-proc-utils.cc
index c6fc315..cfa8d2a 100644
n--- a/src/common/nmv-proc-utils.cc
+++ b/src/common/nmv-proc-utils.cc
@@ -68,7 +68,7 @@ launch_program (const std::vector<UString> &a_args,
++it) {
str += *it + " ";
}
- LOG_D ("launching program with args: '" << str << "'", NMV_DEFAULT_DOMAIN);
+ LOG_DD ("launching program with args: '" << str << "'");
enum ReadWritePipe {
READ_PIPE=0,
diff --git a/src/dbgengine/nmv-gdb-engine.cc b/src/dbgengine/nmv-gdb-engine.cc
index e462a48..3286a12 100644
--- a/src/dbgengine/nmv-gdb-engine.cc
+++ b/src/dbgengine/nmv-gdb-engine.cc
@@ -828,6 +828,7 @@ public:
// libtool wrapper script,
// run the debugging session under libtool
if (is_libtool_executable_wrapper (prog_path)) {
+ LOG_DD ( prog_path << " is a libtool script");
argv.push_back ("libtool");
argv.push_back ("--mode=execute");
}
@@ -3204,7 +3205,7 @@ GDBEngine::load_program (const UString &a_prog,
m_priv->get_tty_attributes ();
if (m_priv->launch_gdb_and_set_args (a_working_dir,
- a_source_search_dirs,
+ a_source_search_dirs,
a_prog, a_argv,
gdb_opts) == false)
return false;
@@ -3251,6 +3252,7 @@ GDBEngine::load_program (const UString &a_prog,
"-enable-pretty-printing"));
set_attached_to_target (true);
} else {
+ LOG_DD("Re-using the same GDB");
Command command ("load-program",
UString ("-file-exec-and-symbols ") + a_prog);
queue_command (command);
diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
index 22b82c1..bb9861d 100644
--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
+++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
@@ -6061,9 +6061,7 @@ DBGPerspective::execute_program
get_terminal_name (),
uses_launch_terminal (),
get_terminal ().slave_pty (),
- a_restarting
- ? true
- : false) == false) {
+ a_restarting) == false) {
UString message;
message.printf (_("Could not load program: %s"),
prog.c_str ());
--
Dodji
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]