From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6534 invoked by alias); 22 Nov 2003 09:26:18 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 6526 invoked from network); 22 Nov 2003 09:26:14 -0000 Received: from unknown (HELO calvin.codito.com) (203.199.140.162) by sources.redhat.com with SMTP; 22 Nov 2003 09:26:14 -0000 Received: from codito.com (numenor.codito.co.in [192.168.100.52]) by calvin.codito.com (8.12.8/8.12.5) with ESMTP id hAM9Ox2R013713; Sat, 22 Nov 2003 14:55:03 +0530 Message-ID: <3FBF2C47.3030901@codito.com> Date: Sat, 22 Nov 2003 09:26:00 -0000 From: Ramana Radhakrishnan User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "Manoj Verma, Noida" , gdb@sources.redhat.com Subject: Re: remote debugging packets References: <1B3885BC15C7024C845AAC78314766C5010336EC@EXCH-01> In-Reply-To: <1B3885BC15C7024C845AAC78314766C5010336EC@EXCH-01> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-11/txt/msg00214.txt.bz2 Manoj Verma, Noida wrote: >Do you mean to indicate that the debugger may not stop at line #YY in this >case? > > Since line xx and yy match to the same pc, only one breakpoint can be set and it would hit only once. It would be equivalent to putting duplicate breakpoints. This is because your architecture seems to have this loop instruction. cheers Ramana > > >>-----Original Message----- >>From: Mark Salter [mailto:msalter@redhat.com] >>Sent: Friday, November 21, 2003 9:37 PM >>To: manojv@noida.hcltech.com >>Cc: gdb@sources.redhat.com >>Subject: Re: remote debugging packets >> >> >> >> >>>>>>>Manoj Verma, Noida writes: >>>>>>> >>>>>>> >>>Let me explain my concern in this way... >>>I have following C snippet: >>> >>> >>>... >>>for(i=0; i<100; i++) // say line #xx >>> *b0++ = *b1++; // say line #yy >>>... >>> >>> >>>and the assembly instruction corresponding to it is: >>> >>> >>>... >>>lc = 100; >>>rep(lc) *b0++ = *b1++; >>>... >>> >>> >>>I set the breakpoint to both of these lines xx & yy. >>> >>> >>>Now when I am at XX, I say 'Continue'. If it steps first >>> >>> >>then it comes to >> >> >>>line #yy. Then if it continues, then I will not see my >>> >>> >>program stopping at >> >> >>>YY where it should. >>> >>> >>>Or is it like, before proceeding from line #YY the debugger >>> >>> >>looks for some >> >> >>>traps present at that particular line and then continues.. >>> >>> >>>Pl. correct me if I am wrong. >>> >>> >>If compiler optimization causes the loop to be executed as a >>single machine instruction (as in your example), then there is >>nothing GDB can do about it. GDB's behavior would be to stop >>after the loop finishes because the loop is actually one machine >>instruction. This seems reasonable to me. >> >>--Mark >> >> >>