This is the mail archive of the
mailing list for the elfutils project.
Re: PATCH: dwarf_highpc: Handle DW_AT_high_pc being a constant offset from DW_AT_low_pc.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Fri, 27 Apr 2012 14:44:14 -0700
- Subject: Re: PATCH: dwarf_highpc: Handle DW_AT_high_pc being a constant offset from DW_AT_low_pc.
The functionality change is fine. Needs a NEWS item.
Don't make the same dwarf_attr call twice. If it fails,
I'm not sure you should use dwarf_formaddr for a case that might not work,
since we get an extra __libdw_seterrno call when the user's call succeeds.
I don't know off hand if we have clear precedent about that issue. But
here it's easy enough just to check attr->form for DW_FORM_addr.
If dwarf_formudata fails I don't think we should return with
DWARF_E_NO_CONSTANT, since the user asked for an address, not a constant.
Probably simplest just to add a
in that error case.
Also, please look at the relocate branch for how this can be handled there,
so the branch (including new interfaces) doesn't regress from trunk in
subtle ways. I think the only change needed is dwarf_ranges_relocatable,
but that seems like it could be nontrivial.