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
1231382b
Commit
1231382b
authored
Mar 30, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
single argument panic on non-darwin and in comments
R=r CC=golang-dev
https://golang.org/cl/800042
parent
ac58f646
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
12 deletions
+12
-12
src/pkg/debug/proc/proc_linux.go
src/pkg/debug/proc/proc_linux.go
+1
-1
src/pkg/debug/proc/regs_linux_386.go
src/pkg/debug/proc/regs_linux_386.go
+2
-2
src/pkg/debug/proc/regs_linux_amd64.go
src/pkg/debug/proc/regs_linux_amd64.go
+2
-2
src/pkg/syscall/syscall_mingw.go
src/pkg/syscall/syscall_mingw.go
+3
-3
src/pkg/websocket/client.go
src/pkg/websocket/client.go
+3
-3
src/pkg/websocket/server.go
src/pkg/websocket/server.go
+1
-1
No files found.
src/pkg/debug/proc/proc_linux.go
View file @
1231382b
...
@@ -430,7 +430,7 @@ func (t *thread) wait() {
...
@@ -430,7 +430,7 @@ func (t *thread) wait() {
t
.
logTrace
(
"beginning wait"
)
t
.
logTrace
(
"beginning wait"
)
ev
.
Waitmsg
,
ev
.
err
=
os
.
Wait
(
t
.
tid
,
syscall
.
WALL
)
ev
.
Waitmsg
,
ev
.
err
=
os
.
Wait
(
t
.
tid
,
syscall
.
WALL
)
if
ev
.
err
==
nil
&&
ev
.
Pid
!=
t
.
tid
{
if
ev
.
err
==
nil
&&
ev
.
Pid
!=
t
.
tid
{
panic
(
"Wait returned pid "
,
ev
.
Pid
,
" wanted "
,
t
.
tid
)
panic
(
fmt
.
Sprint
(
"Wait returned pid "
,
ev
.
Pid
,
" wanted "
,
t
.
tid
)
)
}
}
if
ev
.
StopSignal
()
==
syscall
.
SIGSTOP
&&
t
.
ignoreNextSigstop
{
if
ev
.
StopSignal
()
==
syscall
.
SIGSTOP
&&
t
.
ignoreNextSigstop
{
// Spurious SIGSTOP. See Thread.Stop().
// Spurious SIGSTOP. See Thread.Stop().
...
...
src/pkg/debug/proc/regs_linux_386.go
View file @
1231382b
...
@@ -92,7 +92,7 @@ func (r *_386Regs) Get(i int) Word {
...
@@ -92,7 +92,7 @@ func (r *_386Regs) Get(i int) Word {
case
15
:
case
15
:
return
Word
(
r
.
Gs
)
return
Word
(
r
.
Gs
)
}
}
panic
(
"invalid register index "
,
strconv
.
Itoa
(
i
))
panic
(
"invalid register index "
+
strconv
.
Itoa
(
i
))
}
}
func
(
r
*
_386Regs
)
Set
(
i
int
,
val
Word
)
os
.
Error
{
func
(
r
*
_386Regs
)
Set
(
i
int
,
val
Word
)
os
.
Error
{
...
@@ -130,7 +130,7 @@ func (r *_386Regs) Set(i int, val Word) os.Error {
...
@@ -130,7 +130,7 @@ func (r *_386Regs) Set(i int, val Word) os.Error {
case
15
:
case
15
:
r
.
Gs
=
uint16
(
val
)
r
.
Gs
=
uint16
(
val
)
default
:
default
:
panic
(
"invalid register index "
,
strconv
.
Itoa
(
i
))
panic
(
"invalid register index "
+
strconv
.
Itoa
(
i
))
}
}
return
r
.
setter
(
&
r
.
PtraceRegs
)
return
r
.
setter
(
&
r
.
PtraceRegs
)
}
}
...
...
src/pkg/debug/proc/regs_linux_amd64.go
View file @
1231382b
...
@@ -124,7 +124,7 @@ func (r *amd64Regs) Get(i int) Word {
...
@@ -124,7 +124,7 @@ func (r *amd64Regs) Get(i int) Word {
case
23
:
case
23
:
return
Word
(
r
.
Gs
)
return
Word
(
r
.
Gs
)
}
}
panic
(
"invalid register index "
,
strconv
.
Itoa
(
i
))
panic
(
"invalid register index "
+
strconv
.
Itoa
(
i
))
}
}
func
(
r
*
amd64Regs
)
Set
(
i
int
,
val
Word
)
os
.
Error
{
func
(
r
*
amd64Regs
)
Set
(
i
int
,
val
Word
)
os
.
Error
{
...
@@ -178,7 +178,7 @@ func (r *amd64Regs) Set(i int, val Word) os.Error {
...
@@ -178,7 +178,7 @@ func (r *amd64Regs) Set(i int, val Word) os.Error {
case
23
:
case
23
:
r
.
Gs
=
uint64
(
val
)
r
.
Gs
=
uint64
(
val
)
default
:
default
:
panic
(
"invalid register index "
,
strconv
.
Itoa
(
i
))
panic
(
"invalid register index "
+
strconv
.
Itoa
(
i
))
}
}
return
r
.
setter
(
&
r
.
PtraceRegs
)
return
r
.
setter
(
&
r
.
PtraceRegs
)
}
}
...
...
src/pkg/syscall/syscall_mingw.go
View file @
1231382b
...
@@ -24,7 +24,7 @@ import (
...
@@ -24,7 +24,7 @@ import (
)
)
func abort(funcname string, err int) {
func abort(funcname string, err int) {
panic(funcname
+" failed: (", err, ") ", syscall.Errstr(err), "\n"
)
panic(funcname
+ " failed: " + syscall.Errstr(err)
)
}
}
func print_version(v uint32) {
func print_version(v uint32) {
...
@@ -77,7 +77,7 @@ func getprocaddress(handle uint32, procname uintptr) (proc uintptr)
...
@@ -77,7 +77,7 @@ func getprocaddress(handle uint32, procname uintptr) (proc uintptr)
func
loadDll
(
fname
string
)
uint32
{
func
loadDll
(
fname
string
)
uint32
{
m
:=
loadlibraryex
(
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
fname
))))
m
:=
loadlibraryex
(
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
fname
))))
if
m
==
0
{
if
m
==
0
{
panic
(
"syscall: could not LoadLibraryEx "
,
fname
)
panic
(
"syscall: could not LoadLibraryEx "
+
fname
)
}
}
return
m
return
m
}
}
...
@@ -85,7 +85,7 @@ func loadDll(fname string) uint32 {
...
@@ -85,7 +85,7 @@ func loadDll(fname string) uint32 {
func
getSysProcAddr
(
m
uint32
,
pname
string
)
uintptr
{
func
getSysProcAddr
(
m
uint32
,
pname
string
)
uintptr
{
p
:=
getprocaddress
(
m
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
pname
))))
p
:=
getprocaddress
(
m
,
uintptr
(
unsafe
.
Pointer
(
StringBytePtr
(
pname
))))
if
p
==
0
{
if
p
==
0
{
panic
(
"syscall: could not GetProcAddress for "
,
pname
)
panic
(
"syscall: could not GetProcAddress for "
+
pname
)
}
}
return
p
return
p
}
}
...
...
src/pkg/websocket/client.go
View file @
1231382b
...
@@ -74,14 +74,14 @@ func newClient(resourceName, host, origin, location, protocol string, rwc io.Rea
...
@@ -74,14 +74,14 @@ func newClient(resourceName, host, origin, location, protocol string, rwc io.Rea
func main() {
func main() {
ws, err := websocket.Dial("ws://localhost/ws", "", "http://localhost/");
ws, err := websocket.Dial("ws://localhost/ws", "", "http://localhost/");
if err != nil {
if err != nil {
panic("Dial: "
,
err.String())
panic("Dial: "
+
err.String())
}
}
if _, err := ws.Write([]byte("hello, world!\n")); err != nil {
if _, err := ws.Write([]byte("hello, world!\n")); err != nil {
panic("Write: "
,
err.String())
panic("Write: "
+
err.String())
}
}
var msg = make([]byte, 512);
var msg = make([]byte, 512);
if n, err := ws.Read(msg); err != nil {
if n, err := ws.Read(msg); err != nil {
panic("Read: "
,
err.String())
panic("Read: "
+
err.String())
}
}
// use msg[0:n]
// use msg[0:n]
}
}
...
...
src/pkg/websocket/server.go
View file @
1231382b
...
@@ -34,7 +34,7 @@ import (
...
@@ -34,7 +34,7 @@ import (
http.Handle("/echo", websocket.Handler(EchoServer));
http.Handle("/echo", websocket.Handler(EchoServer));
err := http.ListenAndServe(":12345", nil);
err := http.ListenAndServe(":12345", nil);
if err != nil {
if err != nil {
panic("ListenAndServe: "
,
err.String())
panic("ListenAndServe: "
+
err.String())
}
}
}
}
*/
*/
...
...
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