diff --git a/src/cmd/6c/list.c b/src/cmd/6c/list.c index ba517ca0a0e..4293203c00d 100644 --- a/src/cmd/6c/list.c +++ b/src/cmd/6c/list.c @@ -78,22 +78,23 @@ Pconv(Fmt *fp) p = va_arg(fp->args, Prog*); switch(p->as) { case ADATA: - sprint(str, " %A %D/%d,%D", - p->as, &p->from, p->from.scale, &p->to); + sprint(str, "(%L) %A %D/%d,%D", + p->lineno, p->as, &p->from, p->from.scale, &p->to); break; case ATEXT: if(p->from.scale) { - sprint(str, " %A %D,%d,%lD", - p->as, &p->from, p->from.scale, &p->to); + sprint(str, "(%L) %A %D,%d,%lD", + p->lineno, p->as, &p->from, p->from.scale, &p->to); break; } - sprint(str, " %A %D,%lD", - p->as, &p->from, &p->to); + sprint(str, "(%L) %A %D,%lD", + p->lineno, p->as, &p->from, &p->to); break; default: - sprint(str, " %A %D,%lD", p->as, &p->from, &p->to); + sprint(str, "(%L) %A %D,%lD", + p->lineno, p->as, &p->from, &p->to); break; } return fmtstrcpy(fp, str); diff --git a/src/cmd/8c/list.c b/src/cmd/8c/list.c index 6caafd258a0..c422905cd95 100644 --- a/src/cmd/8c/list.c +++ b/src/cmd/8c/list.c @@ -76,15 +76,27 @@ Pconv(Fmt *fp) Prog *p; p = va_arg(fp->args, Prog*); - if(p->as == ADATA) - sprint(str, " %A %D/%d,%D", - p->as, &p->from, p->from.scale, &p->to); - else if(p->as == ATEXT) - sprint(str, " %A %D,%d,%D", - p->as, &p->from, p->from.scale, &p->to); - else - sprint(str, " %A %D,%D", - p->as, &p->from, &p->to); + switch(p->as) { + case ADATA: + sprint(str, "(%L) %A %D/%d,%D", + p->lineno, p->as, &p->from, p->from.scale, &p->to); + break; + + case ATEXT: + if(p->from.scale) { + sprint(str, "(%L) %A %D,%d,%lD", + p->lineno, p->as, &p->from, p->from.scale, &p->to); + break; + } + sprint(str, "(%L) %A %D,%lD", + p->lineno, p->as, &p->from, &p->to); + break; + + default: + sprint(str, "(%L) %A %D,%lD", + p->lineno, p->as, &p->from, &p->to); + break; + } return fmtstrcpy(fp, str); }