This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 7/7] make common_block const
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Wed, 11 Jun 2014 12:53:17 -0600
- Subject: [PATCH 7/7] make common_block const
- Authentication-results: sourceware.org; auth=none
- References: <1402512797-6082-1-git-send-email-tromey at redhat dot com>
This changes general_symbol_info to make "common_block" const.
2014-06-11 Tom Tromey <tromey@redhat.com>
* f-valprint.c (info_common_command_for_block): Update.
* symtab.h (struct general_symbol_info) <common_block>: Now
const.
---
gdb/ChangeLog | 6 ++++++
gdb/f-valprint.c | 2 +-
gdb/symtab.h | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 0040bbd..408c8cc 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -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);
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 5ccc7ec..5a6f831 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -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. */
--
1.9.3