gepeppe
07-01-2008, 21:46
Salve, volevo usare gdb per il debug di programmi python su linux....Ho trovato questo link (http://www.python.org/doc/faq/it/extending/#come-si-effettua-il-debug-di-un-estensione) che spiega come fare, ho creato nella home il file .gdbinit (che non era presente nel pc!!), e ci ho aggiunto la riga br _PyImport_LoadDynamicModule.
Poi ho lanciato gdb:
> gdb /usr/bin/python
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "i586-suse-linux"...
No symbol table is loaded. Use the "file" command.
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run prog.py
Starting program: /usr/bin/python prog.py
(no debugging symbols found)
Poi continua un bel po con (no debugging symbols found) e poi mostra l'oyutput del programma. Non capisco il problema...mi aiutate?
grazie
ps ho trovato una discussione uguale sul forum, questa, (http://www.hwupgrade.it/forum/showthread.php?t=1100569) ma non ci ho capito molto!
Poi ho lanciato gdb:
> gdb /usr/bin/python
GNU gdb 6.7.1
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "i586-suse-linux"...
No symbol table is loaded. Use the "file" command.
(no debugging symbols found)
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run prog.py
Starting program: /usr/bin/python prog.py
(no debugging symbols found)
Poi continua un bel po con (no debugging symbols found) e poi mostra l'oyutput del programma. Non capisco il problema...mi aiutate?
grazie
ps ho trovato una discussione uguale sul forum, questa, (http://www.hwupgrade.it/forum/showthread.php?t=1100569) ma non ci ho capito molto!