This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] remove dead code in varobj.c:c_value_of_variable
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>
- Date: Wed, 29 Feb 2012 18:02:01 -0800
- Subject: [commit] remove dead code in varobj.c:c_value_of_variable
- References: <m37h0gc2b0.fsf@fleche.redhat.com>
This patch removes some dead code identified in:
http://www.sourceware.org/ml/gdb-patches/2012-01/msg00266.html
(and analysis confirmed by Tom).
gdb/ChangeLog:
* varobj.c (c_value_of_variable): Remove dead code.
Tested on x86_64-linux. Checked in.
---
gdb/ChangeLog | 4 ++++
gdb/varobj.c | 5 -----
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 621da5b..cb9eecb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2012-02-29 Joel Brobecker <brobecker@adacore.com>
+ * varobj.c (c_value_of_variable): Remove dead code.
+
+2012-02-29 Joel Brobecker <brobecker@adacore.com>
+
* ada-lex.p (processId): Do not modify already encoded IDs.
Update function documentation.
diff --git a/gdb/varobj.c b/gdb/varobj.c
index abe832c..cb05128 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -3400,11 +3400,6 @@ c_value_of_variable (struct varobj *var, enum varobj_display_formats format)
catch that case explicitly. */
struct type *type = get_type (var);
- /* If we have a custom formatter, return whatever string it has
- produced. */
- if (var->pretty_printer && var->print_value)
- return xstrdup (var->print_value);
-
/* Strip top-level references. */
while (TYPE_CODE (type) == TYPE_CODE_REF)
type = check_typedef (TYPE_TARGET_TYPE (type));
--
1.7.1