diff options
author | Fred Fish <fnf@specifix.com> | 1996-10-07 17:58:56 +0000 |
---|---|---|
committer | Fred Fish <fnf@specifix.com> | 1996-10-07 17:58:56 +0000 |
commit | 7336948874d13372e7db33864fecfcdff1a55569 (patch) | |
tree | ee33cc35aeaabb332fd2a9e1b310e74d9cf1a655 /gdb | |
parent | 7f8da359a85c040f6b22960eba8e8785a5576251 (diff) | |
download | gdb-7336948874d13372e7db33864fecfcdff1a55569.zip gdb-7336948874d13372e7db33864fecfcdff1a55569.tar.gz gdb-7336948874d13372e7db33864fecfcdff1a55569.tar.bz2 |
* buildsym.c (finish_block): Change innerblock_anon_complaint to
print the addresses as part of the complaint. Add a complaint for
cases where the block end address is smaller than the block start
address, in case any such conditions slip through our fixup mechanism.
* symmisc.c (dump_symtab): Only print blockvector for primary
symtabs, to avoid massive duplication of output due to secondary
symtabs that point to same blockvector. Also do some minor
formatting tweaks.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/buildsym.c | 31 |
2 files changed, 40 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0a8cf3f..40e65a6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +Sun Oct 6 15:48:09 1996 Fred Fish <fnf@cygnus.com> + + * buildsym.c (finish_block): Change innerblock_anon_complaint to + print the addresses as part of the complaint. Add a complaint for + cases where the block end address is smaller than the block start + address, in case any such conditions slip through our fixup mechanism. + * symmisc.c (dump_symtab): Only print blockvector for primary + symtabs, to avoid massive duplication of output due to secondary + symtabs that point to same blockvector. Also do some minor + formatting tweaks. + Mon Oct 7 10:42:32 1996 Per Bothner <bothner@deneb.cygnus.com> Replace header_files global by per-objfile field. diff --git a/gdb/buildsym.c b/gdb/buildsym.c index e0b30f0..1605ee5 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -60,11 +60,17 @@ make_blockvector PARAMS ((struct objfile *)); /* Complaints about the symbols we have encountered. */ +struct complaint block_end_complaint = + {"block end address less than block start address in %s (patched it)", 0, 0}; + +struct complaint anon_block_end_complaint = + {"block end address 0x%lx less than block start address 0x%lx (patched it)", 0, 0}; + struct complaint innerblock_complaint = {"inner block not inside outer block in %s", 0, 0}; struct complaint innerblock_anon_complaint = - {"inner block not inside outer block", 0, 0}; + {"inner block (0x%lx-0x%lx) not inside outer block (0x%lx-0x%lx)", 0, 0}; struct complaint blockvector_complaint = {"block at 0x%lx out of order", 0, 0}; @@ -320,6 +326,25 @@ finish_block (symbol, listhead, old_blocks, start, end, objfile) } *listhead = NULL; +#if 1 + /* Check to be sure that the blocks have an end address that is + greater than starting address */ + + if (BLOCK_END (block) < BLOCK_START (block)) + { + if (symbol) + { + complain (&block_end_complaint, SYMBOL_SOURCE_NAME (symbol)); + } + else + { + complain (&anon_block_end_complaint, BLOCK_END (block), BLOCK_START (block)); + } + /* Better than nothing */ + BLOCK_END (block) = BLOCK_START (block); + } +#endif + /* Install this block as the superblock of all blocks made since the start of this scope that don't have superblocks yet. */ @@ -343,7 +368,9 @@ finish_block (symbol, listhead, old_blocks, start, end, objfile) } else { - complain (&innerblock_anon_complaint); + complain (&innerblock_anon_complaint, BLOCK_START (pblock->block), + BLOCK_END (pblock->block), BLOCK_START (block), + BLOCK_END (block)); } BLOCK_START (pblock->block) = BLOCK_START (block); BLOCK_END (pblock->block) = BLOCK_END (block); |