This is the mail archive of the
mailing list for the GCC project.
Re: Patch to generate correct dwarf2 debugging info
- To: Will Cohen <wcohen at redhat dot com>
- Subject: Re: Patch to generate correct dwarf2 debugging info
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 14 Sep 2000 09:30:26 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <39C0ECB7.3A5A64A2@redhat.com>you write:
> This is a multi-part message in MIME format.
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> The current version of gcc does not generate correct dwarf2
> debugging information for float, long long, or double constant
> parameters passed to inline functions. This is due to data being
> stored in a local array. This patch corrects this problem.
> 2000-09-14 Will Cohen <email@example.com>
> * dwarf2out.c (add_const_value_attribute): Changed array into a
> xmalloced object, so it exists after function exit.
Note this introduces a memory leak, which I'd like to avoid if at all
If there's no good way to get a handle on when to free the information,
then you might consider using the garbage collector to allocate space for
> ! long *array = xmalloc(sizeof(long) * 4);
Formatting nits -- always have a space between the function name and hte
open paren for its argument list. ie
long *array = xmalloc (sizeof (long) * 4);