From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19451 invoked by alias); 15 Oct 2002 16:12:57 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 19444 invoked from network); 15 Oct 2002 16:12:56 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 15 Oct 2002 16:12:56 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g9FFqPw22493 for ; Tue, 15 Oct 2002 11:52:25 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9FGCtf28514; Tue, 15 Oct 2002 12:12:55 -0400 Received: from valrhona.uglyboxes.com (IDENT:pnQjciSg86cR6U4pUZkzfcP1NN3iNl51@vpn50-27.rdu.redhat.com [172.16.50.27]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g9FGCtT26668; Tue, 15 Oct 2002 12:12:55 -0400 Date: Tue, 15 Oct 2002 09:12:00 -0000 From: Keith Seitz X-X-Sender: keiths@valrhona.uglyboxes.com To: "Matteucci, Cheryl A (N-B&M Assoicates)" cc: "'insight@sources.redhat.com'" Subject: Re: User Defined Types and the Debugger In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-q4/txt/msg00044.txt.bz2 On Mon, 14 Oct 2002, Matteucci, Cheryl A (N-B&M Assoicates) wrote: > Support, Please do not call me "support": I am not a support engineer, you don't have a support contract with me, no one has a support contract with me, no one pays me to work on Insight, and I get very, very little help from others. > A = B / C where A = floating point class attribute (not static or const, > class scope) > B = locally defined floating point variable (not > static or const) > C = user defined floating point type that is > static and const (class scope). > > All of the above is in the same class. It would be much better to have an actual testcase or some lines of code to inspect. There has been some churn on c++ inside GDB over the past few months, and it is difficult to determine exactly what is going on without something more concrete. > The debugger shows me a value of 0 for C, but it is statically initialized > to 70.0. I set a breakpoint at this line of code and when I step through > this line of code, the debugger gives me a segmentation violation (I assume > because it thinks I am dividing by zero). But if I set a breakpoint at some > point after this line of code, the debugger successfully executes it. When > I run the program outside of the debugger, it is successfully executed. The debugger does not generate segmentation faults in programs: the programs do that all by themselves. There could be many reasons why your statically initialized variable does not appear initialized. The best thing to do right now is to post a short testcase demonstrating the problem. What version of GDB/Insight are you using? What version of gcc? If you suppress Insight and use command-line GDB (gdb -nw/insight -nw), does the problem also exist? Keith