Changeset 3919


Ignore:
Timestamp:
Oct 25, 2014, 1:33:46 PM (11 years ago)
Author:
bird
Message:

trunk,0.6: emxomf: Warn once about HLL type indexes we cannot encode in PUBDEF and EXTDEF records and set them to 0 in the sym_more table so we don't die in put_idx and can correctly calculate record lengths. Fixes #293.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/libc-0.6/src/emx/src/emxomf/emxomf.c

    r3730 r3919  
    593593  if (index > sym_count || index < 0)
    594594    error ("Internal error! Invalid index (%d) passed to set_hll_type().", index);
     595
     596  /* Ignore type indexes we cannot encode (see put_idx), though, issue a
     597     warning the first time we see this in a file (our repeat detection
     598     isn't prefect as heap can be reused, but it'll have to do). */
     599  if (hll_type < 0 || hll_type > 0x7fff)
     600    {
     601      static const char *s_pszComplainedFor = NULL;
     602      if (s_pszComplainedFor != error_fname)
     603        {
     604          s_pszComplainedFor = error_fname;
     605          warning ("Input file '%s' has more HLL debug types than we can index in PUBDEF and EXTDEF records.", error_fname);
     606        }
     607      hll_type = 0;
     608    }
     609
    595610  sym_more[index].hll_type = hll_type;
    596611}
  • trunk/emx/src/emxomf/emxomf.c

    r3729 r3919  
    593593  if (index > sym_count || index < 0)
    594594    error ("Internal error! Invalid index (%d) passed to set_hll_type().", index);
     595
     596  /* Ignore type indexes we cannot encode (see put_idx), though, issue a
     597     warning the first time we see this in a file (our repeat detection
     598     isn't prefect as heap can be reused, but it'll have to do). */
     599  if (hll_type < 0 || hll_type > 0x7fff)
     600    {
     601      static const char *s_pszComplainedFor = NULL;
     602      if (s_pszComplainedFor != error_fname)
     603        {
     604          s_pszComplainedFor = error_fname;
     605          warning ("Input file '%s' has more HLL debug types than we can index in PUBDEF and EXTDEF records.", error_fname);
     606        }
     607      hll_type = 0;
     608    }
     609
    595610  sym_more[index].hll_type = hll_type;
    596611}
Note: See TracChangeset for help on using the changeset viewer.