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

Issue 100060043: code review 100060043: cmd/objdump: actually accept hex address without "0x" p... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years ago by minux1
Modified:
10 years ago
Reviewers:
brainman, iant, bradfitz
CC:
golang-codereviews, bradfitz, iant
Visibility:
Public.

Description

cmd/objdump: actually accept hex address without "0x" prefix. Fixes issue 7936.

Patch Set 1 #

Patch Set 2 : diff -r 2e591e82a8c8 https://code.google.com/p/go #

Patch Set 3 : diff -r 2e591e82a8c8 https://code.google.com/p/go #

Patch Set 4 : diff -r 2e591e82a8c8 https://code.google.com/p/go #

Patch Set 5 : diff -r e473e77e84ff https://code.google.com/p/go #

Patch Set 6 : diff -r 89509169b5a9 https://code.google.com/p/go #

Patch Set 7 : diff -r 89509169b5a9 https://code.google.com/p/go #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -4 lines) Patch
M src/cmd/objdump/main.go View 1 2 3 4 3 chunks +5 lines, -4 lines 0 comments Download

Messages

Total messages: 22
minux1
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go
10 years ago (2014-05-05 02:49:42 UTC) #1
brainman
LGTM
10 years ago (2014-05-05 02:52:34 UTC) #2
brainman
This breaks "go tool pprof --list=..." command: objdump: invalid start PC: strconv.ParseUint: parsing "0x080f6d20": invalid ...
10 years ago (2014-05-05 05:20:21 UTC) #3
minux1
On Mon, May 5, 2014 at 1:20 AM, <alex.brainman@gmail.com> wrote: > This breaks "go tool ...
10 years ago (2014-05-05 05:33:13 UTC) #4
brainman
On 2014/05/05 05:33:13, minux wrote: > > > so the problem is actually in the ...
10 years ago (2014-05-05 05:39:18 UTC) #5
minux1
On Mon, May 5, 2014 at 1:39 AM, <alex.brainman@gmail.com> wrote: > On 2014/05/05 05:33:13, minux ...
10 years ago (2014-05-05 05:40:52 UTC) #6
brainman
On 2014/05/05 05:40:52, minux wrote: > if base is 0, then ParseUint will determine the ...
10 years ago (2014-05-05 05:44:07 UTC) #7
bradfitz
LGTM Verified misc/pprof calls objdump like: my $objdump = $obj_tool_map{"objdump"}; my $cmd = sprintf("$objdump -C ...
10 years ago (2014-05-05 13:33:49 UTC) #8
brainman
On 2014/05/05 13:33:49, bradfitz wrote: > LGTM The CL description is wrong then. > > ...
10 years ago (2014-05-05 23:32:00 UTC) #9
bradfitz
I have no opinion on how it should be. It seems inconsistent and misdocumented now, ...
10 years ago (2014-05-06 17:47:15 UTC) #10
iant
All that really matters here is that the program works with pprof on Macs. Otherwise ...
10 years ago (2014-05-06 18:23:40 UTC) #11
bradfitz
So let's just: strconv.ParseInt(strings.TrimPrefix(v, "0x"), 16, 64) And document it as "optional 0x prefix"? On ...
10 years ago (2014-05-06 18:34:30 UTC) #12
brainman
On 2014/05/06 18:34:30, bradfitz wrote: > So let's just: > strconv.ParseInt(strings.TrimPrefix(v, "0x"), 16, 64) > ...
10 years ago (2014-05-06 23:21:25 UTC) #13
minux1
PTAL.
10 years ago (2014-05-07 21:48:59 UTC) #14
bradfitz
LGTM
10 years ago (2014-05-07 21:57:00 UTC) #15
iant
LGTM
10 years ago (2014-05-07 22:04:27 UTC) #16
brainman
LGTM assuming we will change addr2line to do the same. Alex
10 years ago (2014-05-07 22:30:50 UTC) #17
minux1
*** Submitted as https://code.google.com/p/go/source/detail?r=e3d533e55750 *** cmd/objdump: actually accept hex address without "0x" prefix. Fixes issue ...
10 years ago (2014-05-08 05:26:00 UTC) #18
minux1
On 2014/05/07 22:30:50, brainman wrote: > LGTM assuming we will change addr2line to do the ...
10 years ago (2014-05-08 05:30:13 UTC) #19
brainman
On 2014/05/08 05:30:13, minux wrote: > On 2014/05/07 22:30:50, brainman wrote: > > LGTM assuming ...
10 years ago (2014-05-08 06:07:44 UTC) #20
minux1
On Thu, May 8, 2014 at 2:07 AM, <alex.brainman@gmail.com> wrote: > On 2014/05/08 05:30:13, minux ...
10 years ago (2014-05-08 06:24:54 UTC) #21
brainman
10 years ago (2014-05-08 06:35:22 UTC) #22
Message was sent while issue was closed.
On 2014/05/08 06:24:54, minux wrote:
> >
> ok, but i don't understand the necessity of that change.
> could you explain? thanks.

For consistency. I think both addr2line and objdump should accept same address
formats. As it stands now objdump accepts both abcd and 0xabcd addresses, while
addr2line will reject 0xabcd.

Alex
Sign in to reply to this message.

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