This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[obv] Fix entryval compatibility with older GCCs
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Sun, 9 Oct 2011 22:58:19 +0200
- Subject: [obv] Fix entryval compatibility with older GCCs
Hi,
bugreported by Andreas Tobler.
Checked in, I forgot to cross-check it first.
Thanks,
Jan
http://sourceware.org/ml/gdb-cvs/2011-10/msg00069.html
--- src/gdb/ChangeLog 2011/10/09 19:46:04 1.13404
+++ src/gdb/ChangeLog 2011/10/09 20:57:02 1.13405
@@ -1,5 +1,11 @@
2011-10-09 Jan Kratochvil <jan.kratochvil@redhat.com>
+ Fix compatibility with older GCCs.
+ * dwarf2loc.c (dwarf_expr_reg_to_entry_parameter): Initialize parameter.
+ * stack.c (read_frame_arg): Initialize val_deref.
+
+2011-10-09 Jan Kratochvil <jan.kratochvil@redhat.com>
+
Entry values NEWS entries, DWARF disassembly support.
* NEWS: New entry values entry.
(set print entry-values, show print entry-values)
--- src/gdb/dwarf2loc.c 2011/10/09 19:46:04 1.135
+++ src/gdb/dwarf2loc.c 2011/10/09 20:57:03 1.136
@@ -833,7 +833,8 @@
int iparams;
struct value *val;
struct dwarf2_locexpr_baton *dwarf_block;
- struct call_site_parameter *parameter;
+ /* Initialize it just to avoid a GCC false warning. */
+ struct call_site_parameter *parameter = NULL;
CORE_ADDR target_addr;
if (gdbarch != frame_unwind_arch (frame))
--- src/gdb/stack.c 2011/10/09 19:43:40 1.239
+++ src/gdb/stack.c 2011/10/09 20:57:03 1.240
@@ -350,7 +350,8 @@
if (!value_optimized_out (val)
&& value_available_contents_eq (val, 0, entryval, 0, len))
{
- struct value *val_deref, *entryval_deref;
+ /* Initialize it just to avoid a GCC false warning. */
+ struct value *val_deref = NULL, *entryval_deref;
/* DW_AT_GNU_call_site_value does match with the current
value. If it is a reference still try to verify if