diff options
author | Tom Tromey <tromey@redhat.com> | 2012-09-26 19:38:32 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-09-26 19:38:32 +0000 |
commit | 4357ac6c6f95606fff49f976d9ebc11965967bc3 (patch) | |
tree | 3a36925d75fcc2c7f5bc401d1b7d727fb0c7bbad /gdb/f-lang.h | |
parent | 965f07a88d697b5361258b1e771c616f54678461 (diff) | |
download | gdb-4357ac6c6f95606fff49f976d9ebc11965967bc3.zip gdb-4357ac6c6f95606fff49f976d9ebc11965967bc3.tar.gz gdb-4357ac6c6f95606fff49f976d9ebc11965967bc3.tar.bz2 |
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/f-lang.h')
-rw-r--r-- | gdb/f-lang.h | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/gdb/f-lang.h b/gdb/f-lang.h index 94001e8..0d3a0c1 100644 --- a/gdb/f-lang.h +++ b/gdb/f-lang.h @@ -48,33 +48,17 @@ enum f90_range_type NONE_BOUND_DEFAULT /* "(low:high)" */ }; -struct common_entry - { - struct symbol *symbol; /* The symbol node corresponding - to this component */ - struct common_entry *next; /* The next component */ - }; - -struct saved_f77_common - { - char *name; /* Name of COMMON */ - char *owning_function; /* Name of parent function */ - int secnum; /* Section # of .bss */ - CORE_ADDR offset; /* Offset from .bss for - this block */ - struct common_entry *entries; /* List of block's components */ - struct common_entry *end_of_entries; /* ptr. to end of components */ - struct saved_f77_common *next; /* Next saved COMMON block */ - }; +/* A common block. */ -typedef struct saved_f77_common SAVED_F77_COMMON, *SAVED_F77_COMMON_PTR; - -typedef struct common_entry COMMON_ENTRY, *COMMON_ENTRY_PTR; - -extern SAVED_F77_COMMON_PTR head_common_list; /* Ptr to 1st saved COMMON */ +struct common_block +{ + /* The number of entries in the block. */ + size_t n_entries; -extern SAVED_F77_COMMON_PTR find_common_for_function (const char *, - const char *); + /* The contents of the block, allocated using the struct hack. All + pointers in the array are non-NULL. */ + struct symbol *contents[1]; +}; #define BLANK_COMMON_NAME_LOCAL "__BLANK" /* Local GDB */ |