🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

3 total messages Started by Scott McPeak Mon, 06 May 2002 01:40
Re: RFE: more than 16-bit line numbers
#2083
Author: Scott McPeak
Date: Mon, 06 May 2002 01:40
17 lines
1453 bytes
> > I'm working on a project in which some very long (millions of lines) C
> > source files get generated.  Since GNU 'as' and 'gdb' cannot store more
> > than 16 bits of line number information, debugging programs using these
> > files is tedious.

> Have you tried using -gdwarf-2?

I had not, and that does indeed solve the problem.

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.

Thanks,

-Scott
Re: RFE: more than 16-bit line numbers
#2086
Author: Michael Snyder
Date: Mon, 06 May 2002 17:36
16 lines
1670 bytes
Scott McPeak wrote:
> 
> > > I'm working on a project in which some very long (millions of lines) C
> > > source files get generated.  Since GNU 'as' and 'gdb' cannot store more
> > > than 16 bits of line number information, debugging programs using these
> > > files is tedious.
> 
> > Have you tried using -gdwarf-2?
> 
> I had not, and that does indeed solve the problem.
> 
> 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.

Sounds like a reasonable idea -- I'll pass it on to the binutils folks.
Re: RFE: more than 16-bit line numbers
#2122
Author: Nick Clifton
Date: Sat, 11 May 2002 09:53
39 lines
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 != ',')
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads