annotate libgo/runtime/go-assert.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* go-assert.c -- libgo specific assertions
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 Copyright 2010 The Go Authors. All rights reserved.
kono
parents:
diff changeset
4 Use of this source code is governed by a BSD-style
kono
parents:
diff changeset
5 license that can be found in the LICENSE file. */
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 #include <stdio.h>
kono
parents:
diff changeset
8 #include <stdlib.h>
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 #include "runtime.h"
kono
parents:
diff changeset
11 #include "go-assert.h"
kono
parents:
diff changeset
12
kono
parents:
diff changeset
13 void
kono
parents:
diff changeset
14 __go_assert_fail (const char *file, unsigned int lineno)
kono
parents:
diff changeset
15 {
kono
parents:
diff changeset
16 /* FIXME: Eventually we should dump a stack trace here. */
kono
parents:
diff changeset
17 runtime_printf ("%s:%U: libgo assertion failure\n", file, (uint64) lineno);
kono
parents:
diff changeset
18 abort ();
kono
parents:
diff changeset
19 }