This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

java/1567: "(gdb) break main" doesn't work


>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]