[issue11996] libpython.py: nicer py-bt output

2011-05-13 Thread STINNER Victor

STINNER Victor  added the comment:

Without any reaction from Dave Malcolm, I kept its name under the name 
"py-bt-full".

> I would also like a less verbose output for where, especially
> be able to hidden the value of the globals argument of
> PyEval_EvalCodeEx.

Well, I will maybe open a new issue for this one. But I consider that the work 
is done on this issue so I close it.

--
resolution:  -> fixed
status: open -> closed

___
Python tracker 

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



[issue11996] libpython.py: nicer py-bt output

2011-05-13 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset b340d1577dc5 by Victor Stinner in branch '3.2':
Issue #11996: libpython (gdb), replace "py-bt" command by "py-bt-full" and add
http://hg.python.org/cpython/rev/b340d1577dc5

New changeset 804abc2c60de by Victor Stinner in branch 'default':
(Merge 3.2) Issue #11996: libpython (gdb), replace "py-bt" command by
http://hg.python.org/cpython/rev/804abc2c60de

--
nosy: +python-dev

___
Python tracker 

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



[issue11996] libpython.py: nicer py-bt output

2011-05-04 Thread STINNER Victor

STINNER Victor  added the comment:

I would also like a less verbose output for where, especially be able to hidden 
the value of the globals argument of PyEval_EvalCodeEx.

Example of where output:
---
(gdb) where
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:86
#1  0x004d5ff5 in PyThread_acquire_lock_timed (lock=0xc3bc50, 
microseconds=-1, intr_flag=1)
at Python/thread_pthread.h:333
#2  0x004db97e in acquire_timed (lock=0xc3bc50, microseconds=-1) at 
./Modules/_threadmodule.c:66
#3  0x004dbbc5 in lock_PyThread_acquire_lock (self=0xafb590, args=(), 
kwds=0x0) at ./Modules/_threadmodule.c:133
#4  0x005931d6 in PyCFunction_Call (func=, arg=(), 
kw=0x0) at Objects/methodobject.c:84
#5  0x00489c6d in call_function (pp_stack=0x7fffb738, oparg=0) at 
Python/ceval.c:3859
#6  0x00484791 in PyEval_EvalFrameEx (f=
Frame 0xc52620, for file /home/haypo/prog/HG/cpython/Lib/threading.py, line 
237, in wait (self=<_Condition(release=, acquire=, _lock=<_thread.lock at remote 0xc1f1e0>, 
_waiters=[<_thread.lock at remote 0xafb590>], _verbose=False) at remote 
0xc1cbe0>, timeout=None, waiter=<_thread.lock at remote 0xafb590>, 
saved_state=None), throwflag=0) at Python/ceval.c:2657
#7  0x00487db4 in PyEval_EvalCodeEx (_co=, 
globals=
{'current_thread': , '_BoundedSemaphore': 
, '_Semaphore': , '_Timer': 
, '_format_exc': , 
'Semaphore': , 'activeCount': , '_profile_hook': None, '_sleep': , '_trace_hook': None, 'ThreadError': , '_enumerate': , '_start_new_thread': 
, 
'_CRLock': , 'BoundedSemaphore': , 'currentThread': , '__all__': 
['active_count', 'Condition', 'current_thread', 'enumerate', 'Event', 'Lock', 
'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread', 'Barrier', 'Timer', 
'setprofile', 'settrace', 'local', 'stack_size'], '_Event': , '_PyRLock': , 
pp_stack=0x7fffc418, n=1, na=1, nk=0)
at Python/ceval.c:3957
#9  0x00489e43 in call_function (pp_stack=0x7fffc418, oparg=0) at 
Python/ceval.c:3880
#10 0x00484791 in PyEval_EvalFrameEx (f=
Frame 0xbbb580, for file /home/haypo/prog/HG/cpython/Lib/threading.py, line 
851, in join (self=, 
_block=<_Condition(release=, acquire=, _lock=<_thread.lock at remote 0xc1f1e0>, 
_waiters=[<_thread.lock at remote 0xafb590>], _verbose=False) at remote 
0xc1cbe0>, _args=(), _initialized=True, _name='Thread-1', _daemonic=False, 
_kwargs={}, _stderr=<_io.TextIOWrapper at remote 0xac15a0>, 
_ident=140737330910976, _started=<_Event(_flag=True, 
_cond=<_Condition(release=, acquire=, _lock=<_thread.lock at remote 0xad7e00>, _waiters=[], 
_verbose=False) at remote 0xc1ce40>, _verbose=False) at remote 0xaec980>, 
_stopped=False, _verbose=False) at remote 0xc2fb70>, timeout=None), th
 rowflag=0) at Python/ceval.c:2657
#11 0x00487db4 in PyEval_EvalCodeEx (_co=, 
globals=
{'current_thread': , '_BoundedSemaphore': 
, '_Semaphore': , '_Timer': 
, '_format_exc': , 
'Semaphore': , 'activeCount': , '_profile_hook': None, '_sleep': , '_trace_hook': None, 'ThreadError': , '_enumerate': , '_start_new_thread': 
, 
'_CRLock': , 'BoundedSemaphore': , 'currentThread': , '__all__': 
['active_count', 'Condition', 'current_thread', 'enumerate', 'Event', 'Lock', 
'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread', 'Barrier', 'Timer', 
'setprofile', 'settrace', 'local', 'stack_size'], '_Event': , '_PyRLock': , 
pp_stack=0x7fffd0f8, n=1, na=1, nk=0)
at Python/ceval.c:3957
---

