Of course, I have changed Panic handler behaviour to Invoke GDBStub before building this app.
Then I exit the screen terminal and release the serial port not to be occupied by the terminal.
Next, I execute the following command.
Code: Select all
xtensa-esp32-elf-gdb ./build/gatt_client_demo.elf -b 115200 -ex 'target remote /dev/tty.SLAB_USBtoUART'
Also attached my xtensa-esp32-elf-gdb configuration for your reference, I didn't do any change.
I am almost sure it's stuck on connecting to remote target because when I try to target remote to nonexistent port ( such as /dev/tty.SLAB_USBtoUART1 ) or the port occupied by screen terminal, it will show "/dev/tty.SLAB_USBtoUART1: No such file or directory." or "/dev/tty.SLAB_USBtoUART: Resource busy", and then it will still go to gdb session.
But in this case, just stuck and no gdb session.