From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15293 invoked by alias); 14 Nov 2002 18:37:17 -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 15270 invoked from network); 14 Nov 2002 18:37:16 -0000 Received: from unknown (HELO integraonline.com) (206.163.82.96) by sources.redhat.com with SMTP; 14 Nov 2002 18:37:16 -0000 Received: (qmail 1192 invoked from network); 14 Nov 2002 18:37:13 -0000 Received: from unknown (HELO ?192.168.0.83?) ([64.122.47.50]) (envelope-sender ) by mail-4.integraonline.com (qmail-ldap-1.03) with SMTP for ; 14 Nov 2002 18:37:13 -0000 Subject: Re: Source lines out of sync with instructions From: Tim To: Fernando Nasser Cc: insight@sources.redhat.com In-Reply-To: <3DD3E9FD.90108@redhat.com> References: <1037295643.1411.24.camel@TIM.DCS> <3DD3E12C.4090503@redhat.com> <1037297236.1411.31.camel@TIM.DCS> <3DD3E9FD.90108@redhat.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Thu, 14 Nov 2002 10:37:00 -0000 Message-Id: <1037299061.1412.46.camel@TIM.DCS> Mime-Version: 1.0 X-SW-Source: 2002-q4/txt/msg00106.txt.bz2 I tried gdb without insight, that is the command line ui, same problem. I am running on a i686 architecture. The line number and source are off by 5 lines. Can't set a break point where I want it or step to the line I want. For example ... // code 203 if ( ch == '\r' ) 204 { 205 // do something 206 } 207 } // end of function The if ( ch == '\r' ) line is 208, not 203. Since the function ends at 207 there isn't anything I can do... I've tried to use both -ggdb -O0 and -g -O0 with no difference. The command line gdb does the identical thing as insight. Any help would be appreciated... On Thu, 2002-11-14 at 10:22, Fernando Nasser wrote: > Can you try and run without the GUI? If when you say step and get into your > subroutine you see the same problem (use the list command to print the source > lines or look at what was printed by gdb when it stopped -- usually a line > number but you may get an hex address instead/as well). > > Maybe the version of GDB you are using has a problem with your architecture > (insight is just a GUI to the GNU debugger, which still does the actual > breakpoint debugging). Is this i386, MIPS, or what? > > Regards, > Fernando > > > Tim wrote:> Thanx! tried -O0 with no luck. Things are still out of sync. It > > appears to happen only after I step into a new compilation unit. That > > is, in main everything is fine, but when I break or step into the next > > compilation unit things get messed up. > > > > Any other thoughts? > > > > On Thu, 2002-11-14 at 09:45, Fernando Nasser wrote: > > > >>Tim wrote:> I have seen this with gdb console so I don't think it is a problem with > >> > >>>insight, but perhaps someone can help me. > >>> > >>>When I'm debugging the source code lines get out of sync with the actual > >>>instructions. Why is this and more importantly how do I stop it? > >>> > >>>Thanx! > >> > >>Try compiling your program without optimization... > >> > > > -- > Fernando Nasser > Red Hat - Toronto E-Mail: fnasser@redhat.com > 2323 Yonge Street, Suite #300 > Toronto, Ontario M4P 2C9 > >