This is the mail archive of the
gdb-prs@sources.redhat.com
mailing list for the GDB project.
java/1567: "(gdb) break main" doesn't work
- From: ac131313 at redhat dot com
- To: gdb-gnats at sources dot redhat dot com
- Date: 24 Feb 2004 17:05:11 -0000
- Subject: java/1567: "(gdb) break main" doesn't work
- Reply-to: ac131313 at redhat dot com
>Number: 1567
>Category: java
>Synopsis: "(gdb) break main" doesn't work
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Feb 24 17:08:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: ac131313@redhat.com
>Release: unknown-1.0
>Organization:
>Environment:
>Description:
Given a program compiled with:
$ cat jmain.java
public class jmain
{
public static void main (String[] args)
{
return;
}
}
$ gcj jmain.java --main=jmain -g -o jmain
the command:
(gdb) file jmain
(gdb) break main
doesn't work - it gets:
Breakpoint 1 at 0x400b47: file /tmp/ccRI44W0.i, line 10.
which is the C main from a generated startup stub.
Instead, GDB should:
- pick up --main=jmain, and set current SAL to that
- lookup "main" in the context of the static current SAL
- consequently find "jmain.main"
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: