public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Building GDB 15.0.91 on MinGW: gcore.c
Date: Thu, 06 Jun 2024 23:20:14 +0300	[thread overview]
Message-ID: <86zfrxg6wx.fsf@gnu.org> (raw)
In-Reply-To: <20240601155907.B796C81691@takamaka.gnat.com> (message from Joel Brobecker on Sat, 1 Jun 2024 08:59:07 -0700 (PDT))

> From: Joel Brobecker <brobecker@adacore.com>
> Date: Sat,  1 Jun 2024 08:59:07 -0700 (PDT)
> 
> Hello,
> 
> I have just finished creating the gdb-15.0.91 pre-release.
> It is available for download at the following location:
> 
>     https://sourceware.org/pub/gdb/snapshots/branch/gdb-15.0.91.tar.xz
> 
> A gzip'ed version is also available: gdb-15.0.91.tar.gz.
> 
> Please give it a test if you can and report any problems you might find.

I get a warning compiling gcore.c:

       CXX    gcore.o
     gcore.c: In function 'int objfile_find_memory_regions(target_ops*, find_memory_region_ftype, void*)':
     gcore.c:563:36: warning: 'temp_top' may be used uninitialized in this function [-Wmaybe-uninitialized]
       563 |     (*func) (temp_bottom, temp_top - temp_bottom,
	   |                           ~~~~~~~~~^~~~~~~~~~~~~
     gcore.c:563:13: warning: 'temp_bottom' may be used uninitialized in this function [-Wmaybe-uninitialized]
       563 |     (*func) (temp_bottom, temp_top - temp_bottom,
	   |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       564 |       1, /* Stack section will be readable.  */
	   |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       565 |       1, /* Stack section will be writable.  */
	   |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       566 |       0, /* Stack section will not be executable.  */
	   |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       567 |       1, /* Stack section will be modified.  */
	   |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       568 |       false, /* No memory tags in the object file.  */
	   |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       569 |       obfd);
	   |       ~~~~~


Suggested fix:

--- gdb/gcore.c~0	2024-05-26 18:55:53.000000000 +0300
+++ gdb/gcore.c	2024-06-06 22:43:14.518884300 +0300
@@ -528,7 +528,7 @@ objfile_find_memory_regions (struct targ
 			     find_memory_region_ftype func, void *obfd)
 {
   /* Use objfile data to create memory sections.  */
-  bfd_vma temp_bottom, temp_top;
+  bfd_vma temp_bottom = 0, temp_top = 0;
 
   /* Call callback function for each objfile section.  */
   for (objfile *objfile : current_program_space->objfiles ())

OK to install?

  parent reply	other threads:[~2024-06-06 20:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-01 15:59 GDB 15.0.91 available for testing Joel Brobecker
2024-06-06 20:16 ` Building GDB 15.0.91 on MinGW: CPPFLAGS Eli Zaretskii
2024-06-07 12:21   ` Building GDB 15.0.91 on MinGW: CPPFLAGS and libctf Eli Zaretskii
     [not found]     ` <87r0d8k0gc.fsf@tromey.com>
2024-06-07 19:56       ` Eli Zaretskii
2024-06-07 21:39         ` Tom Tromey
2024-06-08  6:10           ` Eli Zaretskii
2024-06-08  7:54     ` Eli Zaretskii
2024-06-06 20:20 ` Eli Zaretskii [this message]
     [not found]   ` <87msnwk0du.fsf@tromey.com>
2024-06-08  7:25     ` Building GDB 15.0.91 on MinGW: gcore.c Eli Zaretskii
2024-06-07 12:27 ` Building GDB 15.0.91 on MinGW: ui_out_emit_type<ui_out_type_tuple>::m_uiout Eli Zaretskii
     [not found]   ` <87ikykk07l.fsf@tromey.com>
2024-06-07 19:57     ` Eli Zaretskii
2024-06-07 12:34 ` Building GDB 15.0.91 on MinGW: libctf.la Eli Zaretskii
2024-06-08  7:56   ` Eli Zaretskii
2024-06-07 13:13 ` Building GDB 15.0.91 on MinGW: Problem with TUI Eli Zaretskii
     [not found]   ` <599928735.5136862.1717766505896@mail.yahoo.com>
2024-06-07 13:48     ` Eli Zaretskii

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=86zfrxg6wx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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).