Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(494)

Issue 2151044: code review 2151044: 6l/8l: emit DWARF frame info. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 10 months ago by lvd
Modified:
14 years, 9 months ago
Reviewers:
CC:
rsc, ken2, r, golang-dev
Visibility:
Public.

Description

6l/8l: emit DWARF frame info.

Patch Set 1 #

Patch Set 2 : code review 2151044: 6l/8l: emit DWARF frame info. #

Patch Set 3 : code review 2151044: 6l/8l: emit DWARF frame info. #

Patch Set 4 : code review 2151044: 6l/8l: emit DWARF frame info. #

Patch Set 5 : code review 2151044: 6l/8l: emit DWARF frame info. #

Patch Set 6 : code review 2151044: 6l/8l: emit DWARF frame info. #

Patch Set 7 : code review 2151044: 6l/8l: emit DWARF frame info. #

Patch Set 8 : code review 2151044: 6l/8l: emit DWARF frame info. #

Patch Set 9 : code review 2151044: 6l/8l: emit DWARF frame info. #

Total comments: 24

Patch Set 10 : code review 2151044: 6l/8l: emit DWARF frame info. #

Patch Set 11 : code review 2151044: 6l/8l: emit DWARF frame info. #

Total comments: 1

Patch Set 12 : code review 2151044: 6l/8l: emit DWARF frame info. #

Patch Set 13 : code review 2151044: 6l/8l: emit DWARF frame info. #

Patch Set 14 : code review 2151044: 6l/8l: emit DWARF frame info. #

Patch Set 15 : code review 2151044: 6l/8l: emit DWARF frame info. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+330 lines, -102 lines) Patch
M src/cmd/6l/l.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +9 lines, -2 lines 0 comments Download
M src/cmd/6l/pass.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +10 lines, -2 lines 0 comments Download
M src/cmd/8l/l.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +8 lines, -1 line 0 comments Download
M src/cmd/8l/pass.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +9 lines, -2 lines 0 comments Download
M src/cmd/ld/dwarf.c View 1 2 3 4 5 6 7 8 9 10 11 12 13 22 chunks +258 lines, -95 lines 0 comments Download
M src/cmd/ld/dwarf_defs.h View 1 chunk +36 lines, -0 lines 0 comments Download

Messages

Total messages: 17
lvd
Hello rsc, ken2, r (cc: golang-dev@googlegroups.com), I'd like you to review this change.
14 years, 10 months ago (2010-09-07 21:03:31 UTC) #1
lvd
it appears i broke some tests, pls hold off reviewing this for a bit. On ...
14 years, 10 months ago (2010-09-07 21:35:54 UTC) #2
lvd
Braindump: The frame info works quite reasonable, (although gdb still loses track sometimes deep in ...
14 years, 10 months ago (2010-09-09 10:48:27 UTC) #3
r
If it's Stephen's bug with stack traces from a few days ago, I checked in ...
14 years, 10 months ago (2010-09-09 11:57:15 UTC) #4
rsc
> The frame info works quite reasonable, (although gdb still loses track > sometimes deep ...
14 years, 10 months ago (2010-09-09 14:04:13 UTC) #5
rsc
On Thu, Sep 9, 2010 at 10:04, Russ Cox <rsc@golang.org> wrote: >> The frame info ...
14 years, 10 months ago (2010-09-09 14:05:15 UTC) #6
lvd
no the code currently 1 - gets the frame offset as the ATEXT Prog's to.offset ...
14 years, 10 months ago (2010-09-09 14:19:02 UTC) #7
rsc1
Looks pretty good. I would suggest going the deltasp route (see below) and then we ...
14 years, 10 months ago (2010-09-09 19:57:49 UTC) #8
lvd
On Thu, Sep 9, 2010 at 21:57, <rsc@google.com> wrote: > Looks pretty good. I would ...
14 years, 10 months ago (2010-09-09 20:32:22 UTC) #9
rsc
On Thu, Sep 9, 2010 at 16:32, Luuk van Dijk <lvd@google.com> wrote: > lvd@hpgntai-ubiq89:~/play$ ~/g2/bin/6l ...
14 years, 10 months ago (2010-09-09 20:39:42 UTC) #10
lvd
all comments addressed, where still applicable. lvd@hpgntai-ubiq89:~/play$ cd ../g/test lvd@hpgntai-ubiq89:~/g/test$ 6g defer.go lvd@hpgntai-ubiq89:~/g/test$ 6l defer.6 ...
14 years, 9 months ago (2010-09-15 11:55:24 UTC) #11
rsc1
Almost there. In addition to the comment below, please use tabs for indentation. http://codereview.appspot.com/2151044/diff/36001/src/cmd/6l/l.h File ...
14 years, 9 months ago (2010-09-17 18:50:00 UTC) #12
lvd
On Fri, Sep 17, 2010 at 20:50, <rsc@google.com> wrote: > Almost there. In addition to ...
14 years, 9 months ago (2010-09-17 21:00:25 UTC) #13
rsc
what's the status on this? are you waiting for another review?
14 years, 9 months ago (2010-09-20 15:52:33 UTC) #14
lvd
yes. On Sep 20, 2010 5:52 PM, "Russ Cox" <rsc@golang.org> wrote: > what's the status ...
14 years, 9 months ago (2010-09-20 16:05:33 UTC) #15
rsc1
LGTM
14 years, 9 months ago (2010-09-20 16:24:56 UTC) #16
lvd
14 years, 9 months ago (2010-09-20 16:44:25 UTC) #17
*** Submitted as http://code.google.com/p/go/source/detail?r=2f8af36c4e45 ***

6l/8l: emit DWARF frame info.

R=rsc, ken2, r
CC=golang-dev
http://codereview.appspot.com/2151044

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c
File src/cmd/ld/dwarf.c (right):

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c#newcode29
src/cmd/ld/dwarf.c:29: static void addrput(vlong addr)
On 2010/09/09 19:57:49, rsc1 wrote:
> newline before addrput
> 

Done.

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c#newcode51
src/cmd/ld/dwarf.c:51: if (v) c |= 0x80;
On 2010/09/09 19:57:49, rsc1 wrote:
> newline after )
> next line too
> 

Done.

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c#newcode71
src/cmd/ld/dwarf.c:71: if (dst) *dst++ = c;
On 2010/09/09 19:57:49, rsc1 wrote:
> newline after )
> 

