diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-10-09 19:23:41 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-10-09 19:23:41 +0000 |
commit | bb984ff154d9e532deccdb52b3527496852c5930 (patch) | |
tree | 713649ab6d268f6ec6d4d18fb752efab6df73ac3 /gdb/gdbtypes.h | |
parent | 8e3b41a9061833aa9dc504d68e7446bca4984f16 (diff) |
gdb/
Tail call sites reader implementation.
* dwarf2read.c (read_call_site_scope): Recognize DW_AT_GNU_tail_call,
fill in TYPE_TAIL_CALL_LIST.
* gdbtypes.h (struct func_type): New field tail_call_list.
(struct call_site): New field tail_call_next.
(TYPE_TAIL_CALL_LIST): New definition.
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r-- | gdb/gdbtypes.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h index 523cd8007b..9d9785bdec 100644 --- a/gdb/gdbtypes.h +++ b/gdb/gdbtypes.h @@ -902,6 +902,13 @@ struct func_type this is only fetched from the Dwarf-2 DW_AT_calling_convention attribute. */ unsigned calling_convention; + + /* Only those DW_TAG_GNU_call_site's in this function that have + DW_AT_GNU_tail_call set are linked in this list. Function without its + tail call list complete (DW_AT_GNU_all_tail_call_sites or its superset + DW_AT_GNU_all_call_sites) has TAIL_CALL_LIST NULL, even if some + DW_TAG_GNU_call_site's exist in such function. */ + struct call_site *tail_call_list; }; /* A place where a function gets called from, represented by @@ -913,6 +920,9 @@ struct call_site field as we overload core_addr_hash and core_addr_eq for it. */ CORE_ADDR pc; + /* List successor with head in FUNC_TYPE.TAIL_CALL_LIST. */ + struct call_site *tail_call_next; + /* Describe DW_AT_GNU_call_site_target. Missing attribute uses FIELD_LOC_KIND_DWARF_BLOCK with FIELD_DWARF_BLOCK == NULL. */ struct @@ -1060,6 +1070,7 @@ extern void allocate_gnat_aux_type (struct type *); #define TYPE_GNAT_SPECIFIC(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.gnat_stuff #define TYPE_DESCRIPTIVE_TYPE(thistype) TYPE_GNAT_SPECIFIC(thistype)->descriptive_type #define TYPE_CALLING_CONVENTION(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.func_stuff->calling_convention +#define TYPE_TAIL_CALL_LIST(thistype) TYPE_MAIN_TYPE(thistype)->type_specific.func_stuff->tail_call_list #define TYPE_BASECLASS(thistype,index) TYPE_FIELD_TYPE(thistype, index) #define TYPE_N_BASECLASSES(thistype) TYPE_CPLUS_SPECIFIC(thistype)->n_baseclasses #define TYPE_BASECLASS_NAME(thistype,index) TYPE_FIELD_NAME(thistype, index) |