Does anybody out there know how to use gdb to debug an extern in Linux? I have used this method: https://puredata.info/docs/developer/DebuggingPdExternals on Mac and it seems to work fine, but on my Fedora 20 system, when I run
(gdb) add-symbol-file /path/to/my_extern.pd_linux
I get the message The address where /path/to/my_extern.pd_linux has been loaded is missing
and when I tab to complete on
(gdb) attach pd.
it hits me with 60000 completions -- apparently all the symbols in Pd.
In any case, it doesn't work and when my extern crashes, pd's watchdog starts barking at me and I can't use the debugger.
I know Miller has suggested actually building the extern into Pd and doing a standard debugging session, but there has got to be a better way. Suggestions?
I've never succeeded at this but never tried really hard. My technique:
run -nrt
shuts up teh watchdog; and to get GDB to see the extern I just compile the extern into Pd itself. (Add a source file to the makefile and two lines to m_conf.c).
If soneone else knows the magic to get GDB to see symbols in a Pd extern I'd like to hear it too.
cheers Miller
On Thu, Aug 06, 2015 at 02:08:19PM -0700, David Medine wrote:
Does anybody out there know how to use gdb to debug an extern in Linux? I have used this method: https://puredata.info/docs/developer/DebuggingPdExternals on Mac and it seems to work fine, but on my Fedora 20 system, when I run
(gdb) add-symbol-file /path/to/my_extern.pd_linux
I get the message The address where /path/to/my_extern.pd_linux has been loaded is missing
and when I tab to complete on
(gdb) attach pd.
it hits me with 60000 completions -- apparently all the symbols in Pd.
In any case, it doesn't work and when my extern crashes, pd's watchdog starts barking at me and I can't use the debugger.
I know Miller has suggested actually building the extern into Pd and doing a standard debugging session, but there has got to be a better way. Suggestions?
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
As it turns out, in this case
(gdb) run -nrt
did the trick, without having to compile the extern into Pd. However, the symbols that I am concerned with and looking at are not actually in my extern but rather are in a dynamic library that the extern loads. This may be why it 'just works'. In anycase, the debugger can show me what I want to see. Thanks!
On 8/6/2015 2:33 PM, Miller Puckette wrote:
I've never succeeded at this but never tried really hard. My technique:
run -nrt
shuts up teh watchdog; and to get GDB to see the extern I just compile the extern into Pd itself. (Add a source file to the makefile and two lines to m_conf.c).
If soneone else knows the magic to get GDB to see symbols in a Pd extern I'd like to hear it too.
cheers Miller
On Thu, Aug 06, 2015 at 02:08:19PM -0700, David Medine wrote:
Does anybody out there know how to use gdb to debug an extern in Linux? I have used this method: https://puredata.info/docs/developer/DebuggingPdExternals on Mac and it seems to work fine, but on my Fedora 20 system, when I run
(gdb) add-symbol-file /path/to/my_extern.pd_linux
I get the message The address where /path/to/my_extern.pd_linux has been loaded is missing
and when I tab to complete on
(gdb) attach pd.
it hits me with 60000 completions -- apparently all the symbols in Pd.
In any case, it doesn't work and when my extern crashes, pd's watchdog starts barking at me and I can't use the debugger.
I know Miller has suggested actually building the extern into Pd and doing a standard debugging session, but there has got to be a better way. Suggestions?
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 08/06/2015 11:33 PM, Miller Puckette wrote:
I've never succeeded at this but never tried really hard. My technique:
run -nrt
shuts up teh watchdog; and to get GDB to see the extern I just compile the extern into Pd itself. (Add a source file to the makefile and two lines to m_conf.c).
If soneone else knows the magic to get GDB to see symbols in a Pd extern I'd like to hear it too.
usually i just do a dummy run of pd+external, so that gdb loads all the symbols and be done with it.
$ gdb --args pd -nrt -stderr -lib zexy [...] (gdb) run [... quit Pd immediately ...] (gdb) bp list2symbol_setup (gdb) run
gfmdsr IOhannes
PS a related question: is it only me or has ddd
(graphical frontend
for gdb) stopped working?