This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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,
return immediately.

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
	__libdw_seterrno (DWARF_E_NO_ADDR);
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.


Thanks,
Roland

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]