public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/16439] New: gcj doesn't generate proper debugging line number info
@ 2004-07-08 18:11 jjohnstn at redhat dot com
  2004-07-08 18:14 ` [Bug java/16439] " jjohnstn at redhat dot com
  2004-07-23  2:07 ` [Bug java/16439] gcj generates wrong line number for static function breakpoint mckinlay at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: jjohnstn at redhat dot com @ 2004-07-08 18:11 UTC (permalink / raw)
  To: java-prs

For the following test case in the gdb testsuite: jmain.java

public class jmain
{
  public static void main (String[] args)
    {
        return;
    }
}

The breakpoint for main ends up being line 4 (the open brace) instead of line 5.
 This does not match the C/C++ behavior which is to point to the first statement
of the member function.  Gdb gets the line number info from the compiler which
is the following tailed output from readelf -wl

 Line Number Statements:
  Extended opcode 2: set Address to 0x8048868
  Special opcode 8: advance Address by 0 to 0x8048868 and Line by 3 to 4
  Special opcode 89: advance Address by 6 to 0x804886e and Line by 0 to 4
  Special opcode 175: advance Address by 12 to 0x804887a and Line by 2 to 6
  Special opcode 28: advance Address by 2 to 0x804887c and Line by -5 to 1
  Special opcode 89: advance Address by 6 to 0x8048882 and Line by 0 to 1
  Advance PC by 14 to 8048890
  Extended opcode 1: End of Sequence

-- 
           Summary: gcj doesn't generate proper debugging line number info
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jjohnstn at redhat dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug java/16439] gcj doesn't generate proper debugging line number info
  2004-07-08 18:11 [Bug java/16439] New: gcj doesn't generate proper debugging line number info jjohnstn at redhat dot com
@ 2004-07-08 18:14 ` jjohnstn at redhat dot com
  2004-07-23  2:07 ` [Bug java/16439] gcj generates wrong line number for static function breakpoint mckinlay at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: jjohnstn at redhat dot com @ 2004-07-08 18:14 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From jjohnstn at redhat dot com  2004-07-08 18:14 -------
Created an attachment (id=6712)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6712&action=view)
jmain.java


-- 


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


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

* [Bug java/16439] gcj generates wrong line number for static function breakpoint
  2004-07-08 18:11 [Bug java/16439] New: gcj doesn't generate proper debugging line number info jjohnstn at redhat dot com
  2004-07-08 18:14 ` [Bug java/16439] " jjohnstn at redhat dot com
@ 2004-07-23  2:07 ` mckinlay at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: mckinlay at redhat dot com @ 2004-07-23  2:07 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From mckinlay at redhat dot com  2004-07-23 02:07 -------
This occurs for "static" and maybe "synchronized" methods. What happens is gcj
inserts some prologue code to check the class initialization status (in the case
of a static method), or in the case of a synchronized method, to aquire the
lock. The line number it uses for the inserted prologue code is that of the
current parser context when starting the method, which points to the method's
opening brace ("{").

It could be changed to instead look for the first non-synthetic code in the
method and use the line number from that.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-07-23 02:07:31
               date|                            |
            Summary|gcj doesn't generate proper |gcj generates wrong line
                   |debugging line number info  |number for static function
                   |                            |breakpoint


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


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

end of thread, other threads:[~2004-07-23  2:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-08 18:11 [Bug java/16439] New: gcj doesn't generate proper debugging line number info jjohnstn at redhat dot com
2004-07-08 18:14 ` [Bug java/16439] " jjohnstn at redhat dot com
2004-07-23  2:07 ` [Bug java/16439] gcj generates wrong line number for static function breakpoint mckinlay at redhat dot com

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