Discussion:
[Bug python/20445] New: Python-related GDB sources are built with -DNDEBUG
jan.kratochvil at redhat dot com
2016-08-07 19:34:32 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=20445

Bug ID: 20445
Summary: Python-related GDB sources are built with -DNDEBUG
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: python
Assignee: unassigned at sourceware dot org
Reporter: jan.kratochvil at redhat dot com
Target Milestone: ---

python-devel-2.7.12-1.fc24.x86_64
python3-devel-3.5.1-12.fc24.x86_64

python2-config --cflags
python3-config --cflags
contain: -DNDEBUG

This affects many GDB files due to:

# Flags needed to compile Python code
PYTHON_CFLAGS=@PYTHON_CFLAGS@

That is another Python bug but maybe GDB should again workaround it somehow.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-15 05:31:25 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=20445

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org

--- Comment #1 from Tom Tromey <tromey at sourceware dot org> ---
It seems like it should be there for release builds but not
development builds.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-16 15:59:11 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=20445

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
I have a patch, but this all seems very borderline because
gdb doesn't actually use assert anyhow.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-16 18:36:16 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=20445

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at sourceware dot org |tromey at sourceware dot org
--
You are receiving this mail because:
You are on the CC list for the bug.
cvs-commit at gcc dot gnu.org
2018-09-17 19:53:44 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=20445

--- Comment #3 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <***@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ae292b3afc0fce65c12014d2cc4621d7a0e661fd

commit ae292b3afc0fce65c12014d2cc4621d7a0e661fd
Author: Tom Tromey <***@tromey.com>
Date: Sun Sep 16 12:38:12 2018 -0600

Do not pass -DNDEBUG to Python compilations in development mode

The Python CFLAGS include -DNDEBUG. This was apparently done
intentionally -- setting the flags is done manually because, according
to a comment, python-config passes too many things to the compiler
(which is true).

Per PR python/20445, this patch changes configure so that -DNDEBUG is
only used by release builds. This probably doesn't have very much
effect in practice, but I did see that some Python headers use assert,
so perhaps it will give some safety.

Tested by rebuilding and re-running gdb.python/*.exp on x86-64 Fedora 28.

gdb/ChangeLog
2018-09-17 Tom Tromey <***@tromey.com>

PR python/20445:
* configure: Rebuild.
* configure.ac: Conditionally use -DNDEBUG for Python.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-17 14:36:39 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=20445

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |8.3

--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
Fixed.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...