bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Warn about an excessively large STABS description field


From: Nick Clifton
Subject: Warn about an excessively large STABS description field
Date: 11 May 2002 20:39:23 +0100

Hi Guys,

  I am checking in the following patch (mainline & branch) to add a
  warning if GAS detects STABS directive with an excessively large
  description field.

Cheers
        Nick

2002-05-11  Nick Clifton  <address@hidden>

        * stabs.c (s_stab_generic): Warn about a description field that is
        too big.

Index: gas/stabs.c
===================================================================
RCS file: /cvs/src/src/gas/stabs.c,v
retrieving revision 1.16
diff -c -3 -p -w -r1.16 stabs.c
*** gas/stabs.c 3 May 2002 02:25:33 -0000       1.16
--- gas/stabs.c 11 May 2002 17:16:44 -0000
*************** s_stab_generic (what, stab_secname, stab
*** 240,245 ****
--- 240,253 ----
    other = longint;
  
    desc = get_absolute_expression ();
+ 
+   if ((desc > 0xffff) || (desc < -0x8000))
+     /* This could happen for example with a source file with a huge
+        number of lines.  The only cure is to use a different debug
+        format, probably DWARF.  */
+     as_warn (_(".stab%c: description field '%x' too big, maybe you could a 
different debug format"),
+            what, desc);
+     
    if (what == 's' || what == 'n')
      {
        if (*input_line_pointer != ',')




reply via email to

[Prev in Thread] Current Thread [Next in Thread]