This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: really free pending_blocks, v2
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 29 Nov 2012 16:09:40 +0000
- Subject: Re: RFC: really free pending_blocks, v2
- References: <87mwy077ny.fsf@fleche.redhat.com>
On 11/29/2012 03:25 PM, Tom Tromey wrote:
>
> +/* An obstack used for allocating pending blocks. */
> +
> +static struct obstack pending_block_obstack;
> +
> +/* List of blocks already made (lexical contexts already closed).
> + This is used at the end to make the blockvector. */
> +
> +struct pending_block
> + {
> + struct pending_block *next;
> + struct block *block;
> + };
> +
> +/* Pointer to the head of a linked list of symbol blocks which have
> + already been finalized (lexical contexts already closed) and which
> + are just waiting to be built into a blockvector when finalizing the
> + associated symtab. */
> +
> +static struct pending_block *pending_blocks;
Do we take care of always clearing this before starting a new symtab?
What I'm worried about is throwing an error during debug info
reading leading to a stale pending_blocks list that gets later added
to by mistake, the next time we start another read.
--
Pedro Alves