This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: PR9167 Derived class static member CRTP infinite recursion on print
- From: Tom Tromey <tromey at redhat dot com>
- To: Chris Moller <cmoller at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 20 Apr 2010 12:46:27 -0600
- Subject: Re: PR9167 Derived class static member CRTP infinite recursion on print
- References: <4BC7DDFC.3050506@redhat.com>
- Reply-to: tromey at redhat dot com
>>>>> "Chris" == Chris Moller <cmoller@redhat.com> writes:
Chris> You can't do that. obstack_base() returns a pointer to the current
Chris> allocation, which may change depending on what's stuffed into the
Chris> obstack--by the time the obstack_free is hit, the base may have
Chris> changed.
Why do we need to pop the stack at all?
It seems to me that if we printed something once, during a given call
into val_print, then we should never try to print it again.
Am I missing something?
Chris> + void * free_to_ptr =
No space after the "*".
Chris> obstack_grow (&dont_print_statmem_obstack, (char *) &addr,
Chris> sizeof (CORE_ADDR));
Chris> -
Chris> CHECK_TYPEDEF (type);
Gratuitious whitespace change.
This is ok with those changes. Thanks.
Tom