Debian Codegraph @

libgo/go/runtime/testdata/testprogcxx/traceback.go

raw
1 // Copyright 2018 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package main
6
7 // This program will crash.
8 // We want the stack trace to include the C++ functions,
9 // even though we compile with -g0.
10
11 /*
12 #cgo CXXFLAGS: -g0 -O0
13
14 extern int cxxFunction1(void);
15 */
16 import "C"
17
18 func init() {
19 register("CrashTracebackNodebug", CrashTracebackNodebug)
20 }
21
22 func CrashTracebackNodebug() {
23 C.cxxFunction1()
24 }