diff --git a/tools/trace-malloc/leaksoup.cpp b/tools/trace-malloc/leaksoup.cpp
index c10a76671e2e..4ed1d7c4944d 100644
--- a/tools/trace-malloc/leaksoup.cpp
+++ b/tools/trace-malloc/leaksoup.cpp
@@ -384,10 +384,14 @@ int main(int argc, char **argv)
AllocationNode *target = (AllocationNode*)
PL_HashTableLookup(memory_map, *(void**)(e->data + d));
if (target) {
- printf(" 0x%08X <%s>\n",
+ printf(" 0x%08X <%s>",
target - nodes,
*(unsigned int*)(e->data + d),
target->entry->type);
+ if (target->index != n->index) {
+ printf(", component %d", target->index);
+ }
+ printf("\n");
} else {
printf(" 0x%08X\n",
*(unsigned int*)(e->data + d));
@@ -403,6 +407,9 @@ int main(int argc, char **argv)
const ADLog::Entry *te = t->entry;
printf(" %s (Object %d, ",
t - nodes, te->type, t - nodes);
+ if (t->index != n->index) {
+ printf("component %d, ", t->index);
+ }
if (t == n) {
printf("self)\n");
} else {