This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch to generate correct dwarf2 debugging info



  In message <39C0ECB7.3A5A64A2@redhat.com>you write:
  > This is a multi-part message in MIME format.
  > --------------E7054A497D1F9D81CBD2B639
  > 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  <wcohen@redhat.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
possible.

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
you.

  > !  	    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);



jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]