From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19043 invoked by alias); 22 Mar 2013 07:37:39 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 18842 invoked by uid 89); 22 Mar 2013 07:36:38 -0000 X-Spam-SWARE-Status: No, score=-8.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 22 Mar 2013 07:36:36 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2M7aXKV011046 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Mar 2013 03:36:33 -0400 Received: from host2.jankratochvil.net (ovpn-116-42.ams2.redhat.com [10.36.116.42]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2M7aTuv020913 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Fri, 22 Mar 2013 03:36:32 -0400 Date: Fri, 22 Mar 2013 07:37:00 -0000 From: Jan Kratochvil To: Michael Haupt Cc: gdb@sourceware.org Subject: Re: "optimized out" in spite of DWARF saying otherwise? Message-ID: <20130322073628.GA16757@host2.jankratochvil.net> References: <20130321164806.GA19532@host2.jankratochvil.net> <89D4A69A-008A-4D56-9F2C-1F94AE41F62D@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <89D4A69A-008A-4D56-9F2C-1F94AE41F62D@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-03/txt/msg00068.txt.bz2 On Thu, 21 Mar 2013 21:15:20 +0100, Michael Haupt wrote: > The offending one I asked about is just a mark. There is no guarantee as to > which instruction there is at the address in question; is it "safe" to use > an extent of, say, 1, or does the instruction length govern that? At least for GDB it is OK to use length 1 and IIUC the standard also implicitly says so. GDB+GCC use a special notation for calls: Address of the call instruction is used before stepping in, call-instr-length - 1 address is used when inside the callee and then normally address of next instruction after the call one when the callee returns. Regards, Jan