Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/gas/stabs.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    218218      else
    219219        {
    220           as_warn (_(".stabs: Missing comma"));
     220          as_warn (_(".stab%c: missing comma"), what);
    221221          ignore_rest_of_line ();
    222222          return;
     
    226226  if (get_absolute_expression_and_terminator (&longint) != ',')
    227227    {
    228       as_warn (_(".stab%c: Missing comma"), what);
     228      as_warn (_(".stab%c: missing comma"), what);
    229229      ignore_rest_of_line ();
    230230      return;
     
    234234  if (get_absolute_expression_and_terminator (&longint) != ',')
    235235    {
    236       as_warn (_(".stab%c: Missing comma"), what);
     236      as_warn (_(".stab%c: missing comma"), what);
    237237      ignore_rest_of_line ();
    238238      return;
     
    241241
    242242  desc = get_absolute_expression ();
     243
     244  if ((desc > 0xffff) || (desc < -0x8000))
     245    /* This could happen for example with a source file with a huge
     246       number of lines.  The only cure is to use a different debug
     247       format, probably DWARF.  */
     248    as_warn (_(".stab%c: description field '%x' too big, try a different debug format"),
     249             what, desc);
     250
    243251  if (what == 's' || what == 'n')
    244252    {
    245253      if (*input_line_pointer != ',')
    246254        {
    247           as_warn (_(".stab%c: Missing comma"), what);
     255          as_warn (_(".stab%c: missing comma"), what);
    248256          ignore_rest_of_line ();
    249257          return;
     
    344352        {
    345353          /* Release the string, if nobody else has used the obstack.  */
    346           if (saved_string_obstack_end == notes.next_free) 
     354          if (saved_string_obstack_end == notes.next_free)
    347355            obstack_free (&notes, string);
    348356        }
     
    470478    {
    471479      *p = 0;
    472       as_bad (_("Expected comma after name \"%s\""), name);
     480      as_bad (_("expected comma after \"%s\""), name);
    473481      *p = c;
    474482      ignore_rest_of_line ();
     
    540548    {
    541549      char *bslash = strchr (tmp, '\\');
    542       int len = (bslash ? (bslash - tmp + 1) : strlen (tmp));
     550      size_t len = (bslash) ? (size_t) (bslash - tmp + 1) : strlen (tmp);
    543551
    544552      /* Double all backslashes, since demand_copy_C_string (used by
     
    581589  char *buf;
    582590  char sym[30];
    583 
    584   /* Let the world know that we are in the middle of generating a
    585      piece of stabs line debugging information.  */
    586   outputting_stabs_line_debug = 1;
     591  /* Remember the last file/line and avoid duplicates.  */
     592  static unsigned int prev_lineno = -1;
     593  static char *prev_file = NULL;
    587594
    588595  /* Rather than try to do this in some efficient fashion, we just
     
    594601
    595602  as_where (&file, &lineno);
     603
     604  /* Don't emit sequences of stabs for the same line.  */
     605  if (prev_file == NULL)
     606    {
     607      /* First time thru.  */
     608      prev_file = xstrdup (file);
     609      prev_lineno = lineno;
     610    }
     611  else if (lineno == prev_lineno
     612           && strcmp (file, prev_file) == 0)
     613    {
     614      /* Same file/line as last time.  */
     615      return;
     616    }
     617  else
     618    {
     619      /* Remember file/line for next time.  */
     620      prev_lineno = lineno;
     621      if (strcmp (file, prev_file) != 0)
     622        {
     623          free (prev_file);
     624          prev_file = xstrdup (file);
     625        }
     626    }
     627
     628  /* Let the world know that we are in the middle of generating a
     629     piece of stabs line debugging information.  */
     630  outputting_stabs_line_debug = 1;
    596631
    597632  generate_asm_file (N_SOL, file);
Note: See TracChangeset for help on using the changeset viewer.