Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
7ec5499d
Commit
7ec5499d
authored
Feb 16, 2012
by
David Symonds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug/gosym: more carefully build the test binary.
TBR=r CC=golang-dev
https://golang.org/cl/5676062
parent
aed20a69
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
src/pkg/debug/gosym/pclntab_test.go
src/pkg/debug/gosym/pclntab_test.go
+6
-3
No files found.
src/pkg/debug/gosym/pclntab_test.go
View file @
7ec5499d
...
...
@@ -6,6 +6,7 @@ package gosym
import
(
"debug/elf"
"fmt"
"os"
"os/exec"
"runtime"
...
...
@@ -27,7 +28,9 @@ func dotest() bool {
// the resulting binary looks like it was built from pclinetest.s,
// but we have renamed it to keep it away from the go tool.
pclinetestBinary
=
os
.
TempDir
()
+
"/pclinetest"
cmd
:=
exec
.
Command
(
"sh"
,
"-c"
,
"go tool 6a pclinetest.asm && go tool 6l -E main -o "
+
pclinetestBinary
+
" pclinetest.6"
)
command
:=
fmt
.
Sprintf
(
"go tool 6a -o %s.6 pclinetest.asm && go tool 6l -E main -o %s %s.6"
,
pclinetestBinary
,
pclinetestBinary
,
pclinetestBinary
)
cmd
:=
exec
.
Command
(
"sh"
,
"-c"
,
command
)
cmd
.
Stdout
=
os
.
Stdout
cmd
.
Stderr
=
os
.
Stderr
if
err
:=
cmd
.
Run
();
err
!=
nil
{
...
...
@@ -185,8 +188,8 @@ func TestPCLine(t *testing.T) {
t
.
Logf
(
"off is %d"
,
off
)
if
fn
==
nil
{
t
.
Errorf
(
"failed to get line of PC %#x"
,
pc
)
}
else
if
!
strings
.
HasSuffix
(
file
,
"pclinetest.
s
"
)
{
t
.
Errorf
(
"expected %s (%s) at PC %#x, got %s (%s)"
,
"pclinetest.
s
"
,
sym
.
Name
,
pc
,
file
,
fn
.
Name
)
}
else
if
!
strings
.
HasSuffix
(
file
,
"pclinetest.
asm
"
)
{
t
.
Errorf
(
"expected %s (%s) at PC %#x, got %s (%s)"
,
"pclinetest.
asm
"
,
sym
.
Name
,
pc
,
file
,
fn
.
Name
)
}
else
if
line
!=
wantLine
||
fn
!=
sym
{
t
.
Errorf
(
"expected :%d (%s) at PC %#x, got :%d (%s)"
,
wantLine
,
sym
.
Name
,
pc
,
line
,
fn
.
Name
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment