[issue25460] Misc/.gdbinit uses preprocessor macro

2021-04-19 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 7a041162468b83f6cad667b78ed5c786286aed2b by Pablo Galindo in 
branch 'master':
bpo-25460: Surround suggestions by quotes (GH-25473)
https://github.com/python/cpython/commit/7a041162468b83f6cad667b78ed5c786286aed2b


--

___
Python tracker 

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



[issue25460] Misc/.gdbinit uses preprocessor macro

2021-04-19 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal
nosy_count: 2.0 -> 3.0
pull_requests: +24199
pull_request: https://github.com/python/cpython/pull/25473

___
Python tracker 

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



[issue25460] Misc/.gdbinit uses preprocessor macro

2020-11-11 Thread Irit Katriel


Change by Irit Katriel :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Some gdb macros are broken in 3.6

___
Python tracker 

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



[issue25460] Misc/.gdbinit uses preprocessor macro

2015-10-22 Thread Phil Weir

Phil Weir added the comment:

Many thanks, Victor - python-gdb does work for GDB 7 (after a little confusion 
with python/python3.6dm naming and auto-load). That is very helpful. For 
reference, can confirm the error described above for GDB 6.8 and Python 3.6 
(with DWARF-2 flags) and that the patch restores expected behaviour.

--

___
Python tracker 

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



[issue25460] Misc/.gdbinit uses preprocessor macro

2015-10-22 Thread STINNER Victor

STINNER Victor added the comment:

> GNU gdb (GDB) 7.9.50.20150218-cvs

Since you have using a recent version of gdb supporting python scripting, you 
must test python-gdb.py which is more reliable and has more features.

--
nosy: +haypo

___
Python tracker 

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



[issue25460] Misc/.gdbinit uses preprocessor macro

2015-10-22 Thread Phil Weir

New submission from Phil Weir:

When using the sample .gdbinit, use of the _PyUnicode_AsString macro gives "No 
symbol "_PyUnicode_AsString" in current context." from GDB.

This was first noticed when using downstream (Ubuntu) CPython 3.4/3.5 with 
debug symbols, and was reproduced by building current HEAD without optimization 
(to ensure co object not optimized out) 'CFLAGS="-g -O0" ./configure 
--with-pydebug && make -j2', based on instructions here [1].

This is fixable by switching _PyUnicode_AtString to PyUnicode_AsUTF8, the 
target of the macro in './Include/unicodeobject.h' (see attached patch)

1 - https://docs.python.org/devguide/setup.html#unix



TEST FILE (loop.py)
=
import time

time.sleep(100)


GDB OUTPUT WITHOUT PATCH


> gdb -args /usr/local/bin/python3.6dm loop.py

GNU gdb (GDB) 7.9.50.20150218-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/local/bin/python3.6dm...done.
(gdb) r
Starting program: /usr/local/bin/python3.6dm loop.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
^C
Program received signal SIGINT, Interrupt.
0x771df723 in select () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x771df723 in select () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x0065f9eb in pysleep (secs=1000) at 
./Modules/timemodule.c:1408
#2  0x0065d9a1 in time_sleep (self=0x76d318d8, obj=0x9ce7f0 
) at ./Modules/timemodule.c:231
#3  0x005d8c96 in call_function (pp_stack=0x7fffbde0, oparg=1) at 
Python/ceval.c:4636
#4  0x005d0a59 in PyEval_EvalFrameEx (f=0xa82198, throwflag=0) at 
Python/ceval.c:3181
#5  0x005d6154 in _PyEval_EvalCodeWithName (_co=0x77e1c280, 
globals=0x77f1de58, locals=0x77f1de58, args=0x0, argcount=0, kws=0x0, 
kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0,
name=0x0, qualname=0x0) at Python/ceval.c:3962
#6  0x005d629d in PyEval_EvalCodeEx (_co=0x77e1c280, 
globals=0x77f1de58, locals=0x77f1de58, args=0x0, argcount=0, kws=0x0, 
kwcount=0, defs=0x0, defcount=0, kwdefs=0x0, closure=0x0)
at Python/ceval.c:3983
#7  0x005c05aa in PyEval_EvalCode (co=0x77e1c280, 
globals=0x77f1de58, locals=0x77f1de58) at Python/ceval.c:777
#8  0x00428790 in run_mod (mod=0xac0968, filename=0x76dd7c08, 
globals=0x77f1de58, locals=0x77f1de58, flags=0x7fffd690, 
arena=0xade380) at Python/pythonrun.c:970
#9  0x004284c3 in PyRun_FileExFlags (fp=0xab8210, 
filename_str=0x77f0bd80 "loop.py", start=257, globals=0x77f1de58, 
locals=0x77f1de58, closeit=1, flags=0x7fffd690)
at Python/pythonrun.c:923
#10 0x004263c1 in PyRun_SimpleFileExFlags (fp=0xab8210, 
filename=0x77f0bd80 "loop.py", closeit=1, flags=0x7fffd690) at 
Python/pythonrun.c:396
#11 0x00425127 in PyRun_AnyFileExFlags (fp=0xab8210, 
filename=0x77f0bd80 "loop.py", closeit=1, flags=0x7fffd690) at 
Python/pythonrun.c:80
#12 0x00441b4b in run_file (fp=0xab8210, filename=0x9ee270 L"loop.py", 
p_cf=0x7fffd690) at Modules/main.c:318
#13 0x00442aeb in Py_Main (argc=2, argv=0x9ec020) at Modules/main.c:768
#14 0x0041c26f in main (argc=2, argv=0x7fffd948) at 
./Programs/python.c:69
(gdb) f 4
#4  0x005d0a59 in PyEval_EvalFrameEx (f=0xa82198, throwflag=0) at 
Python/ceval.c:3181
3181res = call_function(, oparg);
(gdb) pystack
No symbol "_PyUnicode_AsString" in current context.
(gdb)


GDB OUTPUT WITH PATCH
=

> gdb -args /usr/local/bin/python3.6dm loop.py 


GNU gdb (GDB) 7.9.50.20150218-cvs
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at: