]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog
DW attribute macro MACRO_AT_func and MACRO_AT_range
authorYao Qi <yao@codesourcery.com>
Fri, 14 Nov 2014 00:53:08 +0000 (08:53 +0800)
committerYao Qi <yao@codesourcery.com>
Fri, 14 Nov 2014 00:55:06 +0000 (08:55 +0800)
commit876c4df94765ce9409e867ff035ab2203c9f4a3b
tree0747946e0ad05dc7b5c7f57f2ec777c3b631219c
parent02ad9cf101803a29d15ea81bb1fdab8a2e82f34f
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.
gdb/testsuite/ChangeLog
gdb/testsuite/lib/dwarf.exp