mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-26 12:42:49 +01:00
0626397dbf
Some recent changes in the default `gdb` debugging format has broken some gdb functionality, notably the `info macro` command. Specifying the `dwarf-2` format restores this functionality.
56 lines
1.3 KiB
Perl
Executable File
56 lines
1.3 KiB
Perl
Executable File
#!/usr/bin/perl
|
|
|
|
# SPDX-FileCopyrightText: 2021 Pragmatic Software <pragma78@gmail.com>
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
use warnings;
|
|
use strict;
|
|
|
|
package Languages::c99;
|
|
use parent 'Languages::_c_base';
|
|
|
|
sub initialize {
|
|
my ($self, %conf) = @_;
|
|
|
|
$self->{sourcefile} = 'prog.c';
|
|
$self->{execfile} = 'prog';
|
|
$self->{default_options} = '-Wextra -Wall -Wno-unused -pedantic -Wfloat-equal -Wshadow -std=c99 -lm -Wfatal-errors -fsanitize=alignment,undefined';
|
|
$self->{options_paste} = '-fdiagnostics-show-caret';
|
|
$self->{options_nopaste} = '-fno-diagnostics-show-caret';
|
|
$self->{cmdline} = 'gcc -gdwarf-2 -g3 $sourcefile $options -o $execfile';
|
|
|
|
$self->{prelude} = <<'END';
|
|
#define _XOPEN_SOURCE 9001
|
|
#define __USE_XOPEN
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
#include <complex.h>
|
|
#include <math.h>
|
|
#include <tgmath.h>
|
|
#include <limits.h>
|
|
#include <sys/types.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <stddef.h>
|
|
#include <stdarg.h>
|
|
#include <ctype.h>
|
|
#include <inttypes.h>
|
|
#include <float.h>
|
|
#include <errno.h>
|
|
#include <time.h>
|
|
#include <assert.h>
|
|
#include <locale.h>
|
|
#include <wchar.h>
|
|
#include <fenv.h>
|
|
#include <iso646.h>
|
|
#include <setjmp.h>
|
|
#include <signal.h>
|
|
#include <prelude.h>
|
|
|
|
END
|
|
}
|
|
|
|
1;
|