]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Warn about a description field that is too big.
authorNick Clifton <nickc@redhat.com>
Sat, 11 May 2002 19:41:28 +0000 (19:41 +0000)
committerNick Clifton <nickc@redhat.com>
Sat, 11 May 2002 19:41:28 +0000 (19:41 +0000)
gas/ChangeLog
gas/stabs.c

index 6ad85c8e5d9a5d27f17af614da37a3a3983f2618..7745645d072be4364f7f54844094d76ce567c112 100644 (file)
@@ -1,3 +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.
+
 2002-05-11  Daniel Jacobowitz  <drow@mvista.com>
 
        Merge from mainline:
index 60b03c49941b3d6613945ee52dd5f94d1c8972ab..4c9251f070efd646bfbdf118ca05eca86c32976a 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 != ',')