[dev.power64] runtime: rename traceback_arm.c to traceback_lr.c

Also make it more portable by not hardcoding pointer sizes.

LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/127780043
This commit is contained in:
Shenghou Ma 2014-08-11 23:32:08 -04:00
parent 40d7a6d582
commit 26c9bbf736
1 changed files with 3 additions and 1 deletions

View File

@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build arm power64 power64le
#include "runtime.h"
#include "arch_GOARCH.h"
#include "malloc.h"
@ -267,7 +269,7 @@ runtime·gentraceback(uintptr pc0, uintptr sp0, uintptr lr0, G *gp, int32 skip,
// sighandler saves the lr on stack before faking a call to sigpanic
if(waspanic) {
x = *(uintptr*)frame.sp;
frame.sp += 4;
frame.sp += sizeof(uintptr);
frame.fn = f = runtime·findfunc(frame.pc);
if(f == nil)
frame.pc = x;