From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4956 invoked by alias); 20 Jul 2006 15:21:29 -0000 Received: (qmail 4943 invoked by uid 22791); 20 Jul 2006 15:21:29 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 20 Jul 2006 15:21:26 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k6KFLOwT027648; Thu, 20 Jul 2006 11:21:24 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k6KFLNAr020937; Thu, 20 Jul 2006 11:21:23 -0400 Received: from touchme.toronto.redhat.com (IDENT:postfix@touchme.toronto.redhat.com [172.16.14.9]) by pobox.toronto.redhat.com (8.12.8/8.12.8) with ESMTP id k6KFLNPh000923; Thu, 20 Jul 2006 11:21:23 -0400 Received: from ton.toronto.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 32A0B800002; Thu, 20 Jul 2006 11:21:23 -0400 (EDT) Received: from ton.toronto.redhat.com (localhost.localdomain [127.0.0.1]) by ton.toronto.redhat.com (8.13.1/8.13.1) with ESMTP id k6KFLNkJ002760; Thu, 20 Jul 2006 11:21:23 -0400 Received: (from fche@localhost) by ton.toronto.redhat.com (8.13.1/8.13.1/Submit) id k6KFLM6u002757; Thu, 20 Jul 2006 11:21:22 -0400 To: kernel-hacker@bennee.com Cc: gdb@sources.redhat.com Subject: Re: Gcc options for improving debugging? References: <1153308778.9831.49.camel@okra.transitives.com> From: fche@redhat.com (Frank Ch. Eigler) Date: Thu, 20 Jul 2006 16:11:00 -0000 In-Reply-To: <1153308778.9831.49.camel@okra.transitives.com> Message-ID: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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-07/txt/msg00141.txt.bz2 Alex Bennee writes: > By default we build our software with -O3 which brings in a host of > optimisations which make following code in GDB a pain. [...] > An alternate approach is to compile with -O3 but turn off specific > optimisations which make life tricky for gdb. [...] There is an increasing appreciation in gcc land for the need to debug fully optimized programs, which is manifesting itself with gradual improvements in the quality of debugging information gcc emits. For those cases where the data is outright missing or incorrect, you will get more sympathy for such bug reports than perhaps in the past. None of that may actually unravel inherent phenomena such as "funky execution order" or "compressed backtraces", but they should improve accurate visibility of those source-level constructs that survive into the binary stage. - FChE