Changeset 762 for trunk/src/gcc/gcc/dbxout.c
- Timestamp:
- Sep 30, 2003, 8:18:11 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gcc/gcc/dbxout.c
-
Property cvs2svn:cvs-rev
changed from
1.5
to1.6
r761 r762 2318 2318 current_sym_code = N_GSYM; 2319 2319 #ifdef EMX 2320 /* bird: T his is hacks for two things. The first part, to use the2321 value of a 'G', is intended to help resolving global symbols2322 when the variable name isn't equal to the assembler name. f.ex.:2320 /* bird: Two hacks. 2321 1) Get right address for globals. We're using the value field of 2322 the entry for this. This makes the following code work: 2323 2323 class foo { foo() {static const char *psz= "foo";} }; 2324 The 2nd hack is for external symbols, which we need debug info for 2325 on EMX due to HLL conversion. In that case we need to find the 2326 variable somehow and generates a special alias symbol for it. 2327 The alias is a pretty unique name which includes the string 2328 '$hll$' which is what we'll look for. ld accept multiple 2329 definitions of aliases so it's not really a problem there. The 2330 value of these 'G' stabs are always -12357. */ 2324 2) Hack 1 doesn't work for external or communal data. They would 2325 both require a fixup of the stabs value to work - which a.out 2326 naturally doesn't support (ELF does though). 2327 So, what we'll do is to make an extra entry before the 'G' 2328 entry which tells us the symbol name. 2329 In this case the value of the 'G' entry is -12357. */ 2331 2330 if (use_gnu_debug_info_extensions) 2332 2331 { … … 2334 2333 if (DECL_EXTERNAL (decl) || DECL_COMMON (decl)) 2335 2334 { 2336 struct timeval tv;2337 /* We'll make a special alias for the external and .comm2338 symbol which the a.out -> omf copy will detect.2339 Todo: This should really be _after_ the symbol. */2340 dbxout_symbol_name (decl, suffix, letter);2341 gettimeofday(&tv, NULL);2342 fprintf (asmfile, "$hll$%s$%lx%08lx\",%d,0,0,0\n",2343 DECL_EXTERNAL (decl) ? "ext" : "comm",2344 tv.tv_sec, tv.tv_usec, /*N_INDR | N_EXT*/11);2345 2335 fprintf (asmfile, "\t.stabs\t\""); 2346 2336 output_addr_const (asmfile, current_sym_addr); 2347 fprintf (asmfile, "\",%d,0,0,0\n", /*N_EXT*/ 1); 2337 #if 0 2338 fprintf (asmfile, "\",%d,0,0,0\n", /*N_EXT | N_UNDF*/1); 2339 #else 2340 fprintf (asmfile, "\",%d,0,0,0\n", /*extension*/ 0xfe); 2341 #endif 2348 2342 current_sym_addr = 0; 2349 2343 current_sym_value = -12357; -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.