Introduce dw2_linkage_name and dw2_linkage_name_attr.
authorKeith Seitz <keiths@redhat.com>
Wed, 6 Sep 2017 19:50:52 +0000 (12:50 -0700)
committerKeith Seitz <keiths@redhat.com>
Wed, 6 Sep 2017 19:50:52 +0000 (12:50 -0700)
commit73b9be8b5301c4ac056e10c38a47414867ee892a
treedc45b20ab518339c24b2258c07753f9cca76f983
parent5c887dd5f699f953e274ba5981fe331eec8e224d
Introduce dw2_linkage_name and dw2_linkage_name_attr.

The DWARF reader is littered with the following idiom to read a linkage name
from the debug info:

  mangled = dwarf2_string_attr (die, DW_AT_linkage_name, cu);
  if (mangled == NULL)
    mangled = dwarf2_string_attr (die, DW_AT_MIPS_linkage_name, cu);

This patch introduces functions to simplify this to:

  mangled = dw2_linkage_name (die, cu);

or

  attr = dw2_linkage_name_attr (die, cu);

gdb/ChangeLog:

* dwarf2read.c (dw2_linkage_name_attr): New function.
(dw2_linkage_name): New function.
(dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
(guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
(anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
gdb/ChangeLog
gdb/dwarf2read.c
This page took 0.025509 seconds and 4 git commands to generate.