[issue29279] --with-pydebug optimizes too much

2017-01-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> You can override CFLAGS when default option is not fit for you.

I concur with INADA and agree that the existing defaults should be left alone 
because they've worked well for many years and they provide all tolerably fast 
result for running the entire test suite (which is important for many 
developers).

--
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29279] --with-pydebug optimizes too much

2017-01-15 Thread INADA Naoki

INADA Naoki added the comment:

I feel this is a problem of balance between speed and debugger usability.
I prefer default to -Og because:

* It's recommended by gcc for this purpose.
* --pydebug option is not only for gdb.  I use debug build to run various 
programs with many assertion.

You can override CFLAGS when default option is not fit for you.

--
nosy: +inada.naoki

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29279] --with-pydebug optimizes too much

2017-01-15 Thread Arcadiy Ivanov

Arcadiy Ivanov added the comment:

gcc (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1)
Fedora 25

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29279] --with-pydebug optimizes too much

2017-01-15 Thread Arcadiy Ivanov

New submission from Arcadiy Ivanov:

Around line 1480 of configure.ac:
if test "$Py_DEBUG" = 'true' ; then
# Optimization messes up debuggers, so turn it off for
# debug builds.
if "$CC" -v --help 2>/dev/null |grep -- -Og > /dev/null; then
OPT="-g -Og -Wall $STRICT_PROTO"
else
OPT="-g -O0 -Wall $STRICT_PROTO"
fi
else
OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
fi

The "-Og", unfortunately, optimizes too much resulting in local variables and 
arguments being optimized out:

(gdb) info locals
kwlist = {0x702c3318 "database", 0x702c3321 "timeout", 0x702c3329 
"detect_types", 0x702c3336 "isolation_level", 0x702c3346 
"check_same_thread", 0x702c3392 "factory", 0x702c3358 
"cached_statements", 
  0x702c336a "uri", 0x0}
database = 0x704f7da0 ":memory:"
detect_types = 0
isolation_level = 0x1
factory = 0x704c7dc0 
check_same_thread = 1
cached_statements = 4888694
uri = 0
timeout = 5
(gdb) info args
self = 
args = 0x7fffeff6be28
kwargs = 0x0

When "self" is optimized out it's too much optimization for debug mode.

--
components: Build
messages: 285505
nosy: arcivanov
priority: normal
severity: normal
status: open
title: --with-pydebug optimizes too much
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com