aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/runtime/testdata/testprogcxx/traceback.go
blob: 0e40ca8ffbb8b1a209ffc99136b4ad366bdbca23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2018 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.

package main

// This program will crash.
// We want the stack trace to include the C++ functions,
// even though we compile with -g0.

/*
#cgo CXXFLAGS: -g0 -O0

extern int cxxFunction1(void);
*/
import "C"

func init() {
	register("CrashTracebackNodebug", CrashTracebackNodebug)
}

func CrashTracebackNodebug() {
	C.cxxFunction1()
}