| @@ -187,7 +187,7 @@ static const struct { · 186 unmodified lines |
| 187 | 187 | { VT_BYTE | VT_UNSIGNED, 1, DW_ATE_unsigned_char, "unsigned char:t25=r25;0;255;" }, |
| 188 | 188 | /* boolean type */ |
| 189 | 189 | { VT_BOOL, 1, DW_ATE_unsigned_char, "bool:t26=r26;0;255;" }, |
| 190 | | − { VT_VOID, 1, DW_ATE_void, "void:t27=27" }, |
| 190 | + { VT_VOID, 1, DW_ATE_unsigned_char, "void:t27=27" }, |
| 191 | 191 | }; |
| 192 | 192 | |
| 193 | 193 | #define N_DEFAULT_DEBUG (sizeof (default_debug) / sizeof (default_debug[0])) |
| @@ -199,7 +199,14 @@ static struct debug_hash { · 5 unmodified lines |
| 199 | 199 | Sym *type; |
| 200 | 200 | } *debug_hash; |
| 201 | 201 | |
| 202 | +static struct debug_anon_hash { |
| 203 | + Sym *type; |
| 204 | + int n_debug_type; |
| 205 | + int *debug_type; |
| 206 | +} *debug_anon_hash; |
| 207 | + |
| 202 | 208 | static int n_debug_hash; |
| 209 | +static int n_debug_anon_hash; |
| 203 | 210 | |
| 204 | 211 | static struct debug_info { |
| 205 | 212 | int start; |
| @@ -251,7 +258,12 @@ static struct debug_info { · 45 unmodified lines |
| 251 | 258 | #define DWARF_ABBREV_SUBPROGRAM_EXTERNAL 17 |
| 252 | 259 | #define DWARF_ABBREV_SUBPROGRAM_STATIC 18 |
| 253 | 260 | #define DWARF_ABBREV_LEXICAL_BLOCK 19 |
| 261 | +#define DWARF_ABBREV_SUBROUTINE_TYPE 20 |
| 262 | +#define DWARF_ABBREV_FORMAL_PARAMETER2 21 |
| 254 | 263 | |
| 264 | +/* all entries should have been generated with dwarf_uleb128 except |
| 265 | + has_children. All values are currently below 128 so this currently |
| 266 | + works. */ |
| 255 | 267 | static const unsigned char dwarf_abbrev_init[] = { |
| 256 | 268 | DWARF_ABBREV_COMPILE_UNIT, DW_TAG_compile_unit, 1, |
| 257 | 269 | DW_AT_producer, DW_FORM_strp, |
| @@ -298,7 +310,6 @@ static const unsigned char dwarf_abbrev_init[] = { · 40 unmodified lines |
| 298 | 310 | 0, 0, |
| 299 | 311 | DWARF_ABBREV_POINTER, DW_TAG_pointer_type, 0, |
| 300 | 312 | DW_AT_byte_size, DW_FORM_data1, |
| 301 | | − DW_AT_byte_size, DW_FORM_implicit_const, 8, |
| 302 | 313 | DW_AT_type, DW_FORM_ref4, |
| 303 | 314 | 0, 0, |
| 304 | 315 | DWARF_ABBREV_ARRAY_TYPE, DW_TAG_array_type, 1, |
| @@ -394,6 +405,13 @@ static const unsigned char dwarf_abbrev_init[] = { · 89 unmodified lines |
| 394 | 405 | DW_AT_high_pc, DW_FORM_data8, |
| 395 | 406 | #endif |
| 396 | 407 | 0, 0, |
| 408 | + DWARF_ABBREV_SUBROUTINE_TYPE, DW_TAG_subroutine_type, 1, |
| 409 | + DW_AT_type, DW_FORM_ref4, |
| 410 | + DW_AT_sibling, DW_FORM_ref4, |
| 411 | + 0, 0, |
| 412 | + DWARF_ABBREV_FORMAL_PARAMETER2, DW_TAG_formal_parameter, 0, |
| 413 | + DW_AT_type, DW_FORM_ref4, |
| 414 | + 0, 0, |
| 397 | 415 | 0 |
| 398 | 416 | }; |
| 399 | 417 | |
| @@ -945,7 +963,9 @@ ST_FUNC void tcc_debug_start(TCCState *s1) · 545 unmodified lines |
| 945 | 963 | func_ind = -1; |
| 946 | 964 | debug_next_type = N_DEFAULT_DEBUG; |
| 947 | 965 | debug_hash = NULL; |
| 966 | + debug_anon_hash = NULL; |
| 948 | 967 | n_debug_hash = 0; |
| 968 | + n_debug_anon_hash = 0; |
| 949 | 969 | /* we're currently 'including' the <command line> */ |
| 950 | 970 | tcc_debug_bincl(s1); |
| 951 | 971 | } |
| @@ -963,12 +983,35 @@ ST_FUNC void tcc_debug_end(TCCState *s1) · 11 unmodified lines |
| 963 | 983 | if (!s1->do_debug) |
| 964 | 984 | return; |
| 965 | 985 | if (s1->dwarf) { |
| 966 | | − int i; |
| 986 | + int i, j; |
| 967 | 987 | int start_aranges; |
| 968 | 988 | unsigned char *ptr; |
| 969 | 989 | int text_size = text_section->data_offset; |
| 970 | 990 | |
| 971 | 991 | /* dwarf_info */ |
| 992 | + for (i = 0; i < n_debug_anon_hash; i++) { |
| 993 | + Sym *t = debug_anon_hash[i].type; |
| 994 | + int pos = dwarf_info_section->data_offset; |
| 995 | + |
| 996 | + dwarf_data1(dwarf_info_section, |
| 997 | + IS_UNION (t->type.t) ? DWARF_ABBREV_UNION_TYPE |
| 998 | + : DWARF_ABBREV_STRUCTURE_TYPE); |
| 999 | + dwarf_strp(dwarf_info_section, |
| 1000 | + (t->v & ~SYM_STRUCT) >= SYM_FIRST_ANOM |
| 1001 | + ? "" : get_tok_str(t->v & ~SYM_STRUCT, NULL)); |
| 1002 | + dwarf_uleb128(dwarf_info_section, 0); |
| 1003 | + dwarf_uleb128(dwarf_info_section, dwarf_line.cur_file); |
| 1004 | + dwarf_uleb128(dwarf_info_section, file->line_num); |
| 1005 | + j = dwarf_info_section->data_offset + 5 - dwarf_info.start; |
| 1006 | + dwarf_data4(dwarf_info_section, j); |
| 1007 | + dwarf_data1(dwarf_info_section, 0); |
| 1008 | + for (j = 0; j < debug_anon_hash[i].n_debug_type; j++) |
| 1009 | + write32le(dwarf_info_section->data + |
| 1010 | + debug_anon_hash[i].debug_type[j], |
| 1011 | + pos - dwarf_info.start); |
| 1012 | + tcc_free (debug_anon_hash[i].debug_type); |
| 1013 | + } |
| 1014 | + tcc_free (debug_anon_hash); |
| 972 | 1015 | dwarf_data1(dwarf_info_section, 0); |
| 973 | 1016 | ptr = dwarf_info_section->data + dwarf_info.start; |
| 974 | 1017 | write32le(ptr, dwarf_info_section->data_offset - dwarf_info.start - 4); |
| @@ -1276,16 +1319,69 @@ static void tcc_debug_stabn(TCCState *s1, int type, int value) · 301 unmodified lines |
| 1276 | 1319 | } |
| 1277 | 1320 | } |
| 1278 | 1321 | |
| 1279 | | −static int tcc_debug_find(Sym *t) |
| 1322 | +static int tcc_get_dwarf_info(TCCState *s1, Sym *s); |
| 1323 | + |
| 1324 | +static int tcc_debug_find(Sym *t, int dwarf) |
| 1280 | 1325 | { |
| 1281 | 1326 | int i; |
| 1282 | 1327 | |
| 1328 | + if (!debug_info && dwarf && |
| 1329 | + (t->type.t & VT_BTYPE) == VT_STRUCT && t->c == -1) { |
| 1330 | + for (i = 0; i < n_debug_anon_hash; i++) |
| 1331 | + if (t == debug_anon_hash[i].type) |
| 1332 | + return 0; |
| 1333 | + debug_anon_hash = (struct debug_anon_hash *) |
| 1334 | + tcc_realloc (debug_anon_hash, |
| 1335 | + (n_debug_anon_hash + 1) * sizeof(*debug_anon_hash)); |
| 1336 | + debug_anon_hash[n_debug_anon_hash].n_debug_type = 0; |
| 1337 | + debug_anon_hash[n_debug_anon_hash].debug_type = NULL; |
| 1338 | + debug_anon_hash[n_debug_anon_hash++].type = t; |
| 1339 | + return 0; |
| 1340 | + } |
| 1283 | 1341 | for (i = 0; i < n_debug_hash; i++) |
| 1284 | 1342 | if (t == debug_hash[i].type) |
| 1285 | 1343 | return debug_hash[i].debug_type; |
| 1286 | 1344 | return -1; |
| 1287 | 1345 | } |
| 1288 | 1346 | |
| 1347 | +static void tcc_debug_check_anon(Sym *t, int debug_type) |
| 1348 | +{ |
| 1349 | + int i; |
| 1350 | + |
| 1351 | + if (!debug_info && (t->type.t & VT_BTYPE) == VT_STRUCT && t->type.ref->c == -1) |
| 1352 | + for (i = 0; i < n_debug_anon_hash; i++) |
| 1353 | + if (t->type.ref == debug_anon_hash[i].type) { |
| 1354 | + debug_anon_hash[i].debug_type = |
| 1355 | + tcc_realloc(debug_anon_hash[i].debug_type, |
| 1356 | + (debug_anon_hash[i].n_debug_type + 1) * sizeof(int)); |
| 1357 | + debug_anon_hash[i].debug_type[debug_anon_hash[i].n_debug_type++] = |
| 1358 | + debug_type; |
| 1359 | + } |
| 1360 | +} |
| 1361 | + |
| 1362 | +static void tcc_debug_fix_anon(CType *t) |
| 1363 | +{ |
| 1364 | + int i, j, debug_type; |
| 1365 | + TCCState *s1 = tcc_state; |
| 1366 | + |
| 1367 | + if (!s1->do_debug || !s1->dwarf || debug_info) |
| 1368 | + return; |
| 1369 | + if ((t->t & VT_BTYPE) == VT_STRUCT && t->ref->c != -1) |
| 1370 | + for (i = 0; i < n_debug_anon_hash; i++) |
| 1371 | + if (t->ref == debug_anon_hash[i].type) { |
| 1372 | + Sym sym = { .type = *t }; |
| 1373 | + |
| 1374 | + debug_type = tcc_get_dwarf_info(s1, &sym); |
| 1375 | + for (j = 0; j < debug_anon_hash[i].n_debug_type; j++) |
| 1376 | + write32le(dwarf_info_section->data + |
| 1377 | + debug_anon_hash[i].debug_type[j], debug_type); |
| 1378 | + tcc_free(debug_anon_hash[i].debug_type); |
| 1379 | + n_debug_anon_hash--; |
| 1380 | + for (; i < n_debug_anon_hash; i++) |
| 1381 | + debug_anon_hash[i] = debug_anon_hash[i + 1]; |
| 1382 | + } |
| 1383 | +} |
| 1384 | + |
| 1289 | 1385 | static int tcc_debug_add(Sym *t, int dwarf) |
| 1290 | 1386 | { |
| 1291 | 1387 | int offset = dwarf ? dwarf_info_section->data_offset : ++debug_next_type; |
| @@ -1331,7 +1427,7 @@ static void tcc_get_debug_info(TCCState *s1, Sym *s, CString *result) · 39 unmodified lines |
| 1331 | 1427 | Sym *e = t; |
| 1332 | 1428 | |
| 1333 | 1429 | t = t->type.ref; |
| 1334 | | − debug_type = tcc_debug_find(t); |
| 1430 | + debug_type = tcc_debug_find(t, 0); |
| 1335 | 1431 | if (debug_type == -1) { |
| 1336 | 1432 | debug_type = tcc_debug_add(t, 0); |
| 1337 | 1433 | cstr_new (&str); |
| @@ -1369,7 +1465,7 @@ static void tcc_get_debug_info(TCCState *s1, Sym *s, CString *result) · 31 unmodified lines |
| 1369 | 1465 | else if (IS_ENUM(type)) { |
| 1370 | 1466 | Sym *e = t = t->type.ref; |
| 1371 | 1467 | |
| 1372 | | − debug_type = tcc_debug_find(t); |
| 1468 | + debug_type = tcc_debug_find(t, 0); |
| 1373 | 1469 | if (debug_type == -1) { |
| 1374 | 1470 | debug_type = tcc_debug_add(t, 0); |
| 1375 | 1471 | cstr_new (&str); |
| @@ -1430,6 +1526,8 @@ static int tcc_get_dwarf_info(TCCState *s1, Sym *s) · 54 unmodified lines |
| 1430 | 1526 | int debug_type = -1; |
| 1431 | 1527 | Sym *e, *t = s; |
| 1432 | 1528 | int i; |
| 1529 | + int last_pos = -1; |
| 1530 | + int retval; |
| 1433 | 1531 | |
| 1434 | 1532 | for (;;) { |
| 1435 | 1533 | type = t->type.t & ~(VT_STORAGE | VT_CONSTANT | VT_VOLATILE); |
| @@ -1442,7 +1540,7 @@ static int tcc_get_dwarf_info(TCCState *s1, Sym *s) · 6 unmodified lines |
| 1442 | 1540 | } |
| 1443 | 1541 | if ((type & VT_BTYPE) == VT_STRUCT) { |
| 1444 | 1542 | t = t->type.ref; |
| 1445 | | − debug_type = tcc_debug_find(t); |
| 1543 | + debug_type = tcc_debug_find(t, 1); |
| 1446 | 1544 | if (debug_type == -1) { |
| 1447 | 1545 | int pos_sib, i, *pos_type; |
| 1448 | 1546 | |
| @@ -1504,6 +1602,7 @@ static int tcc_get_dwarf_info(TCCState *s1, Sym *s) · 55 unmodified lines |
| 1504 | 1602 | while (e->next) { |
| 1505 | 1603 | e = e->next; |
| 1506 | 1604 | type = tcc_get_dwarf_info(s1, e); |
| 1605 | + tcc_debug_check_anon(e, pos_type[i]); |
| 1507 | 1606 | write32le(dwarf_info_section->data + pos_type[i++], |
| 1508 | 1607 | type - dwarf_info.start); |
| 1509 | 1608 | } |
| @@ -1514,7 +1613,7 @@ static int tcc_get_dwarf_info(TCCState *s1, Sym *s) · 4 unmodified lines |
| 1514 | 1613 | } |
| 1515 | 1614 | else if (IS_ENUM(type)) { |
| 1516 | 1615 | t = t->type.ref; |
| 1517 | | − debug_type = tcc_debug_find(t); |
| 1616 | + debug_type = tcc_debug_find(t, 1); |
| 1518 | 1617 | if (debug_type == -1) { |
| 1519 | 1618 | int pos_sib, pos_type; |
| 1520 | 1619 | CType ct = { VT_INT | (type & VT_UNSIGNED) , NULL }; |
| @@ -1569,8 +1668,9 @@ static int tcc_get_dwarf_info(TCCState *s1, Sym *s) · 48 unmodified lines |
| 1569 | 1668 | *strchr(name, ':') = 0; |
| 1570 | 1669 | dwarf_strp(dwarf_info_section, name); |
| 1571 | 1670 | dwarf_info.base_type_used[i - 1] = debug_type; |
| 1572 | | − } |
| 1671 | + } |
| 1573 | 1672 | } |
| 1673 | + retval = debug_type; |
| 1574 | 1674 | t = s; |
| 1575 | 1675 | for (;;) { |
| 1576 | 1676 | type = t->type.t & ~(VT_STORAGE | VT_CONSTANT | VT_VOLATILE); |
| @@ -1578,10 +1678,18 @@ static int tcc_get_dwarf_info(TCCState *s1, Sym *s) · 1 unmodified line |
| 1578 | 1678 | type &= ~VT_DEFSIGN; |
| 1579 | 1679 | if (type == VT_PTR) { |
| 1580 | 1680 | i = dwarf_info_section->data_offset; |
| 1681 | + if (retval == debug_type) |
| 1682 | + retval = i; |
| 1581 | 1683 | dwarf_data1(dwarf_info_section, DWARF_ABBREV_POINTER); |
| 1582 | 1684 | dwarf_data1(dwarf_info_section, PTR_SIZE); |
| 1583 | | − dwarf_data4(dwarf_info_section, debug_type - dwarf_info.start); |
| 1584 | | − debug_type = i; |
| 1685 | + if (last_pos != -1) { |
| 1686 | + tcc_debug_check_anon(e, last_pos); |
| 1687 | + write32le(dwarf_info_section->data + last_pos, |
| 1688 | + i - dwarf_info.start); |
| 1689 | + } |
| 1690 | + last_pos = dwarf_info_section->data_offset; |
| 1691 | + e = t->type.ref; |
| 1692 | + dwarf_data4(dwarf_info_section, 0); |
| 1585 | 1693 | } |
| 1586 | 1694 | else if (type == (VT_PTR | VT_ARRAY)) { |
| 1587 | 1695 | int sib_pos, sub_type; |
| @@ -1590,8 +1698,17 @@ static int tcc_get_dwarf_info(TCCState *s1, Sym *s) · 2 unmodified lines |
| 1590 | 1698 | |
| 1591 | 1699 | sub_type = tcc_get_dwarf_info(s1, &sym); |
| 1592 | 1700 | i = dwarf_info_section->data_offset; |
| 1701 | + if (retval == debug_type) |
| 1702 | + retval = i; |
| 1593 | 1703 | dwarf_data1(dwarf_info_section, DWARF_ABBREV_ARRAY_TYPE); |
| 1594 | | − dwarf_data4(dwarf_info_section, debug_type - dwarf_info.start); |
| 1704 | + if (last_pos != -1) { |
| 1705 | + tcc_debug_check_anon(e, last_pos); |
| 1706 | + write32le(dwarf_info_section->data + last_pos, |
| 1707 | + i - dwarf_info.start); |
| 1708 | + } |
| 1709 | + last_pos = dwarf_info_section->data_offset; |
| 1710 | + e = t->type.ref; |
| 1711 | + dwarf_data4(dwarf_info_section, 0); |
| 1595 | 1712 | sib_pos = dwarf_info_section->data_offset; |
| 1596 | 1713 | dwarf_data4(dwarf_info_section, 0); |
| 1597 | 1714 | for (;;) { |
| @@ -1607,16 +1724,66 @@ static int tcc_get_dwarf_info(TCCState *s1, Sym *s) · 9 unmodified lines |
| 1607 | 1724 | dwarf_data1(dwarf_info_section, 0); |
| 1608 | 1725 | write32le(dwarf_info_section->data + sib_pos, |
| 1609 | 1726 | dwarf_info_section->data_offset - dwarf_info.start); |
| 1610 | | − debug_type = i; |
| 1611 | 1727 | } |
| 1612 | 1728 | else if (type == VT_FUNC) { |
| 1613 | | − return tcc_get_dwarf_info (s1, t->type.ref); |
| 1729 | + int sib_pos, *pos_type; |
| 1730 | + Sym *f; |
| 1731 | + |
| 1732 | + i = dwarf_info_section->data_offset; |
| 1733 | + debug_type = tcc_get_dwarf_info(s1, t->type.ref); |
| 1734 | + if (retval == debug_type) |
| 1735 | + retval = i; |
| 1736 | + dwarf_data1(dwarf_info_section, DWARF_ABBREV_SUBROUTINE_TYPE); |
| 1737 | + if (last_pos != -1) { |
| 1738 | + tcc_debug_check_anon(e, last_pos); |
| 1739 | + write32le(dwarf_info_section->data + last_pos, |
| 1740 | + i - dwarf_info.start); |
| 1741 | + } |
| 1742 | + last_pos = dwarf_info_section->data_offset; |
| 1743 | + e = t->type.ref; |
| 1744 | + dwarf_data4(dwarf_info_section, 0); |
| 1745 | + sib_pos = dwarf_info_section->data_offset; |
| 1746 | + dwarf_data4(dwarf_info_section, 0); |
| 1747 | + f = t->type.ref; |
| 1748 | + i = 0; |
| 1749 | + while (f->next) { |
| 1750 | + f = f->next; |
| 1751 | + i++; |
| 1752 | + } |
| 1753 | + pos_type = (int *) tcc_malloc(i * sizeof(int)); |
| 1754 | + f = t->type.ref; |
| 1755 | + i = 0; |
| 1756 | + while (f->next) { |
| 1757 | + f = f->next; |
| 1758 | + dwarf_data1(dwarf_info_section, DWARF_ABBREV_FORMAL_PARAMETER2); |
| 1759 | + pos_type[i++] = dwarf_info_section->data_offset; |
| 1760 | + dwarf_data4(dwarf_info_section, 0); |
| 1761 | + } |
| 1762 | + dwarf_data1(dwarf_info_section, 0); |
| 1763 | + write32le(dwarf_info_section->data + sib_pos, |
| 1764 | + dwarf_info_section->data_offset - dwarf_info.start); |
| 1765 | + f = t->type.ref; |
| 1766 | + i = 0; |
| 1767 | + while (f->next) { |
| 1768 | + f = f->next; |
| 1769 | + type = tcc_get_dwarf_info(s1, f); |
| 1770 | + tcc_debug_check_anon(f, pos_type[i]); |
| 1771 | + write32le(dwarf_info_section->data + pos_type[i++], |
| 1772 | + type - dwarf_info.start); |
| 1773 | + } |
| 1774 | + tcc_free(pos_type); |
| 1614 | 1775 | } |
| 1615 | | − else |
| 1776 | + else { |
| 1777 | + if (last_pos != -1) { |
| 1778 | + tcc_debug_check_anon(e, last_pos); |
| 1779 | + write32le(dwarf_info_section->data + last_pos, |
| 1780 | + debug_type - dwarf_info.start); |
| 1781 | + } |
| 1616 | 1782 | break; |
| 1783 | + } |
| 1617 | 1784 | t = t->type.ref; |
| 1618 | 1785 | } |
| 1619 | | − return debug_type; |
| 1786 | + return retval; |
| 1620 | 1787 | } |
| 1621 | 1788 | |
| 1622 | 1789 | static void tcc_debug_finish (TCCState *s1, struct debug_info *cur) |
| @@ -1787,6 +1954,7 @@ static void tcc_debug_funcend(TCCState *s1, int size) · 164 unmodified lines |
| 1787 | 1954 | dwarf_strp(dwarf_info_section, funcname); |
| 1788 | 1955 | dwarf_uleb128(dwarf_info_section, dwarf_line.cur_file); |
| 1789 | 1956 | dwarf_uleb128(dwarf_info_section, dwarf_info.line); |
| 1957 | + tcc_debug_check_anon(sym->type.ref, dwarf_info_section->data_offset); |
| 1790 | 1958 | dwarf_data4(dwarf_info_section, debug_info - dwarf_info.start); |
| 1791 | 1959 | dwarf_reloc(dwarf_info_section, section_sym, R_DATA_PTR); |
| 1792 | 1960 | #if PTR_SIZE == 4 |
| @@ -1843,6 +2011,7 @@ static void tcc_debug_extern_sym(TCCState *s1, Sym *sym, int sh_num, int sym_bin · 50 unmodified lines |
| 1843 | 2011 | dwarf_strp(dwarf_info_section, get_tok_str(sym->v, NULL)); |
| 1844 | 2012 | dwarf_uleb128(dwarf_info_section, dwarf_line.cur_file); |
| 1845 | 2013 | dwarf_uleb128(dwarf_info_section, file->line_num); |
| 2014 | + tcc_debug_check_anon(sym, dwarf_info_section->data_offset); |
| 1846 | 2015 | dwarf_data4(dwarf_info_section, debug_type - dwarf_info.start); |
| 1847 | 2016 | if (sym_bind == STB_GLOBAL) |
| 1848 | 2017 | dwarf_data1(dwarf_info_section, 1); |
| @@ -1888,6 +2057,7 @@ static void tcc_debug_typedef(TCCState *s1, Sym *sym) · 39 unmodified lines |
| 1888 | 2057 | dwarf_strp(dwarf_info_section, get_tok_str(sym->v & ~SYM_FIELD, NULL)); |
| 1889 | 2058 | dwarf_uleb128(dwarf_info_section, dwarf_line.cur_file); |
| 1890 | 2059 | dwarf_uleb128(dwarf_info_section, file->line_num); |
| 2060 | + tcc_debug_check_anon(sym, dwarf_info_section->data_offset); |
| 1891 | 2061 | dwarf_data4(dwarf_info_section, debug_type - dwarf_info.start); |
| 1892 | 2062 | } |
| 1893 | 2063 | return; |
| @@ -6106,6 +6276,8 @@ do_decl: · 4212 unmodified lines |
| 6106 | 6276 | check_fields(type, 1); |
| 6107 | 6277 | check_fields(type, 0); |
| 6108 | 6278 | struct_layout(type, &ad); |
| 6279 | + if (debug_modes) |
| 6280 | + tcc_debug_fix_anon(type); |
| 6109 | 6281 | } |
| 6110 | 6282 | } |
| 6111 | 6283 | } |