public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/28352]  New: Interpreter: Stack trace line numbers sometimes missing or incorrect
@ 2006-07-11 21:30 mckinlay at redhat dot com
  2006-07-11 21:32 ` [Bug libgcj/28352] " mckinlay at redhat dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: mckinlay at redhat dot com @ 2006-07-11 21:30 UTC (permalink / raw)
  To: java-prs

When the following test case is built with gcj -C, the innermost frame is
missing from the stack trace:

public class Ex {
   void snafu( ) throws Exception {
     throw new Exception();
   }
   void bar( ) throws Exception {
     snafu( );
   }
   void foo( ) throws Exception {
     bar( );
   }
   public static void main( String[] args) throws Exception {
     new Ex( ).foo( );
  }
}


$ gij Ex
Exception in thread "main" java.lang.Exception
   at Ex.snafu(Ex.java)
   at Ex.bar(Ex.java:6)
   at Ex.foo(Ex.java:9)
   at Ex.main(Ex.java:12)

In addition, when built with a different bytecode compiler (ecj), the stack
trace is complete, but has off-by-one line number errors:

$ gij Ex
Exception in thread "main" java.lang.Exception
   at Ex.snafu(Ex.java:3)
   at Ex.bar(Ex.java:7)
   at Ex.foo(Ex.java:10)
   at Ex.main(Ex.java:13)


-- 
           Summary: Interpreter: Stack trace line numbers sometimes missing
                    or incorrect
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mckinlay at redhat dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28352


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

* [Bug libgcj/28352] Interpreter: Stack trace line numbers sometimes missing or incorrect
  2006-07-11 21:30 [Bug libgcj/28352] New: Interpreter: Stack trace line numbers sometimes missing or incorrect mckinlay at redhat dot com
@ 2006-07-11 21:32 ` mckinlay at redhat dot com
  2006-07-12  1:46 ` rmathew at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mckinlay at redhat dot com @ 2006-07-11 21:32 UTC (permalink / raw)
  To: java-prs



------- Comment #1 from mckinlay at redhat dot com  2006-07-11 21:32 -------
Correction: the description should read "the line number for the inner-most
frame is missing from the stack trace".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28352


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

* [Bug libgcj/28352] Interpreter: Stack trace line numbers sometimes missing or incorrect
  2006-07-11 21:30 [Bug libgcj/28352] New: Interpreter: Stack trace line numbers sometimes missing or incorrect mckinlay at redhat dot com
  2006-07-11 21:32 ` [Bug libgcj/28352] " mckinlay at redhat dot com
@ 2006-07-12  1:46 ` rmathew at gcc dot gnu dot org
  2006-07-12 13:56 ` bryce at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2006-07-12  1:46 UTC (permalink / raw)
  To: java-prs



------- Comment #2 from rmathew at gcc dot gnu dot org  2006-07-12 01:46 -------
Confirmed.


-- 

rmathew at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-07-12 01:46:30
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28352


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

* [Bug libgcj/28352] Interpreter: Stack trace line numbers sometimes missing or incorrect
  2006-07-11 21:30 [Bug libgcj/28352] New: Interpreter: Stack trace line numbers sometimes missing or incorrect mckinlay at redhat dot com
  2006-07-11 21:32 ` [Bug libgcj/28352] " mckinlay at redhat dot com
  2006-07-12  1:46 ` rmathew at gcc dot gnu dot org
@ 2006-07-12 13:56 ` bryce at gcc dot gnu dot org
  2006-07-12 13:59 ` [Bug java/28352] gcj -C fails to generate line number info for method mckinlay at redhat dot com
  2007-01-09 20:54 ` tromey at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: bryce at gcc dot gnu dot org @ 2006-07-12 13:56 UTC (permalink / raw)
  To: java-prs



------- Comment #3 from bryce at gcc dot gnu dot org  2006-07-12 13:56 -------
Subject: Bug 28352

Author: bryce
Date: Wed Jul 12 13:56:25 2006
New Revision: 115370

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115370
Log:
2006-07-12  Bryce McKinlay  <mckinlay@redhat.com>

        PR libgcj/28352
        * stacktrace.cc (getLineNumberForFrame): Roll back PC by 1 when
        looking up line number for interpreted frame.

Modified:
    trunk/libjava/ChangeLog
    trunk/libjava/stacktrace.cc


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28352


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

* [Bug java/28352] gcj -C fails to generate line number info for method
  2006-07-11 21:30 [Bug libgcj/28352] New: Interpreter: Stack trace line numbers sometimes missing or incorrect mckinlay at redhat dot com
                   ` (2 preceding siblings ...)
  2006-07-12 13:56 ` bryce at gcc dot gnu dot org
@ 2006-07-12 13:59 ` mckinlay at redhat dot com
  2007-01-09 20:54 ` tromey at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: mckinlay at redhat dot com @ 2006-07-12 13:59 UTC (permalink / raw)
  To: java-prs



------- Comment #4 from mckinlay at redhat dot com  2006-07-12 13:59 -------
I've committed a patch which fixes the "off by one" error seen with
ecj-produced bytecode. The missing line number issue is a different bug. It
seems that "gcj -C" simply does not generate any debug info for the "snafu"
method in the example below. 

I'm reassigning this as a front-end bug.


-- 

mckinlay at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|libgcj                      |java
            Summary|Interpreter: Stack trace    |gcj -C fails to generate
                   |line numbers sometimes      |line number info for method
                   |missing or incorrect        |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28352


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

* [Bug java/28352] gcj -C fails to generate line number info for method
  2006-07-11 21:30 [Bug libgcj/28352] New: Interpreter: Stack trace line numbers sometimes missing or incorrect mckinlay at redhat dot com
                   ` (3 preceding siblings ...)
  2006-07-12 13:59 ` [Bug java/28352] gcj -C fails to generate line number info for method mckinlay at redhat dot com
@ 2007-01-09 20:54 ` tromey at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-09 20:54 UTC (permalink / raw)
  To: java-prs



------- Comment #5 from tromey at gcc dot gnu dot org  2007-01-09 20:48 -------
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.


-- 

tromey at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28352


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

end of thread, other threads:[~2007-01-09 20:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-11 21:30 [Bug libgcj/28352] New: Interpreter: Stack trace line numbers sometimes missing or incorrect mckinlay at redhat dot com
2006-07-11 21:32 ` [Bug libgcj/28352] " mckinlay at redhat dot com
2006-07-12  1:46 ` rmathew at gcc dot gnu dot org
2006-07-12 13:56 ` bryce at gcc dot gnu dot org
2006-07-12 13:59 ` [Bug java/28352] gcj -C fails to generate line number info for method mckinlay at redhat dot com
2007-01-09 20:54 ` tromey at gcc dot gnu dot org

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).