public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* Bug in gas line no. info, --target=iris
@ 1994-07-08 17:50 David Johnson
  1994-07-08 21:06 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: David Johnson @ 1994-07-08 17:50 UTC (permalink / raw)
  To: gas2

Problem
-------

Gas appears to get the line number debugging information wrong for the
last ".loc" pseudo-op in a source file.

Also, if there's only one ".loc" pseudo-op in a file, it does not
appear in the line number information.

Version
-------

GNU assembler version 940706 (iris), using BFD version cygnus-2.3
(also apparent in gas-2.3)

Test program
------------

        .file   1 "test.s"
        .text
        .ent    test
test:
        .loc    1 1
        li      $2, 1
        .loc    1 2
        li      $2, 2
        .end    test

Output (Using IRIX 4.0.5H)
--------------------------

% as -g test.s -o test.o 
% mips-tdump -l test.o

.
.
        There are 2 bytes holding line numbers, starting at 220.
            Line           1,   delta     0,   count  1
            Line           2,   delta     1,   count  1
.
.

% gas -g test.s -o test.o
% mips-tdump -l test.o
.
.
        There are 2 bytes holding line numbers, starting at 320.
            Line           1,   delta     0,   count  1
            Line           1,   delta     0,   count 16
.
.

----------------------------------------------------------------
David Johnson
International Computer Science Institute


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Bug in gas line no. info, --target=iris
  1994-07-08 17:50 Bug in gas line no. info, --target=iris David Johnson
@ 1994-07-08 21:06 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 1994-07-08 21:06 UTC (permalink / raw)
  To: davidj; +Cc: gas2

   From: davidj@ICSI.Berkeley.EDU (David Johnson)
   Date: Fri, 8 Jul 1994 17:50:37 -0700

   Gas appears to get the line number debugging information wrong for the
   last ".loc" pseudo-op in a source file.

Thanks for the bug report.  I believe this this patch will fix the
problem.

Ian

Index: ecoff.c
===================================================================
RCS file: /rel/cvsfiles/devo/gas/ecoff.c,v
retrieving revision 1.16
diff -p -r1.16 ecoff.c
*** ecoff.c	1994/07/08 19:37:57	1.16
--- ecoff.c	1994/07/09 04:04:51
*************** ecoff_build_lineno (backend, buf, bufend
*** 3600,3606 ****
  	 (in words).  Do this first, so that we can skip ahead to the
  	 next useful line number entry.  */
        if (l->next == (lineno_list_t *) NULL)
! 	count = 0;
        else
  	{
  	  count = ((l->next->frag->fr_address + l->next->paddr
--- 3600,3610 ----
  	 (in words).  Do this first, so that we can skip ahead to the
  	 next useful line number entry.  */
        if (l->next == (lineno_list_t *) NULL)
! 	{
! 	  /* We want a count of zero, but it will be decremented
! 	     before it is used.  */
! 	  count = 1;
! 	}
        else
  	{
  	  count = ((l->next->frag->fr_address + l->next->paddr


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-07-08 21:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-07-08 17:50 Bug in gas line no. info, --target=iris David Johnson
1994-07-08 21:06 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).