[PATCH] 689458 - Crash when copying variable value
- From: Dodji Seketeli <dodji seketeli org>
- To: Nemiver Development <nemiver-list gnome org>
- Subject: [PATCH] 689458 - Crash when copying variable value
- Date: Sun, 02 Dec 2012 11:08:17 +0100
Hello,
When the user right clicks on a variable and selects the 'copy variable
value' menu, we are getting an embarrassing crash with the message:
symbol lookup error:
/usr/lib/nemiver/plugins/dbgperspective/libdbgperspectiveplugin.so: undefined
symbol:
_ZN7nemiver14debugger_utils19dump_variable_valueERNS_9IDebugger8VariableEiRSs
This is because a variant of dump_variable_value with a non-const
IDebugger::Variable& parameter is exposed in the
src/dbgengine/nmv-debugger-utils.h, is eventually used, but is not
defined. Only the variant of dump_variable_value with a const
IDebugger::Variable& parameter is defined in
src/dbgengine/nmv-debugger-utils.cc.
The patch below fixes this by adding a const qualifier to the
IDebugger::Variable& in the dump_variable_value declaration in
src/dbgengine/nmv-debugger-utils.h.
Tested and applied to master.
* src/dbgengine/nmv-debugger-utils.h (dump_variable_value): Make
the variable parameter const, as in the definition.
---
src/dbgengine/nmv-debugger-utils.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/dbgengine/nmv-debugger-utils.h b/src/dbgengine/nmv-debugger-utils.h
index ca21063..e2c1804 100644
--- a/src/dbgengine/nmv-debugger-utils.h
+++ b/src/dbgengine/nmv-debugger-utils.h
@@ -63,11 +63,11 @@ void dump_variable_value (const IDebugger::Variable& a_var,
ostream_type &a_os,
bool a_print_var_name);
-void dump_variable_value (IDebugger::Variable& a_var,
+void dump_variable_value (const IDebugger::Variable& a_var,
int a_indent_num,
std::string &a_out_str);
-void dump_variable_value (IDebugger::Variable& a_var);
+void dump_variable_value (const IDebugger::Variable& a_var);
template<class ostream_type>
ostream_type&
--
Dodji
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]