3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-22 11:59:43 +01:00

Replace -ggdb with -gdwarf-2 so gdb works better

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.
This commit is contained in:
Pragmatic Software 2022-02-04 13:57:09 -08:00
parent 5f3459ba96
commit 0626397dbf
7 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,7 @@ sub initialize {
$self->{default_options} = '-Wextra -Wall -Wno-unused -pedantic -Wfloat-equal -Wshadow -std=c11 -lm -Wfatal-errors -fsanitize=alignment,undefined -fsanitize-address-use-after-scope -fno-omit-frame-pointer';
$self->{options_paste} = '-fdiagnostics-show-caret';
$self->{options_nopaste} = '-fno-diagnostics-show-caret';
$self->{cmdline} = 'gcc -ggdb -g3 $sourcefile $options -o $execfile';
$self->{cmdline} = 'gcc -gdwarf-2 -g3 $sourcefile $options -o $execfile';
$self->{prelude} = <<'END';
#define _XOPEN_SOURCE 9001

View File

@ -17,7 +17,7 @@ sub initialize {
$self->{default_options} = '-Wextra -Wall -Wno-unused -pedantic -Wfloat-equal -Wshadow -std=c89 -lm -Wfatal-errors -fsanitize=alignment,undefined';
$self->{options_paste} = '-fdiagnostics-show-caret';
$self->{options_nopaste} = '-fno-diagnostics-show-caret';
$self->{cmdline} = 'gcc -ggdb -g3 $sourcefile $options -o $execfile';
$self->{cmdline} = 'gcc -gdwarf-2 -g3 $sourcefile $options -o $execfile';
$self->{prelude} = <<'END';
#define _XOPEN_SOURCE 9001

View File

@ -17,7 +17,7 @@ sub initialize {
$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 -ggdb -g3 $sourcefile $options -o $execfile';
$self->{cmdline} = 'gcc -gdwarf-2 -g3 $sourcefile $options -o $execfile';
$self->{prelude} = <<'END';
#define _XOPEN_SOURCE 9001

View File

@ -14,7 +14,7 @@ sub initialize {
$self->{default_options} = '-Wextra -Wall -Wno-unused -Wno-unused-parameter -pedantic -Wfloat-equal -Wshadow -std=c11 -lm -Wfatal-errors -fsanitize=integer,undefined,alignment -fsanitize-address-use-after-scope -fno-omit-frame-pointer';
$self->{options_paste} = '-fcaret-diagnostics';
$self->{options_nopaste} = '-fno-caret-diagnostics';
$self->{cmdline} = 'clang -ggdb -g3 $sourcefile $options -o $execfile';
$self->{cmdline} = 'clang -gdwarf-2 -g3 $sourcefile $options -o $execfile';
$self->{prelude} = <<'END';
#define _XOPEN_SOURCE 9001

View File

@ -17,7 +17,7 @@ sub initialize {
$self->{default_options} = '-Wextra -Wall -Wno-unused -pedantic -Wfloat-equal -Wshadow -std=c89 -lm -Wfatal-errors -fsanitize=integer,undefined,alignment';
$self->{options_paste} = '-fcaret-diagnostics';
$self->{options_nopaste} = '-fno-caret-diagnostics';
$self->{cmdline} = 'clang -ggdb -g3 $sourcefile $options -o $execfile';
$self->{cmdline} = 'clang -gdwarf-2 -g3 $sourcefile $options -o $execfile';
$self->{prelude} = <<'END';
#define _XOPEN_SOURCE 9001

View File

@ -17,7 +17,7 @@ sub initialize {
$self->{default_options} = '-Wextra -Wall -Wno-unused -pedantic -Wfloat-equal -Wshadow -std=c99 -lm -Wfatal-errors -fsanitize=integer,undefined,alignment';
$self->{options_paste} = '-fcaret-diagnostics';
$self->{options_nopaste} = '-fno-caret-diagnostics';
$self->{cmdline} = 'clang -ggdb -g3 $sourcefile $options -o $execfile';
$self->{cmdline} = 'clang -gdwarf-2 -g3 $sourcefile $options -o $execfile';
$self->{prelude} = <<'END';
#define _XOPEN_SOURCE 9001

View File

@ -18,7 +18,7 @@ sub initialize {
$self->{default_options} = '-std=c++14 -Wextra -Wall -Wno-unused -pedantic -Wfloat-equal -Wshadow -lm -Wfatal-errors -fsanitize=alignment,undefined';
$self->{options_paste} = '-fcaret-diagnostics';
$self->{options_nopaste} = '-fno-caret-diagnostics';
$self->{cmdline} = 'clang++-3.7 -I/usr/include/x86_64-linux-gnu/c++/5/ -ggdb -g3 $sourcefile $options -o $execfile';
$self->{cmdline} = 'clang++-3.7 -I/usr/include/x86_64-linux-gnu/c++/5/ -gdwarf-2 -g3 $sourcefile $options -o $execfile';
$self->{prelude} = <<'END';
#if 0