Without python-gdb.py:
---
(gdb) where
#0  sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:86
#1  0x004d5ff5 in PyThread_acquire_lock_timed (lock=0xc3bc50, 
microseconds=-1, intr_flag=1)
at Python/thread_pthread.h:333
#2  0x004db97e in acquire_timed (lock=0xc3bc50, microseconds=-1) at 
./Modules/_threadmodule.c:66
#3  0x004dbbc5 in lock_PyThread_acquire_lock (self=0xafb590, 
args=0x8977a0, kwds=0x0) at ./Modules/_threadmodule.c:133
#4  0x005931d6 in PyCFunction_Call (func=0xc670d0, arg=0x8977a0, 
kw=0x0) at Objects/methodobject.c:84
#5  0x00489c6d in call_function (pp_stack=0x7fffb738, oparg=0) at 
Python/ceval.c:3859
#6  0x00484791 in PyEval_EvalFrameEx (f=0xc52620, throwflag=0) at 
Python/ceval.c:2657
#7  0x00487db4 in PyEval_EvalCodeEx (_co=0xc32cd0, globals=0xb86dd0, 
locals=0x0, args=0xbbb728, argcount=1, 
kws=0xbbb730, kwcount=0, defs=0xc4ec28, defcount=1, kwdefs=0x0, 
closure=0x0) at Python/ceval.c:3295
#8  0x0048a26b in fast_function (func=0xc4eb60, 
pp_stack=0x7fffc418, n=1, na=1, nk=0) at Python/ceval.c:3957
#9  0x00489e43 in call_function (pp_stack=0x7fffc418, oparg=0) at 
Python/ceval.c:3880
#10 0x00484791 in PyEval_EvalFrameEx (f=0xbbb580, throwflag=0) at 
Python/ceval.c:2657
#11 0x00487db4 in PyEval_EvalCodeEx (_co=0xc282d0, globals=0xb86dd0, 
locals=0x0, args=0xc43048, argcount=1, 
kws=0xc43050, kwcount=0,

[issue11996] libpython.py: nicer py-bt output

2011-05-04 Thread STINNER Victor

New submission from STINNER Victor :

py-bt is too much verbose, I'm unable to read it.

Example:

$ gdb -args ./python -c 'import time, threading; 
threading.Thread(target=lambda:time.sleep(3)).start()'
...
[New Thread 0x769d9700 (LWP 17193)]
^C
Program received signal SIGINT, Interrupt.
sem_wait () at ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S:86
86  ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S: Aucun fichier ou 
dossier de ce type.
in ../nptl/sysdeps/unix/sysv/linux/x86_64/sem_wait.S
(gdb) py-bt
#6 Frame 0xc52620, for file /home/haypo/prog/HG/cpython/Lib/threading.py, line 
237, in wait (self=<_Condition(release=, acquire=, _lock=<_thread.lock at remote 0xc1f1e0>, 
_waiters=[<_thread.lock at remote 0xafb590>], _verbose=False) at remote 
0xc1cbe0>, timeout=None, waiter=<_thread.lock at remote 0xafb590>, 
saved_state=None)
waiter.acquire()
#10 Frame 0xbbb580, for file /home/haypo/prog/HG/cpython/Lib/threading.py, line 
851, in join (self=, 
_block=<_Condition(release=, acquire=, _lock=<_thread.lock at remote 0xc1f1e0>, 
_waiters=[<_thread.lock at remote 0xafb590>], _verbose=False) at remote 
0xc1cbe0>, _args=(), _initialized=True, _name='Thread-1', _daemonic=False, 
_kwargs={}, _stderr=<_io.TextIOWrapper at remote 0xac15a0>, 
_ident=140737330910976, _started=<_Event(_flag=True, 
_cond=<_Condition(release=, acquire=, _lock=<_thread.lock at remote 0xad7e00>, _waiters=[], 
_verbose=False) at remote 0xc1ce40>, _verbose=False) at remote 0xaec980>, 
_stopped=False, _verbose=False) at remote 0xc2fb70>, timeout=None)
self._block.wait()
#14 Frame 0xc42eb0, for file /home/haypo/prog/HG/cpython/Lib/threading.py, line 
965, in _exitfunc (self=<_MainThread(_target=None, 
_block=<_Condition(release=, acquire=, _lock=<_thread.lock at remote 0xc66290>, _waiters=[], 
_verbose=False) at remote 0xc66110>, _args=(), _initialized=True, 
_name='MainThread', _daemonic=False, _kwargs={}, _stderr=<_io.TextIOWrapper at 
remote 0xac15a0>, _ident=140737353987840, _started=<_Event(_flag=True, 
_cond=<_Condition(release=, acquire=, _lock=<_thread.lock at remote 0xc62fe0>, _waiters=[], 
_verbose=False) at remote 0xc65d20>, _verbose=False) at remote 0xc65840>, 
_stopped=True, _verbose=False) at remote 0xc64c90>, t=, _block=<_Condit
 ion(release=", line 1, in 
  File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 690, in run
  File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 737, in 
_bootstrap_inner
  File "/home/haypo/prog/HG/cpython/Lib/threading.py", line 710, in _bootstrap


--
components: Demos and Tools
files: gdb.patch
keywords: patch
messages: 135102
nosy: dmalcolm, haypo
priority: normal
severity: normal
status: open
title: libpython.py: nicer py-bt output
versions: Python 3.3
Added file: http://bugs.python.org/file21878/gdb.patch

___
Python tracker 

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