From: Daniel Jacobowitz Date: Fri, 25 Aug 2006 16:32:32 +0000 (+0000) Subject: * buildsym.c (finish_block): Don't adjust the boundaries of X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=14711c8202654c66aa23a10247dfd06b9d88b19f;p=binutils-gdb.git * buildsym.c (finish_block): Don't adjust the boundaries of nested functions. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 88d52a7109b..635cc7fa38b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-08-25 Daniel Jacobowitz + + * buildsym.c (finish_block): Don't adjust the boundaries of + nested functions. + 2006-08-24 Andreas Schwab * symfile.c (add_symbol_file_command): Fix off-by-one when diff --git a/gdb/buildsym.c b/gdb/buildsym.c index d0143bc3f24..2e946b9a102 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -400,9 +400,14 @@ finish_block (struct symbol *symbol, struct pending **listhead, #if 1 /* Check to be sure the blocks are nested as we receive them. If the compiler/assembler/linker work, this just - burns a small amount of time. */ - if (BLOCK_START (pblock->block) < BLOCK_START (block) || - BLOCK_END (pblock->block) > BLOCK_END (block)) + burns a small amount of time. + + Skip blocks which correspond to a function; they're not + physically nested inside this other blocks, only + lexically nested. */ + if (BLOCK_FUNCTION (pblock->block) == NULL + && (BLOCK_START (pblock->block) < BLOCK_START (block) + || BLOCK_END (pblock->block) > BLOCK_END (block))) { if (symbol) {