- Timestamp:
- Jun 4, 2003, 5:00:38 AM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/src/emxomf/stabshll.c
-
Property cvs2svn:cvs-rev
changed from
1.3
to1.4
r290 r291 342 342 static int unnamed_struct_number; 343 343 344 #ifndef HLL_DEBUG 344 345 /* Suppress several kinds of warnings since newer gccs generates lots of 345 346 warnings... */ … … 349 350 (void)format; 350 351 } 352 #else 353 #define no_warning warning 354 #endif 351 355 352 356 … … 590 594 case ty_array: 591 595 if (p->d.array.etype == src->d.array.etype 592 && p->d.array.itype == src->d.array.itype 596 && p->d.array.itype == src->d.array.itype 593 597 && p->d.array.first == src->d.array.first 594 598 && p->d.array.last == src->d.array.last) … … 779 783 { 780 784 int i; 785 786 /* Currently we crash when showing FILE (stdio.h). So, better not crash here.. */ 787 if (!tp) 788 { 789 printf("!!! error! NULL type pointer! !!!"); 790 return; 791 } 781 792 782 793 switch (tp->tag) … … 1375 1386 break; 1376 1387 1388 case 'R': 1389 1390 /* Complex number: R<?base_type?>;<size bytes>;<0>; */ 1391 1392 ++parse_ptr; 1393 if (!parse_number (&num1) || !parse_char (';') 1394 || !parse_number (&width) || !parse_char (';') 1395 || !parse_number (&code) || !parse_char (';')) 1396 goto syntax; 1397 1398 /* 1399 * The 192bit type is not defined in the HLL specs, but we assume it for 1400 * convenince right now. 1401 * 1402 * It seems like no debugger acutally supports these types. So, we should, 1403 * when somebody requires it for debugging complex math, make structs out 1404 * of these declarations like GCC does for the 'complex int' type. 1405 * 1406 * .stabs "FakeComplexInt:t21=22=s8real:1,0,32;imag:1,32,32;;",128,0,0,0 1407 * .stabs "FakeComplexFloat:t23=24=s8real:12,0,32;imag:12,32,32;;",128,0,0,0 1408 * .stabs "FakeComplexDouble:t25=26=s16real:13,0,64;imag:13,64,64;;",128,0,0,0 1409 * .stabs "FakeComplexLongDouble:t27=28=s24real:14,0,96;imag:14,96,96;;",128,0,0,0 1410 * 1411 */ 1412 t.tag = ty_prim; 1413 if (width == 8 && code == 0) 1414 t.index = 0x8c; 1415 else if (width == 16 && code == 0) 1416 t.index = 0x8d ; 1417 else if (width == 20 && code == 0) 1418 t.index = 0x8e; 1419 else if (width == 24 && code == 0) 1420 t.index = 0x8f; //TODO: bogus!!! 1421 else 1422 { 1423 no_warning ("Unknown complex type: %ld/%ld", width, code); 1424 goto syntax; 1425 } 1426 break; 1427 1377 1428 case '*': 1378 1429 … … 1447 1498 -20 char 1448 1499 1500 @s<bits>;<range record> 1501 Used for 64 bit ints. 1449 1502 1450 1503 */ … … 1457 1510 if (!parse_number (&size) || !parse_char (';')) 1458 1511 goto syntax; 1512 if (*parse_ptr == 'r') 1513 { /* nested */ 1514 return parse_type(type_name); 1515 } 1516 1459 1517 if (!parse_number (&code)) 1460 1518 goto syntax; … … 1999 2057 2000 2058 syntax: 2059 no_warning ("syntax error in stabs: %c", *parse_ptr); 2001 2060 grow_free (&g1); 2002 2061 t.tag = ty_prim; … … 2722 2781 { 2723 2782 case 'G': 2724 2783 { 2784 char *psz; 2785 int cch; 2725 2786 /* Static storage, global scope */ 2726 2787 … … 2730 2791 printf (" type=%#x\n", ti); 2731 2792 #endif 2732 sym2 = find_symbol (name); 2793 2794 psz = alloca(cch = strlen(name) + 2); 2795 *psz = '_'; 2796 strcpy(psz+1, name); 2797 sym2 = find_symbol (psz); 2733 2798 if (sym2 == NULL) 2734 2799 { 2735 no_warning ("Cannot find address of global variable %s ", name);2800 no_warning ("Cannot find address of global variable %s (%s)", name, psz); 2736 2801 return; 2737 2802 } … … 2741 2806 sst_static (name, sym2->n_value, ti, sym2->n_type, 0); 2742 2807 break; 2808 } 2743 2809 2744 2810 case 'S': -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.