]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Introduce dw2_linkage_name.
authorKeith Seitz <keiths@redhat.com>
Tue, 21 Feb 2017 21:32:50 +0000 (13:32 -0800)
committerKeith Seitz <keiths@redhat.com>
Tue, 21 Feb 2017 21:32:50 +0000 (13:32 -0800)
commita156e8208c80665fe43e24c851258b12d3115e9b
tree0ea488075baab8bdc3b1d8410ecc582ca745226b
parent0ae60b631e1648880d326c4a9986d5d522b6ae8a
Introduce dw2_linkage_name.

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 a new function to simplify this to:

  mangled = dw2_linkage_name (die, cu);

gdb/ChangeLog
gdb/dwarf2read.c