diff options
author | Eugene Tarassov | 2015-09-08 16:12:53 +0000 |
---|---|---|
committer | Eugene Tarassov | 2015-09-08 16:12:53 +0000 |
commit | f4fef5e7407be4c8865fabdd821f4cce11526b87 (patch) | |
tree | 620ac0d08c4764bce52464a358323dbb8f6312d7 | |
parent | a09de5830bf6bd180dc2709aaa41556a08f9a0ee (diff) | |
download | org.eclipse.tcf.agent-f4fef5e7407be4c8865fabdd821f4cce11526b87.tar.gz org.eclipse.tcf.agent-f4fef5e7407be4c8865fabdd821f4cce11526b87.tar.xz org.eclipse.tcf.agent-f4fef5e7407be4c8865fabdd821f4cce11526b87.zip |
TCF Agent: more efficient handling of case AT_accessibility
-rw-r--r-- | agent/tcf/services/dwarfcache.c | 8 | ||||
-rw-r--r-- | agent/tcf/services/symbols_elf.c | 34 |
2 files changed, 8 insertions, 34 deletions
diff --git a/agent/tcf/services/dwarfcache.c b/agent/tcf/services/dwarfcache.c index c46b7ada..944b2c60 100644 --- a/agent/tcf/services/dwarfcache.c +++ b/agent/tcf/services/dwarfcache.c @@ -817,6 +817,14 @@ static void read_object_info(U2_T Tag, U2_T Attr, U2_T Form) { dio_ChkFlag(Form); if (dio_gFormData) Info->mFlags |= DOIF_public; break; + case AT_accessibility: + dio_ChkData(Form); + switch (dio_gFormData) { + case DW_ACCESS_private : Info->mFlags |= DOIF_private; break; + case DW_ACCESS_protected: Info->mFlags |= DOIF_protected; break; + case DW_ACCESS_public : Info->mFlags |= DOIF_public; break; + } + break; case AT_location: Info->mFlags |= DOIF_location; if (Form == FORM_DATA4 || Form == FORM_DATA8 || Form == FORM_SEC_OFFSET || Tag == TAG_formal_parameter) { diff --git a/agent/tcf/services/symbols_elf.c b/agent/tcf/services/symbols_elf.c index 8077f9d4..a8d81196 100644 --- a/agent/tcf/services/symbols_elf.c +++ b/agent/tcf/services/symbols_elf.c @@ -4074,40 +4074,6 @@ int get_symbol_flags(const Symbol * sym, SYM_FLAGS * flags) { *flags |= SYM_FLAG_INHERITANCE; break; } - - /* Handle accessibility */ - switch (obj->mTag) { - case TAG_access_declaration: - case TAG_array_type: - case TAG_member: - case TAG_subprogram: - case TAG_class_type: - case TAG_constant: - case TAG_enumeration_type: - case TAG_imported_declaration: - case TAG_inheritance: - case TAG_interface_type: - case TAG_module: - case TAG_namelist: - case TAG_set_type: - case TAG_string_type: - case TAG_structure_type: - case TAG_subrange_type: - case TAG_subroutine_type: - case TAG_template_alias: - case TAG_typedef: - case TAG_union_type: - case TAG_variable: - case TAG_variant: - case TAG_variant_part: - case TAG_with_stmt: - if (get_num_prop(obj, AT_accessibility, &v)) { - if (v == DW_ACCESS_private ) *flags |= SYM_FLAG_PRIVATE; - if (v == DW_ACCESS_protected ) *flags |= SYM_FLAG_PROTECTED; - if (v == DW_ACCESS_public) *flags |= SYM_FLAG_PUBLIC; - } - break; - } } if (obj != NULL && !(*flags & (SYM_FLAG_BIG_ENDIAN|SYM_FLAG_LITTLE_ENDIAN))) { switch (sym->sym_class) { |