bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

inconsistent breakpoints with Sun Workshop 6.2


From: Fabien COUTANT
Subject: inconsistent breakpoints with Sun Workshop 6.2
Date: Sat, 23 Oct 2004 09:34:31 +0200
User-agent: Opera M2/7.54 (Linux, build 751)

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]