Done.

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c#newcode155
src/cmd/ld/dwarf.c:155: n = strlen((char *) abbrevs[i].attr) / 2;
On 2010/09/09 19:57:49, rsc1 wrote:
> too many spaces
> (char*)abbrevs
> and on next line too
> 

Done.

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c#newcode155
src/cmd/ld/dwarf.c:155: n = strlen((char *) abbrevs[i].attr) / 2;
On 2010/09/09 19:57:49, rsc1 wrote:
> too many spaces
> (char*)abbrevs
> and on next line too
> 

Done.

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c#newcode695
src/cmd/ld/dwarf.c:695: flushunit(q?q->pc:pc, unitstart);
got a better solution
On 2010/09/09 19:57:49, rsc1 wrote:
> spaces.  q ? q->pc : pc
> looks like maybe you're indenting with spaces too.
> please check here and elsewhere
>

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c#newcode784
src/cmd/ld/dwarf.c:784: newattr(dwinfo->child, DW_AT_high_pc, DW_CLS_ADDRESS,
q?q->pc:pc, 0);
better solution
On 2010/09/09 19:57:49, rsc1 wrote:
> spaces around ? :
>

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c#newcode788
src/cmd/ld/dwarf.c:788: flushunit(q?q->pc:pc, unitstart);
better solution
On 2010/09/09 19:57:49, rsc1 wrote:
> spaces
>

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c#newcode820
src/cmd/ld/dwarf.c:820: // First instruction past the prologue (i.e. line != 0)
On 2010/09/09 19:57:49, rsc1 wrote:
> fix or delete parenthetical
> 

Done.

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c#newcode880
src/cmd/ld/dwarf.c:880: // we'll have to walk the instruction chain and describe
what happens
On 2010/09/09 19:57:49, rsc1 wrote:
> pass.c already does this.  The variable is called deltasp.
> Another option is instead of reusing the width field
> in the Prog and thinking about prologue instructions,
> record deltasp during pass.c and use it here.
> 
> That will have the added benefit of handling calls to deferproc
> and newproc correctly (there are two pushes and pops around
> each call), which is important.  We just fixed the stack traces
> for those in the other code last night.

Done.

http://codereview.appspot.com/2151044/diff/24001/src/cmd/ld/dwarf.c#newcode945
src/cmd/ld/dwarf.c:945: addrput((p->pcond ? p->pcond : q)->pc - p->pc); //
address range
better solution
On 2010/09/09 19:57:49, rsc1 wrote:
> too complicated for ? : - use a real variable
>
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b