From: Paul Pluzhnikov <ppluzhnikov@google.com>
To: Ken Werner <ken@linux.vnet.ibm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Use mmap instead of obstack_alloc for dwarf debug sections.
Date: Thu, 18 Jun 2009 14:06:00 -0000 [thread overview]
Message-ID: <8ac60eac0906180706g13d0c7c8q5c9434664de9d664@mail.gmail.com> (raw)
In-Reply-To: <200906180919.n5I9Jh9H004739@d06av01.portsmouth.uk.ibm.com>
On Thu, Jun 18, 2009 at 2:19 AM, Ken Werner <ken@linux.vnet.ibm.com> wrote:
> I noticed gdb/dwarf2-frame.c:1922 (and :1950) calls dwarf2_get_section_info
> with unsigned long* (5th argument). The function expects a bfd_size_type *
> (a pointer to an unsigned long long on my machine). Thus the compiler issues
> a warning and the gdb build fails because of -Werror. Is it sufficient to
> just cast to (bfd_size_type *) or am I missing something?
I think the cast would be wrong, as dwarf2_get_section_info would really
write 'unsigned long long' and corrupt your stack.
I've checked in the patch below under the obvious rule.
--
Paul Pluzhnikov
2009-06-18 Paul Pluzhnikov <ppluzhnikov@google.com>
* dwarf2-frame.c (struct comp_unit): Use bfd_size_type for
dwarf_frame_size.
Index: dwarf2-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2-frame.c,v
retrieving revision 1.88
diff -u -p -u -r1.88 dwarf2-frame.c
--- dwarf2-frame.c 16 Jun 2009 21:06:40 -0000 1.88
+++ dwarf2-frame.c 18 Jun 2009 13:57:58 -0000
@@ -130,7 +130,7 @@ struct comp_unit
gdb_byte *dwarf_frame_buffer;
/* Length of the loaded .debug_frame section. */
- unsigned long dwarf_frame_size;
+ bfd_size_type dwarf_frame_size;
/* Pointer to the .debug_frame section. */
asection *dwarf_frame_section;
next prev parent reply other threads:[~2009-06-18 14:06 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-27 0:12 Paul Pluzhnikov
2009-05-28 1:16 ` Tom Tromey
2009-05-28 16:57 ` Paul Pluzhnikov
2009-05-30 22:36 ` Tom Tromey
2009-06-11 1:40 ` Paul Pluzhnikov
2009-06-11 1:43 ` Paul Pluzhnikov
2009-06-16 19:19 ` Tom Tromey
2009-06-16 20:43 ` Paul Pluzhnikov
2009-06-16 20:59 ` Tom Tromey
2009-06-16 21:07 ` Paul Pluzhnikov
2009-06-18 9:20 ` Ken Werner
2009-06-18 14:06 ` Paul Pluzhnikov [this message]
2009-06-18 14:11 ` Paul Pluzhnikov
2009-06-18 15:02 ` Ken Werner
2009-06-18 16:33 ` Paul Pluzhnikov
2009-06-19 7:10 ` Ken Werner
2009-06-23 15:03 ` [patch] Fix a reread_symbols regression by mmap [Re: [patch] Use mmap instead of obstack_alloc for dwarf debug sections.] Jan Kratochvil
2009-06-23 17:35 ` Paul Pluzhnikov
2009-06-23 18:08 ` Tom Tromey
2009-06-23 18:21 ` Jan Kratochvil
2009-06-23 20:00 ` Tom Tromey
2009-06-25 19:21 ` [patch] Replace reread_symbols by load+free calls Jan Kratochvil
2009-06-25 19:57 ` Pedro Alves
2009-06-25 23:25 ` Jan Kratochvil
2009-08-02 21:04 ` cancelled: " Jan Kratochvil
2009-08-14 23:09 ` Tom Tromey
2009-08-14 23:12 ` Pedro Alves
2009-08-17 15:41 ` Tom Tromey
2011-12-18 11:54 ` Jan Kratochvil
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=8ac60eac0906180706g13d0c7c8q5c9434664de9d664@mail.gmail.com \
--to=ppluzhnikov@google.com \
--cc=gdb-patches@sourceware.org \
--cc=ken@linux.vnet.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