From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24745 invoked by alias); 19 Oct 2006 23:20:25 -0000 Received: (qmail 24730 invoked by uid 22791); 19 Oct 2006 23:20:24 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.palmsource.com (HELO mx2.palmsource.com) (12.7.175.14) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 19 Oct 2006 23:20:22 +0000 Received: from localhost (localhost [127.0.0.1]) by localhost.domain.tld (Postfix) with ESMTP id 839C626C2D; Thu, 19 Oct 2006 16:20:21 -0700 (PDT) Received: from mx2.palmsource.com ([127.0.0.1]) by localhost (mx2.palmsource.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 30943-02-23; Thu, 19 Oct 2006 16:20:20 -0700 (PDT) Received: from ussunex01.palmsource.com (unknown [192.168.101.9]) by mx2.palmsource.com (Postfix) with ESMTP id A44E826B8F; Thu, 19 Oct 2006 16:20:20 -0700 (PDT) Received: from 192.168.92.75 ([192.168.92.75]) by ussunex01.palmsource.com ([192.168.101.9]) via Exchange Front-End Server owa.palmsource.com ([10.0.20.17]) with Microsoft Exchange Server HTTP-DAV ; Thu, 19 Oct 2006 23:20:20 +0000 Received: from svmsnyderlnx by owa.palmsource.com; 19 Oct 2006 16:20:19 -0700 Subject: Re: Breakpoints in delay slots From: Michael Snyder To: Andrew STUBBS Cc: GDB List In-Reply-To: <45374ADE.3040401@st.com> References: <453608FC.2040201@st.com> <1161197474.9942.11.camel@localhost.localdomain> <45374ADE.3040401@st.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Thu, 19 Oct 2006 23:20:00 -0000 Message-Id: <1161300019.9942.74.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00148.txt.bz2 On Thu, 2006-10-19 at 10:52 +0100, Andrew STUBBS wrote: > Michael Snyder wrote: > > Sorry to be terse, but... > > > > (1) -O0 > > Actually it can still happen that the first instruction in a line is the > nop in the delay slot, but that can be considered a compiler bug. > > > (2) "Don't do that". > > That's hardly the developer's choice. > > In the real world people sometimes have to debug optimised code and > "don't do it" is not a useful answer. Well, I know, but in some cases it's the only answer we have. There are some problems in debugging optimized code that are not soluble, or not practically soluble. Moreover, I separated (1) from (2) deliberately. In the absence of the compiler placing a delay slot at the beginning of a function or line, for the user to explicitly place a breakpoint in a delay slot can arguably be called pilot error.