Hello everyone,
I have been struggling a few days to achieve using gdb on msys2 mingw64.
In case anyone is interested, here is how I finally succeed in using gdb.
Note that I am a newbee on both autotools and pd so maybe there is a much
more straightforward way to do so.
Edit msw/Makefile.am to add -n for non stripping binaries :
...
$(SH) $(top_srcdir)/msw/msw-app.sh -n --sources --builddir $(top_builddir)
$(VERSION)
...
Type following commands
$ ./autogen.sh
$ cd build
$ ../configure --enable-debug CFLAGS="-g"
$ make
$ make app
The generated pd.exe in pd-0.53.1 directory correctly execute but with no
symbol in it. To retrieve symbol use libtool --mode=execute as follows :
$ libtool --mode=execute gdb --args pd-0.53.1/bin/pd.exe
...
Reading symbols from pd-0.53.1/bin/pd.exe...
(gdb) b main
Breakpoint 1 at 0x140001464: file ../../src/s_entry.c, line 30.
(gdb)
And this is it !
I'm using following pure-data sources :
branch master, last commit :
commit 3fde7100fcfb8fd0debb4e5f1b4c264e053a6254
Thu Apr 20 16:36:54 2023 +0200