summaryrefslogtreecommitdiff
path: root/gdb/symtab.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-09-26 19:38:31 +0000
committerTom Tromey <tromey@redhat.com>2012-09-26 19:38:31 +0000
commit7591d3f074716e765fe69d231ebccf7a841daa3d (patch)
tree6e24a6238ff6aa076cc95908d403446e64d240b3 /gdb/symtab.h
parente023bc4e281fe0ba6affcea2ddb4d2ea1786e766 (diff)
downloadgdb-7591d3f074716e765fe69d231ebccf7a841daa3d.tar.gz
2012-09-26 Jan Kratochvil <jan.kratochvil@redhat.com>
Tom Tromey <tromey@redhat.com> * dwarf2read.c (read_common_block): Rewrite. (new_symbol_full): Handle DW_TAG_common_block. * f-lang.c (head_common_list, find_common_for_function): Remove. * f-lang.h (struct common_entry, struct saved_f77_common, SAVED_F77_COMMON, SAVED_F77_COMMON_PTR, COMMON_ENTRY, COMMON_ENTRY_PTR, head_common_list, find_common_for_function, BLANK_COMMON_NAME_LOCAL): Remove. (struct common_block): New. * f-valprint.c (list_all_visible_commons): Remove. (info_common_command_for_block): New function. (info_common_command): Use it. * stack.c (iterate_over_block_locals): Special case for COMMON_BLOCK_DOMAIN. * symtab.h (enum domain_enum_tag) <COMMON_BLOCK_DOMAIN>: New constant. (struct general_symbol_info) <value.common_block>: New field. (SYMBOL_VALUE_COMMON_BLOCK): New define. gdb/testsuite 2012-09-26 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.fortran/common-block.exp: New file. * gdb.fortran/common-block.f90: New file.
Diffstat (limited to 'gdb/symtab.h')
-rw-r--r--gdb/symtab.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 041d8cf199b..b74fbe4718d 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -37,6 +37,7 @@ struct agent_expr;
struct program_space;
struct language_defn;
struct probe;
+struct common_block;
/* Some of the structures in this file are space critical.
The space-critical structures are:
@@ -119,6 +120,10 @@ struct general_symbol_info
CORE_ADDR address;
+ /* A common block. Used with COMMON_BLOCK_DOMAIN. */
+
+ struct common_block *common_block;
+
/* For opaque typedef struct chain. */
struct symbol *chain;
@@ -181,6 +186,7 @@ extern CORE_ADDR symbol_overlayed_address (CORE_ADDR, struct obj_section *);
#define SYMBOL_VALUE(symbol) (symbol)->ginfo.value.ivalue
#define SYMBOL_VALUE_ADDRESS(symbol) (symbol)->ginfo.value.address
#define SYMBOL_VALUE_BYTES(symbol) (symbol)->ginfo.value.bytes
+#define SYMBOL_VALUE_COMMON_BLOCK(symbol) (symbol)->ginfo.value.common_block
#define SYMBOL_BLOCK_VALUE(symbol) (symbol)->ginfo.value.block
#define SYMBOL_VALUE_CHAIN(symbol) (symbol)->ginfo.value.chain
#define SYMBOL_LANGUAGE(symbol) (symbol)->ginfo.language
@@ -406,7 +412,10 @@ typedef enum domain_enum_tag
/* LABEL_DOMAIN may be used for names of labels (for gotos). */
- LABEL_DOMAIN
+ LABEL_DOMAIN,
+
+ /* Fortran common blocks. Their naming must be separate from VAR_DOMAIN. */
+ COMMON_BLOCK_DOMAIN
} domain_enum;
/* Searching domains, used for `search_symbols'. Element numbers are