X7ROOT File Manager
Current Path:
/opt/golang/1.19.4/src/runtime/testdata/testprogcgo
opt
/
golang
/
1.19.4
/
src
/
runtime
/
testdata
/
testprogcgo
/
📁
..
📄
aprof.go
(1.14 KB)
📄
aprof_c.c
(217 B)
📄
bigstack1_windows.c
(379 B)
📄
bigstack_windows.c
(1.2 KB)
📄
bigstack_windows.go
(586 B)
📄
callback.go
(1.4 KB)
📄
catchpanic.go
(993 B)
📄
cgo.go
(1.82 KB)
📄
crash.go
(743 B)
📄
deadlock.go
(509 B)
📄
dll_windows.go
(459 B)
📄
dropm.go
(1.05 KB)
📄
dropm_stub.go
(336 B)
📄
eintr.go
(5.17 KB)
📄
exec.go
(2.1 KB)
📄
gprof.go
(868 B)
📄
gprof_c.c
(700 B)
📄
lockosthread.c
(301 B)
📄
lockosthread.go
(2.59 KB)
📄
main.go
(651 B)
📄
needmdeadlock.go
(1.83 KB)
📄
numgoroutine.go
(1.92 KB)
📄
panic.c
(239 B)
📄
panic.go
(312 B)
📄
pprof.go
(1.67 KB)
📄
pprof_callback.go
(1.82 KB)
📄
raceprof.go
(1.72 KB)
📄
racesig.go
(1.94 KB)
📄
segv.go
(839 B)
📄
sigpanic.go
(484 B)
📄
sigstack.go
(2.09 KB)
📄
sigthrow.go
(312 B)
📄
stack_windows.go
(987 B)
📄
threadpanic.go
(428 B)
📄
threadpanic_unix.c
(435 B)
📄
threadpanic_windows.c
(435 B)
📄
threadpprof.go
(2.54 KB)
📄
threadprof.go
(2.34 KB)
📄
traceback.go
(949 B)
📄
traceback_c.c
(1.21 KB)
📄
tracebackctxt.go
(2.85 KB)
📄
tracebackctxt_c.c
(2.33 KB)
📁
windows
Editing: traceback_c.c
// Copyright 2020 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // The C definitions for traceback.go. That file uses //export so // it can't put function definitions in the "C" import comment. #include <stdint.h> char *p; int crashInGo; extern void h1(void); int tracebackF3(void) { if (crashInGo) h1(); else *p = 0; return 0; } int tracebackF2(void) { return tracebackF3(); } int tracebackF1(void) { return tracebackF2(); } struct cgoTracebackArg { uintptr_t context; uintptr_t sigContext; uintptr_t* buf; uintptr_t max; }; struct cgoSymbolizerArg { uintptr_t pc; const char* file; uintptr_t lineno; const char* func; uintptr_t entry; uintptr_t more; uintptr_t data; }; void cgoTraceback(void* parg) { struct cgoTracebackArg* arg = (struct cgoTracebackArg*)(parg); arg->buf[0] = 1; arg->buf[1] = 2; arg->buf[2] = 3; arg->buf[3] = 0; } void cgoSymbolizer(void* parg) { struct cgoSymbolizerArg* arg = (struct cgoSymbolizerArg*)(parg); if (arg->pc != arg->data + 1) { arg->file = "unexpected data"; } else { arg->file = "cgo symbolizer"; } arg->lineno = arg->data + 1; arg->data++; }
Upload File
Create Folder