Re: 2.6.0-test3-mm1 and the -g thing.

From: George Anzinger (george_at_mvista.com)
Date: 08/14/03

  • Next message: Felipe Alfaro Solana: "Re: 2.6.0-test3-mm2: Badness in class_dev_release at drivers/base/class.c"
    Date:	Thu, 14 Aug 2003 01:17:53 -0700
    To: Sam Ravnborg <sam@ravnborg.org>
    
    

    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/
    

  • Next message: Felipe Alfaro Solana: "Re: 2.6.0-test3-mm2: Badness in class_dev_release at drivers/base/class.c"

    Relevant Pages

    • Re: KGDB 2.0.3 with fixes and development in ethernet interface
      ... gdb log for ethernet interface is pasted below. ... >>handling will have to changed to be have kgdb specific buffers. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: kgdb for mainline kernel: core-lite [patch 1/3]
      ... current on ANY cpu and send up the regs that switch to saved in the task struct. ... GDB can then figure out the rest from the dwarft2 frames. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: kgdb support in vanilla 2.6.2
      ... > That assumes that one can do a printk and not run into a lock. ... > provide a gdb macro to print the relevant source line and its surrounds. ... indication of kgdb being ready. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: kgdb support in vanilla 2.6.2
      ... >>provide a gdb macro to print the relevant source line and its surrounds. ... > indication of kgdb being ready. ... 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/ ...
      (Linux-Kernel)
    • Re: PPC KGDB changes and some help?
      ... I think kgdb should take control on oops, ... tried to connect to gdb as part of configuring the interface. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)

    Loading