History

Update do_debug handling

Make options '-g -b' and '-b -g' set -g2 in both cases.

herman ten brugge committed 3 years ago

Commit 0f29dbc1 parent bf928f31 file · +2 −3Browse files

Unified · Split

libtcc.c+2−3
@@ -1972,7 +1972,7 @@ dorun: · 1971 unmodified lines
1972 s->rt_num_callers = atoi(optarg); /* zero = default (6) */1972 s->rt_num_callers = atoi(optarg); /* zero = default (6) */
1973 enable_backtrace:1973 enable_backtrace:
1974 s->do_backtrace = 1;1974 s->do_backtrace = 1;
1975 s->do_debug = 1;1975 s->do_debug = s->do_debug ? s->do_debug : 1;
1976 s->dwarf = DWARF_VERSION;1976 s->dwarf = DWARF_VERSION;
1977 break;1977 break;
1978#ifdef CONFIG_TCC_BCHECK1978#ifdef CONFIG_TCC_BCHECK
@@ -1989,8 +1989,7 @@ dorun: · 10 unmodified lines
1989 } else if (isnum(*optarg)) {1989 } else if (isnum(*optarg)) {
1990 x = *optarg - '0';1990 x = *optarg - '0';
1991 /* -g0 = no info, -g1 = lines/functions only, -g2 = full info */1991 /* -g0 = no info, -g1 = lines/functions only, -g2 = full info */
1992 if (x <= 2)1992 s->do_debug = x > 2 ? 2 : x == 0 && s->do_backtrace ? 1 : x;
1993 s->do_debug = x;
1994#ifdef TCC_TARGET_PE1993#ifdef TCC_TARGET_PE
1995 } else if (0 == strcmp(".pdb", optarg)) {1994 } else if (0 == strcmp(".pdb", optarg)) {
1996 s->dwarf = 5, s->do_debug |= 16;1995 s->dwarf = 5, s->do_debug |= 16;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t