lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABexPfEdd0k9UGTJL9Ae5B=e_dDZMsTGg-LNYrOjLKzHBxuPwg@mail.gmail.com>
Date:	Mon, 2 Apr 2012 00:31:35 +0800
From:	Zhihua Che <zhihua.che@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: How can I turn off/disable -O2/-Os optimization?

Hi, everyone

    I'm debugging linux kernel using kgdb/qemu, but I find that the
execution order didn't math the program order usually.  I guess it was
because the compiling optimization. So I decided to remove -O options
in Makefiles.
    First I removed -Ox in variables HOSTCFLAGS/HOSTCXXFLAGS in
<src_root_dir>/Makefile around line 248 and -Ox in variable
KBUILD_CFLAGS in <src_root_dir>/arch/x86/boot/Makefile around line 55.
But it didn't work, the step execution still didn't follow the program
order. Then I found I missed -Ox in KBUILD_CFLAGS in
<src_root_dir>/Makefile around line 562, so I removed them, but this
time, the compiling failed, complaining
    rcupdate.h:917:2: error: size of unnamed array is negative
   And finally, after grep, I find there are a load of -O2 option are
assigned in a load of Makefiles. So, How could I disable -O
optimization for debugging?

   Thanks for any tips
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