setmaxarg(f->type);
arg = -1;
- if(f->type != T && ((f->sym != S && f->sym->pkg == runtimepkg) || proc == 1 || proc == 2)) {
+ // Most functions have a fixed-size argument block, so traceback uses that during unwind.
+ // Not all, though: there are some variadic functions in package runtime,
+ // and for those we emit call-specific metadata recorded by caller.
+ // Reflect generates functions with variable argsize (see reflect.methodValueCall/makeFuncStub),
+ // so we do this for all indirect calls as well.
+ if(f->type != T && (f->sym == S || (f->sym != S && f->sym->pkg == runtimepkg) || proc == 1 || proc == 2)) {
arg = f->type->argwid;
if(proc == 1 || proc == 2)
arg += 3*widthptr;
setmaxarg(f->type);
arg = -1;
- if(f->type != T && ((f->sym != S && f->sym->pkg == runtimepkg) || proc == 1 || proc == 2)) {
+ // Most functions have a fixed-size argument block, so traceback uses that during unwind.
+ // Not all, though: there are some variadic functions in package runtime,
+ // and for those we emit call-specific metadata recorded by caller.
+ // Reflect generates functions with variable argsize (see reflect.methodValueCall/makeFuncStub),
+ // so we do this for all indirect calls as well.
+ if(f->type != T && (f->sym == S || (f->sym != S && f->sym->pkg == runtimepkg) || proc == 1 || proc == 2)) {
arg = f->type->argwid;
if(proc == 1 || proc == 2)
arg += 2*widthptr;
setmaxarg(f->type);
arg = -1;
- if(f->type != T && ((f->sym != S && f->sym->pkg == runtimepkg) || proc == 1 || proc == 2)) {
+ // Most functions have a fixed-size argument block, so traceback uses that during unwind.
+ // Not all, though: there are some variadic functions in package runtime,
+ // and for those we emit call-specific metadata recorded by caller.
+ // Reflect generates functions with variable argsize (see reflect.methodValueCall/makeFuncStub),
+ // so we do this for all indirect calls as well.
+ if(f->type != T && (f->sym == S || (f->sym != S && f->sym->pkg == runtimepkg) || proc == 1 || proc == 2)) {
arg = f->type->argwid;
if(proc == 1 || proc == 2)
arg += 2*widthptr;
// makeFuncStub is the code half of the function returned by MakeFunc.
// See the comment on the declaration of makeFuncStub in makefunc.go
// for more details.
+// No argsize here, gc generates argsize info at call site.
TEXT ·makeFuncStub(SB),7,$8
MOVL DX, 0(SP)
LEAL argframe+0(FP), CX
// methodValueCall is the code half of the function returned by makeMethodValue.
// See the comment on the declaration of methodValueCall in makefunc.go
// for more details.
+// No argsize here, gc generates argsize info at call site.
TEXT ·methodValueCall(SB),7,$8
MOVL DX, 0(SP)
LEAL argframe+0(FP), CX
// makeFuncStub is the code half of the function returned by MakeFunc.
// See the comment on the declaration of makeFuncStub in makefunc.go
// for more details.
+// No argsize here, gc generates argsize info at call site.
TEXT ·makeFuncStub(SB),7,$16
MOVQ DX, 0(SP)
LEAQ argframe+0(FP), CX
// methodValueCall is the code half of the function returned by makeMethodValue.
// See the comment on the declaration of methodValueCall in makefunc.go
// for more details.
+// No argsize here, gc generates argsize info at call site.
TEXT ·methodValueCall(SB),7,$16
MOVQ DX, 0(SP)
LEAQ argframe+0(FP), CX
// makeFuncStub is jumped to by the code generated by MakeFunc.
// See the comment on the declaration of makeFuncStub in makefunc.go
// for more details.
+// No argsize here, gc generates argsize info at call site.
TEXT ·makeFuncStub(SB),7,$8
MOVW R7, 4(R13)
MOVW $argframe+0(FP), R1
// methodValueCall is the code half of the function returned by makeMethodValue.
// See the comment on the declaration of methodValueCall in makefunc.go
// for more details.
+// No argsize here, gc generates argsize info at call site.
TEXT ·methodValueCall(SB),7,$8
MOVW R7, 4(R13)
MOVW $argframe+0(FP), R1
// Most functions have a fixed-size argument block,
// so we can use metadata about the function f.
// Not all, though: there are some variadic functions
- // in package runtime, and for those we use call-specific
+ // in package runtime and reflect, and for those we use call-specific
// metadata recorded by f's caller.
if(callback != nil || printing) {
frame.argp = (byte*)frame.fp + sizeof(uintptr);
// Most functions have a fixed-size argument block,
// so we can use metadata about the function f.
// Not all, though: there are some variadic functions
- // in package runtime, and for those we use call-specific
+ // in package runtime and reflect, and for those we use call-specific
// metadata recorded by f's caller.
if(callback != nil || printing) {
frame.argp = (byte*)frame.fp;