bug-gdb
[Top][All Lists]
Advanced

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

Re: inconsistent breakpoints with Sun Workshop 6.2


From: Michael Mueller
Subject: Re: inconsistent breakpoints with Sun Workshop 6.2
Date: Mon, 25 Oct 2004 13:45:49 +0200
User-agent: Mozilla/5.0

Fabien,

You can find unofficial patches for this and a couple of other issues on
my website: http://www.mm.kay-mueller.de/gdb_for_sun_cc.html. (They are
for gdb 6.2. Haven't looked into 6.2.1 yet.) I'm using gdb for Sun cc
compiled programs myself a lot and am willing to help if you run into
more problems.

Mark,

This is still open, see thread

  "patch 1 for Sun C compiled target" on gdb-patches,
  http://sources.redhat.com/ml/gdb-patches/2004-07/msg00106.html

I was busy with other things lately but I am willing to come back to my
Sun/gdb problems (see list on above website). Also still open:

  patch #2 for Sun C compiled target programs
  patch #3 for Sun C compiled target programs

Michael


Fabien COUTANT wrote:
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.






reply via email to

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