aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2014-11-14 08:53:08 +0800
committerYao Qi <yao@codesourcery.com>2014-11-14 08:55:06 +0800
commit876c4df94765ce9409e867ff035ab2203c9f4a3b (patch)
tree0747946e0ad05dc7b5c7f57f2ec777c3b631219c /gas
parent02ad9cf101803a29d15ea81bb1fdab8a2e82f34f (diff)
downloadgdb-876c4df94765ce9409e867ff035ab2203c9f4a3b.zip
gdb-876c4df94765ce9409e867ff035ab2203c9f4a3b.tar.gz
gdb-876c4df94765ce9409e867ff035ab2203c9f4a3b.tar.bz2
DW attribute macro MACRO_AT_func and MACRO_AT_range
This patch addes DW macro attributes MACRO_AT_func and MACRO_AT_range in dwarf assembler, which emits "DW_AT_low_pc func_start addr" and "DW_AT_high_pc func_end addr". func_start and func_end are computed automatically by proc function_range. These two attributes are pseudo attribute or macro attribute, which means they are not standard dwarf attribute in dwarf spec. Then can be substituted or expanded to standard attributes or macro attributes. See details in the comments to them. Dwarf assembler is extended to handle them. Now the attributes name/low_pc/high_pc can be replaced with MACRO_AT_func like this: subprogram { {name main} {low_pc main_start addr} {high_pc main_end addr} } becomes: subprogram { {MACRO_AT_func { main ${srcdir}/${subdir}/${srcfile} }} } users don't have to worry about the start and end of function main, and they only need to add a label main_label in main. gdb/testsuite: 2014-11-14 Yao Qi <yao@codesourcery.com> * lib/dwarf.exp (function_range): New procedure. (Dwarf::_handle_macro_at_func): New procedure. (Dwarf::_handle_macro_at_range): New procedure. (Dwarf): Handle MACRO_AT_func and MACRO_AT_range.
Diffstat (limited to 'gas')
0 files changed, 0 insertions, 0 deletions