aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-05-11 19:40:29 +0000
committerNick Clifton <nickc@redhat.com>2002-05-11 19:40:29 +0000
commit6360824b6e9bee7b1580573161f7fd0aaffa4e40 (patch)
tree3cc4f2ce41b6ecbe9c572e004887bf9628ff8ca4 /gas
parent20cb8cdaf385a9bc67b63e015241d36b93289438 (diff)
downloadgdb-6360824b6e9bee7b1580573161f7fd0aaffa4e40.zip
gdb-6360824b6e9bee7b1580573161f7fd0aaffa4e40.tar.gz
gdb-6360824b6e9bee7b1580573161f7fd0aaffa4e40.tar.bz2
Warn about a description field that is too big.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog3
-rw-r--r--gas/stabs.c8
2 files changed, 11 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 159531a..f9df716 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -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.
diff --git a/gas/stabs.c b/gas/stabs.c
index bdeae10..949cca0 100644
--- a/gas/stabs.c
+++ b/gas/stabs.c
@@ -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 != ',')