[RFA] buildsym.c, guard against null pointer.
Michael Snyder
msnyder@redhat.com
Tue Sep 10 16:46:00 GMT 2002
Michael Snyder wrote:
>
> Elena,
>
> I came upon this whilst debugging C++ in COFF. I don't know
> why the null pointer came along, but this at least prevents
> gdb from dumping core.
>
> 2002-05-21 Michael Snyder <msnyder@redhat.com>
>
> * buildsym.c (finish_block): Guard against null pointer.
Committed.
>
> Index: buildsym.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/buildsym.c,v
> retrieving revision 1.16
> diff -p -r1.16 buildsym.c
> *** buildsym.c 15 May 2002 21:19:18 -0000 1.16
> --- buildsym.c 22 May 2002 01:42:55 -0000
> *************** finish_block (struct symbol *symbol, str
> *** 387,393 ****
> start of this scope that don't have superblocks yet. */
>
> opblock = NULL;
> ! for (pblock = pending_blocks; pblock != old_blocks; pblock = pblock->next)
> {
> if (BLOCK_SUPERBLOCK (pblock->block) == NULL)
> {
> --- 387,395 ----
> start of this scope that don't have superblocks yet. */
>
> opblock = NULL;
> ! for (pblock = pending_blocks;
> ! pblock && pblock != old_blocks;
> ! pblock = pblock->next)
> {
> if (BLOCK_SUPERBLOCK (pblock->block) == NULL)
> {
More information about the Gdb-patches
mailing list