Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
7081e675
Commit
7081e675
authored
Feb 18, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runtime: handle non-standard call sequences in arm traceback
R=r CC=golang-dev
https://golang.org/cl/4191048
parent
f07a45f2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
traceback.c
src/pkg/runtime/arm/traceback.c
+14
-1
No files found.
src/pkg/runtime/arm/traceback.c
View file @
7081e675
...
...
@@ -9,6 +9,10 @@ void runtime·deferproc(void);
void
runtime
·
newproc
(
void
);
void
runtime
·
newstack
(
void
);
void
runtime
·
morestack
(
void
);
void
_div
(
void
);
void
_mod
(
void
);
void
_divu
(
void
);
void
_modu
(
void
);
static
int32
gentraceback
(
byte
*
pc0
,
byte
*
sp
,
byte
*
lr0
,
G
*
g
,
int32
skip
,
uintptr
*
pcbuf
,
int32
max
)
...
...
@@ -113,7 +117,7 @@ gentraceback(byte *pc0, byte *sp, byte *lr0, G *g, int32 skip, uintptr *pcbuf, i
// Print during crash.
// main+0xf /home/rsc/go/src/runtime/x.go:23
// main(0x1, 0x2, 0x3)
runtime
·
printf
(
"
%S"
,
f
->
name
);
runtime
·
printf
(
"
[%p] %S"
,
fp
,
f
->
name
);
if
(
pc
>
f
->
entry
)
runtime
·
printf
(
"+%p"
,
(
uintptr
)(
pc
-
f
->
entry
));
tracepc
=
pc
;
// back up to CALL instruction for funcline.
...
...
@@ -150,6 +154,15 @@ gentraceback(byte *pc0, byte *sp, byte *lr0, G *g, int32 skip, uintptr *pcbuf, i
lr
=
0
;
sp
=
fp
;
fp
=
nil
;
// If this was div or divu or mod or modu, the caller had
// an extra 8 bytes on its stack. Adjust sp.
if
(
f
->
entry
==
(
uintptr
)
_div
||
f
->
entry
==
(
uintptr
)
_divu
||
f
->
entry
==
(
uintptr
)
_mod
||
f
->
entry
==
(
uintptr
)
_modu
)
sp
+=
8
;
// If this was deferproc or newproc, the caller had an extra 12.
if
(
f
->
entry
==
(
uintptr
)
runtime
·
deferproc
||
f
->
entry
==
(
uintptr
)
runtime
·
newproc
)
sp
+=
12
;
}
return
n
;
}
...
...
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