Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S271319AbTHNISx (ORCPT ); Thu, 14 Aug 2003 04:18:53 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S271742AbTHNISx (ORCPT ); Thu, 14 Aug 2003 04:18:53 -0400 Received: from [205.208.236.2] ([205.208.236.2]:15879 "EHLO applegatebroadband.net") by vger.kernel.org with ESMTP id S271319AbTHNISb (ORCPT ); Thu, 14 Aug 2003 04:18:31 -0400 Message-ID: <3F3B45B1.703@mvista.com> Date: Thu, 14 Aug 2003 01:17:53 -0700 From: George Anzinger Organization: MontaVista Software User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Sam Ravnborg CC: Thomas Schlichter , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: 2.6.0-test3-mm1 and the -g thing. References: <20030809203943.3b925a0e.akpm@osdl.org> <200308101941.33530.schlicht@uni-mannheim.de> <3F37DFDC.6080308@mvista.com> <20030813201829.GA15012@mars.ravnborg.org> In-Reply-To: <20030813201829.GA15012@mars.ravnborg.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2544 Lines: 62 Sam Ravnborg wrote: > On Mon, Aug 11, 2003 at 11:26:36AM -0700, George Anzinger wrote: > >>>that patch sets DEBUG_INFO to y by default, even if whether DEBUG_KERNEL >>>nor KGDB is enabled. The attached patch changes this to enable DEBUG_INFO >>>by default only if KGDB is enabled. >> >>Looks good to me, but.... just what does this turn on? Its been a >>long time and me thinks a wee comment here would help me remember next >>time. > > > DEBUG_INFO add "-g" to CFLAGS. > Main reason to introduce this was that many architectures always use > "-g", so a config option seemed more appropriate. > I do not agree that this should be dependent on KGDB. > To my knowledge -g is useful also without using kgdb. Yes, I see. But we have this problem you see: --- linux-2.6.0-test2-org/arch/i386/Makefile 2003-07-31 13:06:52.000000000 -0700 +++ linux/arch/i386/Makefile 2003-08-06 13:09:39.000000000 -0700 @@ -84,6 +84,9 @@ # default subarch .h files mflags-y += -Iinclude/asm-i386/mach-default +mflags-$(CONFIG_KGDB) += -gdwarf-2 +mflags-$(CONFIG_KGDB_MORE) += $(shell echo $(CONFIG_KGDB_OPTIONS) | sed -e 's/"//g') + So the -g gets set as well as -gdwarf-2. And note that the -gdwarf-2 gets set for asm code also (interesting problem there in that the line number info is for the .s file and not the .S and the .s is a tmp file to boot). But back to the -g and kgdb. I am thinking the thing to do is to force DEBUG_INFO off if KGDB is on, thus using what ever we finally decide should be after the -g. Andrew started with -gstabs then -g, then -ggdb which I am sure is the same as -gdwarf-2 (the kernel files are exactly the same size with either -ggdb or -gdwarf-2) and now, I think, he is back to -g. I want to use -gdwarf-2 since it a) clearly states what we want, and b) the new gdb uses the dwarf2 call frames and thus avoids the "bt" confusion caused by gdb not recognizing the function entry sequence generated by the newer compilers (I use gcc 3.2.1). I also expect to have dwarf call frames for the asm code some time soon, which will allow us to "bt" over interrupt and trap frames. -- George Anzinger george@mvista.com High-res-timers: http://sourceforge.net/projects/high-res-timers/ Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/