This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: really free pending_blocks, v2


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


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