summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-06-11 16:55:38 -0400
committerRuss Cox <rsc@golang.org>2014-06-11 16:55:38 -0400
commitd04c3728c80df739eb0a59566f75ebe265ed8d69 (patch)
tree00658ed5105b7fcc73f7abd570fb76b204e5d52b
parentf73e0269ecaba638ad5c52f71fa611c985ee739a (diff)
downloadgo-d04c3728c80df739eb0a59566f75ebe265ed8d69.tar.gz
[release-branch.go1.3] cmd/ld: fix PC deltas in DWARF line number table
??? CL 104950045 / 87daa424d96a cmd/ld: fix PC deltas in DWARF line number table The putpclcdelta function set the DWARF line number PC to s->value + pcline->pc, which is correct, but the code then set the local variable pc to epc, which can be a different value. This caused the next delta in the DWARF table to be wrong. Fixes issue 8098. LGTM=rsc R=rsc CC=golang-codereviews https://codereview.appspot.com/104950045 ??? LGTM=r R=golang-codereviews, r CC=bradfitz, golang-codereviews, iant https://codereview.appspot.com/107900045
-rw-r--r--src/cmd/ld/dwarf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/ld/dwarf.c b/src/cmd/ld/dwarf.c
index cee591ffa..cc77b45cd 100644
--- a/src/cmd/ld/dwarf.c
+++ b/src/cmd/ld/dwarf.c
@@ -1624,13 +1624,13 @@ writelines(void)
}
putpclcdelta(s->value + pcline.pc - pc, pcline.value - line);
- pc = epc;
+ pc = s->value + pcline.pc;
+ line = pcline.value;
if(pcfile.nextpc < pcline.nextpc)
epc = pcfile.nextpc;
else
epc = pcline.nextpc;
epc += s->value;
- line = pcline.value;
}
da = 0;