Warn about a description field that is too big.
authorNick Clifton <nickc@redhat.com>
Sat, 11 May 2002 19:40:29 +0000 (19:40 +0000)
committerNick Clifton <nickc@redhat.com>
Sat, 11 May 2002 19:40:29 +0000 (19:40 +0000)
gas/ChangeLog
gas/stabs.c

index 159531af7b3059b799def9d96e5bb37b009c1fe2..f9df716bd431ad05f0748240ab6c7c1a9822bbf7 100644 (file)
@@ -1,5 +1,8 @@
 2002-05-11  Nick Clifton  <nickc@cambridge.redhat.com>
 
+       * stabs.c (s_stab_generic): Warn about a description field that is
+       too big.
+
        * config/obj-coff.c: Fix compile time warnings when compiling
        without BFD_ASSEMBLER defined.
        Fix formatting.
index bdeae10d10d7d94ab7c5271b4e5b15be71ea5661..949cca0b95cf848fd53568f8fbf11084d09d5165 100644 (file)
@@ -240,6 +240,14 @@ s_stab_generic (what, stab_secname, stabstr_secname)
   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 != ',')