@@ -2594,9 +2594,16 @@ static int tag__recode_dwarf_type(struct tag *tag, struct cu *cu)
dtype = dwarf_cu__find_tag_by_ref(cu->priv, &dtag->abstract_origin);
if (dtype == NULL)
dtype = dwarf_cu__find_tag_by_ref(cu->priv, &specification);
- if (dtype != NULL)
- fn->name = tag__function(dtype->tag)->name;
- else {
+ if (dtype != NULL) {
+ struct function *ofn = tag__function(dtype->tag);
+
+ fn->name = ofn->name;
+ /* abstract origin may not have low_pc... */
+ if (fn->has_low_pc && !ofn->has_low_pc) {
+ ofn->has_low_pc = fn->has_low_pc;
+ ofn->low_pc = fn->low_pc;
+ }
+ } else {
fprintf(stderr,
"%s: couldn't find name for "
"function %#llx, abstract_origin=%#llx,"
when recoding, often the subroutine DIE contains low_pc for a function whereas the abstract origin it refers to does not; in such cases copy the low_pc info into the abstract origin also. Signed-off-by: Alan Maguire <alan.maguire@oracle.com> --- dwarf_loader.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)