This is the mail archive of the gdb-patches@sources.redhat.com 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: [RFA] buildsym.c, guard against null pointer.


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)
>         {


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