Skip to content

Commit 0bf443a

Browse files
committed
Now the tied-file (if Mach-O universal binary)
gets reported as such. modified: src/bin/dwarfdump/dwarfdump.c
1 parent e612fb7 commit 0bf443a

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

src/bin/dwarfdump/dwarfdump.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ process_one_file(
960960
}
961961
printf("This is a Mach-O Universal Binary with %"
962962
DW_PR_DUu " %s. This is object %"
963-
DW_PR_DUu "\n",
963+
DW_PR_DUu "\n",
964964
count,name,index);
965965
}
966966
}
@@ -990,6 +990,22 @@ process_one_file(
990990
"dwarf_init_path on tied_file",
991991
dres, onef_err);
992992
}
993+
{
994+
Dwarf_Unsigned index = 0;
995+
Dwarf_Unsigned count = 0;
996+
dres = dwarf_get_universalbinary_count(dbg,&index,&count);
997+
if (dres == DW_DLV_OK) {
998+
const char * name = "object";
999+
if (count != 1) {
1000+
name = "objects";
1001+
}
1002+
printf("The tied-file is a Mach-O Universal Binary "
1003+
"with %"
1004+
DW_PR_DUu " %s. This is object %"
1005+
DW_PR_DUu "\n",
1006+
count,name,index);
1007+
}
1008+
}
9931009
}
9941010

9951011
memset(&printfcallbackdata,0,sizeof(printfcallbackdata));

0 commit comments

Comments
 (0)