Article View: gnu.gdb.bug
Article #1330inconsistent breakpoints with Sun Workshop 6.2
From: Fabien COUTANT
Date: Sat, 23 Oct 2004 07:34
Date: Sat, 23 Oct 2004 07:34
35 lines
3115 bytes
3115 bytes
Hi,
I have to debug a scientific app written in C/C++/Fortran built with
Sun Workshop 6.2 (Solaris 2.8 on sun4u), and I would like to use gdb
(well insight actually) to debug the C/C++ part.
I tried two recent gdb versions (6.2.1 and insight 6.1) and both show
the same bug on the little sample program below:
File "hello.c":
1 #include <stdlib.h>
2 #include <stdlib.h>
3
4 extern int main (int argc, char **argv)
5 {
6 printf ("Hello, world !\n") ;
7 return EXIT_SUCCESS ;
8 }
In gdb session, I first enter "b main", it replies breakpoint is set
on line 7 ! When I "r"un it executes the printf before stopping :(
If instead I enter "b 6" gdb dies on obscure error (bus error? illegal
instruction? I don't remember) when I try to "r"un the program.
The program was compiled and linked with "-xs -xildoff" flags as I
have found in other articles (otherwise gdb doesn't find symbols).
Also tried adding "-xarch=generic" or "-xarch=v8" with same result.
Compiling the program with gcc (2.95 or 3.3) works fine, but
unfortunately I can't use gcc :(
I spent some time searching for this problem on the web and didn't
find anything. This must be a new bug so I report it here. I hope
someone is able to fix it... or tell me a workaround.
--
Thanks, Fabien.
Technical Details
Message-ID:
<mailman.4838.1098543557.2017.bug-gdb@gnu.org>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!ersa.uk.clara.netShow Full Headers
Complete Article Headers
X-Google-Thread: f5053,a3da930f150d05da,start X-Google-Attributes: gidf5053,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!ersa.uk.clara.net From: "Fabien COUTANT" <fcoutant@freesurf.fr> Newsgroups: gnu.gdb.bug Subject: inconsistent breakpoints with Sun Workshop 6.2 Date: Sat, 23 Oct 2004 09:34:31 +0200 Organization: Home, sweet home Lines: 37 Approved: bug-gdb@gnu.org Message-ID: <mailman.4838.1098543557.2017.bug-gdb@gnu.org> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 Content-Transfer-Encoding: Quoted-Printable X-Trace: news.Stanford.EDU 1098543089 126 199.232.76.165 (23 Oct 2004 14:51:29 GMT) X-Complaints-To: news@news.stanford.edu To: undisclosed-recipients:; Envelope-to: bug-gdb@gnu.org Received-SPF: Received-SPF: none (mailbox3.ucsd.edu: domain of smartpost-bounces@clara.net does not designate permitted sender hosts) User-Agent: Opera M2/7.54 (Linux, build 751) X-Spamscanner: mailbox3.ucsd.edu (v1.5 Aug 25 2004 09:28:35, -2.8/5.0 3.0.0) X-MailScanner: PASSED (v1.2.8 30444 i9N7XJOM046069 mailbox3.ucsd.edu) X-Mailman-Approved-At: Sat, 23 Oct 2004 10:59:15 -0400 X-BeenThere: bug-gdb@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GDB, the GNU debugger" <bug-gdb.gnu.org> List-Unsubscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/pipermail/bug-gdb> List-Post: <mailto:bug-gdb@gnu.org> List-Help: <mailto:bug-gdb-request@gnu.org?subject=help> List-Subscribe: <http://lists.gnu.org/mailman/listinfo/bug-gdb>, <mailto:bug-gdb-request@gnu.org?subject=subscribe>