Changeset 804
- Timestamp:
- Oct 5, 2003, 6:04:56 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.25
to1.26
r803 r804 1313 1313 t.d.types.list = list; 1314 1314 t1 = type_add (&t); 1315 free (list); 1315 1316 1316 1317 t = *tp; … … 1650 1651 t.index = 0x80; /* 8 bit signed */ 1651 1652 else if (range_lo == -32768 && range_hi == 32767) 1652 t.index = 0x8 0; /* 16 bit signed */1653 t.index = 0x81; /* 16 bit signed */ 1653 1654 else if (range_lo == -2147483647 - 1 && range_hi == 2147483647) 1654 1655 t.index = 0x82; /* 32 bit signed */ … … 1867 1868 if (size == 8 && code == -16) 1868 1869 { 1870 #if 0 /* debugger doesn't understand this game */ 1869 1871 t.tag = ty_prim; 1870 1872 t.index = 0x90; /* 8 bit boolean */ 1873 #else 1874 t.tag = ty_values; 1875 t.d.values.count = 2; 1876 t.d.values.list = xmalloc (2 * sizeof (*t.d.values.list)); 1877 t.d.values.list[0].index = 0; 1878 t.d.values.list[0].name = strpool_add (str_pool, "false"); 1879 t.d.values.list[1].index = 1; 1880 t.d.values.list[1].name = strpool_add (str_pool, "true"); 1881 t1 = type_add (&t); 1882 free (t.d.values.list); 1883 1884 t.tag = ty_prim; 1885 t.index = 0x80; 1886 t2 = type_add (&t); 1887 1888 t.tag = ty_enu; 1889 t.index = -1; 1890 t.d.enu.values = t1; 1891 t.d.enu.type = t2; 1892 t.d.enu.name = add_struct_name (NULL); 1893 t.d.enu.first = 0; 1894 t.d.enu.last = 1; 1895 #endif 1871 1896 } 1872 1897 else … … 1927 1952 case 'u': 1928 1953 { 1954 /* make a fake structure. */ 1955 t.tag = ty_prim; 1956 t.index = 0x80; 1957 tlist = xmalloc (1 * sizeof (*t.d.types.list)); 1958 tlist[0] = type_add (&t); 1959 t.tag = ty_types; 1960 t.index = -1; 1961 t.d.types.count = 1; 1962 t.d.types.list = tlist; 1963 t1 = type_add (&t); 1964 free (tlist); 1965 1966 t.tag = ty_fields; 1967 t.index = -1; 1968 t.d.fields.count = 1; 1969 t.d.fields.list = xmalloc (1 * sizeof (*t.d.fields.list)); 1970 t.d.fields.list[0].offset = 0; 1971 t.d.fields.list[0].name = strpool_add (str_pool, "This_Is_an_Incomplete_Structure_SORRY"); 1972 t2 = type_add (&t); 1973 free (t.d.fields.list); 1974 1929 1975 t.tag = ty_struc; 1930 t.d.struc.types = NULL; 1931 t.d.struc.fields = NULL; 1932 t.d.struc.size = 0; 1933 t.d.struc.count = 0; 1976 t.index = -1; 1977 t.d.struc.types = t1; 1978 t.d.struc.fields = t2; 1979 t.d.struc.size = 1; 1980 t.d.struc.count = 1; 1934 1981 t.d.struc.name = strpool_addn (str_pool, parse_ptr, p1 - parse_ptr); 1935 1982 t.d.struc.flags = STRUC_FORWARD; … … 2030 2077 /* kso #456 2003-06-11: Don't mess with forward defines! */ 2031 2078 if (!( (t1->d.struc.flags & STRUC_FORWARD) 2032 && t1->d.struc.types == NULL2033 && t1->d.struc.fields == NULL ))2079 /*&& t1->d.struc.types == NULL 2080 && t1->d.struc.fields == NULL*/)) 2034 2081 struct_to_class (t1); 2035 2082 break; … … 2296 2343 for (t3 = type_head; t3 != NULL; t3 = t3->next) 2297 2344 if (t3->tag == ty_struc && t3->d.struc.name == t.d.class.name 2298 && t3->d.struc.types == NULL && t3->d.struc.fields == NULL2345 /*&& t3->d.struc.types == NULL && t3->d.struc.fields == NULL */ 2299 2346 && (t3->d.struc.flags & STRUC_FORWARD)) 2300 2347 { … … 2326 2373 } 2327 2374 t2 = type_add (&t); 2375 free (t.d.fields.list); 2328 2376 2329 2377 t.tag = ty_struc; … … 2340 2388 for (t3 = type_head; t3 != NULL; t3 = t3->next) 2341 2389 if (t3->tag == ty_struc && t3->d.struc.name == t.d.struc.name 2342 && t3->d.struc.types == NULL && t3->d.struc.fields == NULL2390 /* && t3->d.struc.types == NULL && t3->d.struc.fields == NULL */ 2343 2391 && (t3->d.struc.flags & STRUC_FORWARD)) 2344 2392 { … … 2393 2441 } 2394 2442 t1 = type_add (&t); 2443 free (t.d.values.list); 2395 2444 2396 2445 t.tag = ty_prim; … … 2619 2668 t.d.types.list = list; 2620 2669 t1 = type_add (&t); 2670 free (list); 2621 2671 2622 2672 make_type (t1, &ti_1); … … 3144 3194 hll_end (block_stack[block_grow.count].patch_ptr, 0, 3145 3195 sym_ptr[i].n_value - block_stack[block_grow.count].addr); 3196 if (block_grow.count == 1) /* we make one extra begin */ 3197 { 3198 --block_grow.count; 3199 hll_end (block_stack[block_grow.count].patch_ptr, 0, 3200 sym_ptr[i].n_value - block_stack[block_grow.count].addr); 3201 } 3146 3202 if (block_grow.count == 0 && proc_patch_base != 0) 3147 3203 fun_end (i); … … 3171 3227 abort (); 3172 3228 n = p - str; 3173 name = strpool_addn(str_pool, str, n); 3229 3230 /* 3231 * The debuggers doesn't like looong names. Besides it doesn't know how to 3232 * demangle them either. This is the place to deal with this. 3233 * (The limit seems to be 106 bytes.) 3234 * 3235 * For now we'll just make sure the name ain't too long. 3236 */ 3237 if (n > 106) 3238 { 3239 char szName[106]; 3240 memcpy(szName, str, sizeof(szName) - 1); 3241 szName[sizeof(szName) - 1] = '!'; /* mark it as cut. */ 3242 name = strpool_addn(str_pool, str, sizeof(szName)); 3243 } 3244 else 3245 name = strpool_addn(str_pool, str, n); 3174 3246 3175 3247 proc_start_addr = symbol->n_value; … … 3576 3648 3577 3649 /* Now look for N_LBRAC */ 3578 3579 3650 next_lbrac (i); 3580 3651 if (lbrac_index != -1) … … 3585 3656 else 3586 3657 {/* kso #456 2003-06-05: We need a begin to catch the parameters. */ 3587 struct relocation_info r = {0};3588 sst_start (SST_begin);3589 r.r_address = sst.size;3590 buffer_dword (&sst, proc_start_addr); /* Segment offset */3591 buffer_dword (&sst, text_size - proc_start_addr); /* Length */3592 sst_end ();3593 r.r_length = 2;3594 r.r_symbolnum = N_TEXT;3595 buffer_mem (&sst_reloc, &r, sizeof (r));3596 3658 prologue_length = 0; 3659 block_begin (proc_start_addr); 3597 3660 } 3598 3661 3599 3662 /* Parameters */ 3600 3601 3663 while (*index + 1 < sym_count && sym_ptr[*index+1].n_type == N_PSYM) 3602 3664 { … … 3605 3667 } 3606 3668 3669 /* Start another block for the local variables. This is to work 3670 around some missing bracets in stabs and to fix problem with 3671 C++ bool type. */ 3672 dword addr = proc_start_addr + prologue_length; 3673 if (lbrac_index >= 0 && sym_ptr[lbrac_index].n_value > addr) 3674 addr = sym_ptr[lbrac_index].n_value; 3675 block_begin (addr); 3676 3677 /* Local variables (fix for boolparam testcase too). */ 3678 while (*index + 1 < sym_count && sym_ptr[*index+1].n_type == N_LSYM) 3679 { 3680 ++(*index); 3681 parse_symbol (index, -1, "LSYM", TRUE); 3682 } 3683 3607 3684 /* If there's no N_LBRAC, write SST_end now */ 3608 3609 3685 if (lbrac_index == -1) 3610 3686 {/* kso #456 2003-06-05: We need a begin to catch the parameters. */ 3611 //block_end (proc_start_addr); 3612 sst_start (SST_end); 3613 sst_end (); 3614 fun_end (*index+1); 3687 while (block_grow.count > 0) 3688 block_end (*index+1); 3615 3689 } 3616 3690 break; -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.