make common_block const

This changes general_symbol_info to make "common_block" const.

2014-06-18  Tom Tromey  <tromey@redhat.com>

	* f-valprint.c (info_common_command_for_block): Update.
	* symtab.h (struct general_symbol_info) <common_block>: Now
	const.
This commit is contained in:
Tom Tromey 2014-06-11 08:02:48 -06:00
parent 346d1dfebd
commit 17a40b44e2
3 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2014-06-18 Tom Tromey <tromey@redhat.com>
* f-valprint.c (info_common_command_for_block): Update.
* symtab.h (struct general_symbol_info) <common_block>: Now
const.
2014-06-18 Tom Tromey <tromey@redhat.com>
* symtab.h (struct symtab) <blockvector>: Now const.

View File

@ -424,7 +424,7 @@ info_common_command_for_block (const struct block *block, const char *comname,
ALL_BLOCK_SYMBOLS (block, iter, sym)
if (SYMBOL_DOMAIN (sym) == COMMON_BLOCK_DOMAIN)
{
struct common_block *common = SYMBOL_VALUE_COMMON_BLOCK (sym);
const struct common_block *common = SYMBOL_VALUE_COMMON_BLOCK (sym);
size_t index;
gdb_assert (SYMBOL_CLASS (sym) == LOC_COMMON_BLOCK);

View File

@ -122,7 +122,7 @@ struct general_symbol_info
/* A common block. Used with LOC_COMMON_BLOCK. */
struct common_block *common_block;
const struct common_block *common_block;
/* For opaque typedef struct chain. */