🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Fabien COUTANT Sat, 23 Oct 2004 07:34
inconsistent breakpoints with Sun Workshop 6.2
#1330
Author: Fabien COUTANT
Date: Sat, 23 Oct 2004 07:34
35 lines
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.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads