This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients dmalcolm, vstinner
Date 2011-05-04.09:11:14
SpamBayes Score 0.00048924726
Marked as misclassified No
Message-id <1304500277.9.0.0254869095395.issue11996@psf.upfronthosting.co.za>
In-reply-to
Content
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  0x00000000004d5ff5 in PyThread_acquire_lock_timed (lock=0xc3bc50, microseconds=-1, intr_flag=1)
    at Python/thread_pthread.h:333
#2  0x00000000004db97e in acquire_timed (lock=0xc3bc50, microseconds=-1) at ./Modules/_threadmodule.c:66
#3  0x00000000004dbbc5 in lock_PyThread_acquire_lock (self=0xafb590, args=(), kwds=0x0) at ./Modules/_threadmodule.c:133
#4  0x00000000005931d6 in PyCFunction_Call (func=<built-in method acquire of _thread.lock object at remote 0xafb590>, arg=(), 
    kw=0x0) at Objects/methodobject.c:84
#5  0x0000000000489c6d in call_function (pp_stack=0x7fffffffb738, oparg=0) at Python/ceval.c:3859
#6  0x0000000000484791 in PyEval_EvalFrameEx (f=
    Frame 0xc52620, for file /home/haypo/prog/HG/cpython/Lib/threading.py, line 237, in wait (self=<_Condition(release=<built-in method release of _thread.lock object at remote 0xc1f1e0>, acquire=<built-in method acquire of _thread.lock object at remote 0xc1f1e0>, _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  0x0000000000487db4 in PyEval_EvalCodeEx (_co=<code at remote 0xc32cd0>, globals=
    {'current_thread': <function at remote 0xc64170>, '_BoundedSemaphore': <type at remote 0xc503d0>, '_Semaphore': <type at remote 0xc4fc50>, '_Timer': <type at remote 0xc62a90>, '_format_exc': <function at remote 0xb7ca70>, 'Semaphore': <function at remote 0xc553a0>, 'activeCount': <function at remote 0xc64a30>, '_profile_hook': None, '_sleep': <built-in method sleep of module object at remote 0xc25e70>, '_trace_hook': None, 'ThreadError': <type at remote 0x865c00>, '_enumerate': <function at remote 0xc64ad0>, '_start_new_thread': <built-in method start_new_thread of module object at remote 0xa97150>, '_CRLock': <type at remote 0x83df80>, 'BoundedSemaphore': <function at remote 0xc4e710>, 'currentThread': <function at remote 0xc64170>, '__all__': ['active_count', 'Condition', 'current_thread', 'enumerate', 'Event', 'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread', 'Barrier', 'Timer', 'setprofile', 'settrace', 'local', 'stack_size'], '_Event': <type at remote 0xc43300>, '_PyRLock': <type at remote 0xc4...(truncated), locals=0x0, args=0xbbb728, argcount=1, kws=0xbbb730, kwcount=0, defs=0xc4ec28, defcount=1, kwdefs=0x0, 
    closure=0x0) at Python/ceval.c:3295
#8  0x000000000048a26b in fast_function (func=<function at remote 0xc4eb60>, pp_stack=0x7fffffffc418, n=1, na=1, nk=0)
    at Python/ceval.c:3957
#9  0x0000000000489e43 in call_function (pp_stack=0x7fffffffc418, oparg=0) at Python/ceval.c:3880
#10 0x0000000000484791 in PyEval_EvalFrameEx (f=
    Frame 0xbbb580, for file /home/haypo/prog/HG/cpython/Lib/threading.py, line 851, in join (self=<Thread(_target=<function at remote 0xbb5d30>, _block=<_Condition(release=<built-in method release of _thread.lock object at remote 0xc1f1e0>, acquire=<built-in method acquire of _thread.lock object at remote 0xc1f1e0>, _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=<built-in method release of _thread.lock object at remote 0xad7e00>, acquire=<built-in method acquire of _thread.lock object at remote 0xad7e00>, _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), throwflag=0) at Python/ceval.c:2657
#11 0x0000000000487db4 in PyEval_EvalCodeEx (_co=<code at remote 0xc282d0>, globals=
    {'current_thread': <function at remote 0xc64170>, '_BoundedSemaphore': <type at remote 0xc503d0>, '_Semaphore': <type at remote 0xc4fc50>, '_Timer': <type at remote 0xc62a90>, '_format_exc': <function at remote 0xb7ca70>, 'Semaphore': <function at remote 0xc553a0>, 'activeCount': <function at remote 0xc64a30>, '_profile_hook': None, '_sleep': <built-in method sleep of module object at remote 0xc25e70>, '_trace_hook': None, 'ThreadError': <type at remote 0x865c00>, '_enumerate': <function at remote 0xc64ad0>, '_start_new_thread': <built-in method start_new_thread of module object at remote 0xa97150>, '_CRLock': <type at remote 0x83df80>, 'BoundedSemaphore': <function at remote 0xc4e710>, 'currentThread': <function at remote 0xc64170>, '__all__': ['active_count', 'Condition', 'current_thread', 'enumerate', 'Event', 'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Thread', 'Barrier', 'Timer', 'setprofile', 'settrace', 'local', 'stack_size'], '_Event': <type at remote 0xc43300>, '_PyRLock': <type at remote 0xc4...(truncated), locals=0x0, args=0xc43048, argcount=1, kws=0xc43050, kwcount=0, defs=0xc457a8, defcount=1, kwdefs=0x0, 
    closure=0x0) at Python/ceval.c:3295
#12 0x000000000048a26b in fast_function (func=<function at remote 0xc61e00>, pp_stack=0x7fffffffd0f8, 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  0x00000000004d5ff5 in PyThread_acquire_lock_timed (lock=0xc3bc50, microseconds=-1, intr_flag=1)
    at Python/thread_pthread.h:333
#2  0x00000000004db97e in acquire_timed (lock=0xc3bc50, microseconds=-1) at ./Modules/_threadmodule.c:66
#3  0x00000000004dbbc5 in lock_PyThread_acquire_lock (self=0xafb590, args=0x8977a0, kwds=0x0) at ./Modules/_threadmodule.c:133
#4  0x00000000005931d6 in PyCFunction_Call (func=0xc670d0, arg=0x8977a0, kw=0x0) at Objects/methodobject.c:84
#5  0x0000000000489c6d in call_function (pp_stack=0x7fffffffb738, oparg=0) at Python/ceval.c:3859
#6  0x0000000000484791 in PyEval_EvalFrameEx (f=0xc52620, throwflag=0) at Python/ceval.c:2657
#7  0x0000000000487db4 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  0x000000000048a26b in fast_function (func=0xc4eb60, pp_stack=0x7fffffffc418, n=1, na=1, nk=0) at Python/ceval.c:3957
#9  0x0000000000489e43 in call_function (pp_stack=0x7fffffffc418, oparg=0) at Python/ceval.c:3880
#10 0x0000000000484791 in PyEval_EvalFrameEx (f=0xbbb580, throwflag=0) at Python/ceval.c:2657
#11 0x0000000000487db4 in PyEval_EvalCodeEx (_co=0xc282d0, globals=0xb86dd0, locals=0x0, args=0xc43048, argcount=1, 
    kws=0xc43050, kwcount=0, defs=0xc457a8, defcount=1, kwdefs=0x0, closure=0x0) at Python/ceval.c:3295
#12 0x000000000048a26b in fast_function (func=0xc61e00, pp_stack=0x7fffffffd0f8, n=1, na=1, nk=0) at Python/ceval.c:3957
#13 0x0000000000489e43 in call_function (pp_stack=0x7fffffffd0f8, oparg=0) at Python/ceval.c:3880
#14 0x0000000000484791 in PyEval_EvalFrameEx (f=0xc42eb0, throwflag=0) at Python/ceval.c:2657
#15 0x0000000000487db4 in PyEval_EvalCodeEx (_co=0xc2f6b0, globals=0xb86dd0, locals=0x0, args=0xc2fe78, argcount=1, kws=0x0, 
    kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3295
#16 0x0000000000574aa5 in function_call (func=0xc63c70, arg=0xc2fe50, kw=0x0) at Objects/funcobject.c:629
#17 0x000000000053dd47 in PyObject_Call (func=0xc63c70, arg=0xc2fe50, kw=0x0) at Objects/abstract.c:2149
#18 0x000000000055a0ea in method_call (func=0xc63c70, arg=0xc2fe50, kw=0x0) at Objects/classobject.c:319
#19 0x000000000053dd47 in PyObject_Call (func=0xb0cde0, arg=0x8977a0, kw=0x0) at Objects/abstract.c:2149
#20 0x000000000053ded4 in call_function_tail (callable=0xb0cde0, args=0x8977a0) at Objects/abstract.c:2181
#21 0x000000000053e306 in PyObject_CallMethod (o=0xc52f40, name=0x5d57ba "_shutdown", format=0x5d4c3d "")
    at Objects/abstract.c:2258
#22 0x00000000004bfbc3 in wait_for_thread_shutdown () at Python/pythonrun.c:2208
#23 0x00000000004bad56 in Py_Finalize () at Python/pythonrun.c:386
#24 0x00000000004d92e9 in Py_Main (argc=3, argv=0x896010) at Modules/main.c:712
#25 0x0000000000419327 in main (argc=3, argv=0x7fffffffe1e8) at ./Modules/python.c:59
-------------------
History
Date User Action Args
2011-05-04 09:11:17vstinnersetrecipients: + vstinner, dmalcolm
2011-05-04 09:11:17vstinnersetmessageid: <1304500277.9.0.0254869095395.issue11996@psf.upfronthosting.co.za>
2011-05-04 09:11:15vstinnerlinkissue11996 messages
2011-05-04 09:11:15vstinnercreate