[lkml]   [2008]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 4/8] kgdb: COPTIMIZE flag
    From: Jason Wessel <>

    This patch adds in the ability to unoptimize a single kernel module to
    make source stepping more linear and not optimize out variables that
    the developer might like to inspect. It used with adding
    COPTIMIZE=-O0 to the build line when doing something like a single
    kernel module only build. Or you could use it to override the default
    optimization level entirely.

    Signed-off-by: Jason Wessel <>
    Signed-off-by: Ingo Molnar <>
    Signed-off-by: Thomas Gleixner <>
    Makefile | 8 ++++++--
    1 files changed, 6 insertions(+), 2 deletions(-)

    diff --git a/Makefile b/Makefile
    index 89f2d8b..65aa7f8 100644
    --- a/Makefile
    +++ b/Makefile
    @@ -502,10 +502,14 @@ endif # $(dot-config)
    all: vmlinux

    +COPTIMIZE += -Os
    +COPTIMIZE += -O2
    +# COPTIMIZE may be overridden on the make command line with
    +# make ... COPTIMIZE=""
    +# The resulting object may be easier to debug with KGDB

    include $(srctree)/arch/$(SRCARCH)/Makefile


     \ /
      Last update: 2008-02-09 14:39    [W:0.054 / U:21.556 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site