Article View: gnu.gdb.bug
Article #2122Re: RFE: more than 16-bit line numbers
From: Nick Clifton
Date: Sat, 11 May 2002 09:53
Date: Sat, 11 May 2002 09:53
39 lines
2348 bytes
2348 bytes
Hi Scott,
> In that case, I might change my RFE to request that 'as' emit a
> warning when it encodes a stabs n_desc value that does not fit in
> 16 bits; the warning might suggest -ggdb or -gdwarf-2.
Please could you try out the attached patch and let me know if it
generates the warning message appropriately.
Cheers
Nick
PS. I was not sure if it was appropriate for the warning message to
suggest a different debug format, so I put the idea into a comment
instead.
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 09:51:25 -0000
*************** s_stab_generic (what, stab_secname, stab
*** 240,245 ****
--- 240,252 ----
other = longint;
desc = get_absolute_expression ();
+
+ if (desc > 0xffff || desc < 0xffff8000)
+ /* This could happen for example with a source file with a huge
+ number of lines. The only cure is to use a different debug
+ foramt, probably DWARF. */
+ as_warn (_(".stab%c: description field does not fit into 16 bits"), what);
+
if (what == 's' || what == 'n')
{
if (*input_line_pointer != ',')
Technical Details
Message-ID:
<m3sn4zau35.fsf@north-pole.nickc.cambridge.redhat.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sunqbc.risq.qc.ca!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdbReferences:
<Pine.LNX.4.33.0205051836270.767-100000@seamonkey.pasture.cow> <3CD6BF32.A3B8BA3C@redhat.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,e197600b1dabd7b7 X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 2002-05-11 02:54:05 PST x-uunet-gateway: mr0.ash.ops.us.uu.net from bug-gdb to gnu.gdb.bug; Sat, 11 May 2002 09:54:03 GMT Sender: nickc@north-pole.nickc.cambridge.redhat.com Subject: Re: RFE: more than 16-bit line numbers References: <Pine.LNX.4.33.0205051836270.767-100000@seamonkey.pasture.cow> <3CD6BF32.A3B8BA3C@redhat.com> From: nickc@cambridge.redhat.com (Nick Clifton) Date: 11 May 2002 10:53:50 +0100 Message-ID: <m3sn4zau35.fsf@north-pole.nickc.cambridge.redhat.com> User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Approved: bug-gdb-request@mail.gnu.org Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!sunqbc.risq.qc.ca!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!spool0901.news.uu.net!wendy-fate.uu.net!bug-gdb Lines: 40