home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.gdb.bug
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!graphics.cs.nyu.edu!fox
- From: fox@graphics.cs.nyu.edu (David Fox)
- Subject: The Sun bug, after taking a deep breath and counting to 10...
- Message-ID: <9211211820.AA23772@GRAPHICS.CS.NYU.EDU>
- Sender: gnulists@ai.mit.edu
- Organization: GNUs Not Usenet
- Distribution: gnu
- Date: Sat, 21 Nov 1992 08:20:45 GMT
- Approved: bug-gdb@prep.ai.mit.edu
- Lines: 27
-
- Compile the following program with g++-2.1 or later on a sparc,
- invoke gdb-4.7, put a break point at the first statement of
- main, and then do a "next". Instead of stopping at the second
- line of the program the program finishes executing and exit:
-
- #include <stdio.h>
-
- struct foo {
- int a;
- int b;
- };
-
- foo bar(int x, int y)
- {
- foo r;
- r.a = x;
- r.b = y;
- return r;
- }
-
- main()
- {
- foo i = bar(1, 2);
- foo j = bar(3, 4);
- printf("%d %d %d %d\n", i.a, i.b, j.a, j.b);
- }
-
-