From: "Marcin Kościelnicki" <koriakin@0x04.net>
To: sergiodj@redhat.com
Cc: uweigand@de.ibm.com, cole945@gmail.com,
gdb-patches@sourceware.org,
"Marcin Kościelnicki" <koriakin@0x04.net>
Subject: [PATCH] [OBV] gdb/rs6000: Fix maybe-uninitialized warning.
Date: Wed, 24 Feb 2016 21:06:00 -0000 [thread overview]
Message-ID: <1456347989-30766-1-git-send-email-koriakin@0x04.net> (raw)
In-Reply-To: <87oab5zvlm.fsf@redhat.com>
Introduced by 657f9cde9d531c9929bef9e02a8064101d568f50.
gdb/ChangeLog:
* rs6000-tdep.c (rs6000_frame_cache): Initialize frame and pc to 0
to avoid spurious warnings.
---
Thanks for the report. I can't reproduce the problem locally, but this
patch (pushed as obvious) should do the trick.
gdb/ChangeLog | 5 +++++
gdb/rs6000-tdep.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ea9f3f4..95cabdb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-02-24 Marcin KoÅcielnicki <koriakin@0x04.net>
+
+ * rs6000-tdep.c (rs6000_frame_cache): Initialize frame and pc to 0
+ to avoid spurious warnings.
+
2016-02-24 Gary Benson <gbenson@redhat.com>
* exec.c (exec_file_locate_attach): Do not attempt to
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index a56b8b6..d0c56d7 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -3209,7 +3209,7 @@ rs6000_frame_cache (struct frame_info *this_frame, void **this_cache)
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
struct rs6000_framedata fdata;
int wordsize = tdep->wordsize;
- CORE_ADDR func, pc;
+ CORE_ADDR func = 0, pc = 0;
if ((*this_cache) != NULL)
return (struct rs6000_frame_cache *) (*this_cache);
--
2.7.1
next prev parent reply other threads:[~2016-02-24 21:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-30 16:31 [PATCH 1/7 v3] powerpc: Support z-point type in gdbserver Wei-cheng Wang
2015-03-30 16:31 ` [PATCH 6/7 v3] Build unavailable-stack frames for tracepoint Wei-cheng Wang
2015-04-08 17:07 ` Ulrich Weigand
2016-02-22 5:28 ` Marcin Kościelnicki
2016-02-23 18:58 ` Ulrich Weigand
2016-02-24 3:18 ` Marcin Kościelnicki
2016-02-24 20:44 ` Sergio Durigan Junior
2016-02-24 21:06 ` Marcin Kościelnicki [this message]
2015-03-30 16:31 ` [PATCH 5/7 v3] Replace write_inferior_data_ptr with write_inferior_data_pointer Wei-cheng Wang
2015-04-08 17:06 ` Ulrich Weigand
2015-03-30 16:31 ` [PATCH 2/7 v3] Tracepoint for ppc64 Wei-cheng Wang
2015-04-08 16:57 ` Ulrich Weigand
2015-06-27 17:48 ` Wei-cheng Wang
2015-07-03 16:42 ` Ulrich Weigand
2015-03-30 16:31 ` [PATCH 3/7 v3] Add testcases for ppc64 tracepoint Wei-cheng Wang
2015-04-08 17:02 ` Ulrich Weigand
2015-03-30 16:31 ` [PATCH 7/7 v3] Remove tracepoint_action ops Wei-cheng Wang
2015-04-08 17:09 ` Ulrich Weigand
2015-03-30 16:31 ` [PATCH 4/7 v3] Allow target to decide where to map jump-pad Wei-cheng Wang
2015-04-08 17:04 ` Ulrich Weigand
2015-04-08 16:56 ` [PATCH 1/7 v3] powerpc: Support z-point type in gdbserver Ulrich Weigand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456347989-30766-1-git-send-email-koriakin@0x04.net \
--to=koriakin@0x04.net \
--cc=cole945@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=sergiodj@redhat.com \
--cc=uweigand@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).