From: Ken Werner <ken@linux.vnet.ibm.com>
To: Tom Tromey <tromey@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [0/4] RFC: add DWARF index support
Date: Mon, 26 Jul 2010 18:41:00 -0000 [thread overview]
Message-ID: <201007262040.17235.ken@linux.vnet.ibm.com> (raw)
In-Reply-To: <m363053l1o.fsf@fleche.redhat.com>
[-- Attachment #1: Type: Text/Plain, Size: 992 bytes --]
On Saturday, July 24, 2010 12:12:03 am Tom Tromey wrote:
> >>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
> Tom> Here is what I am testing.
>
> Here is the variant I am checking it. It seems to work with all
> combinations of .debug_types, .gdb_index, and -readnow.
>
> Let me know if you hit any more problems.
Hi Tom,
It seems old GCCs do not recognize that the types_list_elements and types_list
variables of dwarf2read.c:dwarf2_initialize_objfile are accessed under the
same condition as they are initialized. GCC 4.1.2 (RHEL5) issues the following
warning:
<snip>
src/gdb/dwarf2read.c: In function ‘dwarf2_initialize_objfile’:
src/gdb/dwarf2read.c:1839: warning: ‘types_list_elements’ may be used
uninitialized in this function
src/gdb/dwarf2read.c:1838: warning: ‘types_list’ may be used uninitialized in
this function
</snip>
The attached patch initializes the two variables to prevent the warnings.
OK to apply?
Regards
-ken
[-- Attachment #2: dwarf2read-warnings.patch --]
[-- Type: text/x-patch, Size: 893 bytes --]
Changelog:
2010-07-06 Ken Werner <ken.werner@de.ibm.com>
* valops.c (dwarf2_read_index): Initialize the types_list and
types_list_elements variables.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.425
diff -p -u -r1.425 dwarf2read.c
--- dwarf2read.c 23 Jul 2010 22:15:13 -0000 1.425
+++ dwarf2read.c 26 Jul 2010 18:06:02 -0000
@@ -1835,8 +1835,10 @@ dwarf2_read_index (struct objfile *objfi
char *addr;
struct mapped_index *map;
offset_type *metadata;
- const gdb_byte *cu_list, *types_list;
- offset_type version, cu_list_elements, types_list_elements;
+ const gdb_byte *cu_list;
+ const gdb_byte *types_list = NULL;
+ offset_type version, cu_list_elements;
+ offset_type types_list_elements = 0;
int i;
if (dwarf2_per_objfile->gdb_index.asection == NULL
next prev parent reply other threads:[~2010-07-26 18:41 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-30 22:33 Tom Tromey
2010-07-09 17:31 ` Tom Tromey
2010-07-09 17:45 ` Eli Zaretskii
2010-07-09 20:26 ` Tom Tromey
2010-07-10 7:03 ` Eli Zaretskii
2010-07-12 16:52 ` Tom Tromey
2010-07-22 11:31 ` Jan Kratochvil
2010-07-22 15:54 ` Tom Tromey
2010-07-30 20:46 ` Tom Tromey
2010-08-02 18:10 ` Doug Evans
2010-08-05 16:30 ` Tom Tromey
2010-08-05 16:32 ` Doug Evans
2010-08-05 19:55 ` Tom Tromey
2010-08-05 19:57 ` Tom Tromey
2010-08-06 17:15 ` Doug Evans
2010-08-06 17:40 ` Tom Tromey
2010-08-06 20:53 ` Doug Evans
2010-08-09 20:36 ` Tom Tromey
2010-08-09 21:16 ` Doug Evans
2010-08-10 18:46 ` Tom Tromey
2010-08-10 18:57 ` Doug Evans
2010-08-09 20:25 ` Jan Kratochvil
2010-08-09 20:43 ` Tom Tromey
2010-08-09 20:33 ` Jan Kratochvil
2010-07-13 20:42 ` Tom Tromey
2010-07-22 4:28 ` Paul Pluzhnikov
2010-07-22 14:14 ` Tom Tromey
2010-07-22 15:54 ` Tom Tromey
2010-07-22 16:20 ` Paul Pluzhnikov
2010-07-22 20:54 ` Tom Tromey
2010-07-23 22:12 ` Tom Tromey
2010-07-26 18:41 ` Ken Werner [this message]
2010-07-26 18:50 ` Tom Tromey
2010-07-27 7:58 ` Ken Werner
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=201007262040.17235.ken@linux.vnet.ibm.com \
--to=ken@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.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).