gdb-best-friend/examples/corefile/1.c

29 lines
229 B
C
Raw Permalink Normal View History

static void foo_segv (void);
static void
bar (void)
{
foo_segv ();
}
static void
foo_segv (void)
{
int *x = 0;
*x = 5;
}
static void
baz (void)
{
bar ();
}
int
main (int argc, char *argv[])
{
baz ();
return 0;
}