# Debug

Source: [https://docs.qualcomm.com/doc/80-Y8730-1/topic/debug_methods.html](https://docs.qualcomm.com/doc/80-Y8730-1/topic/debug_methods.html)

The following procedure showcases how to use the GDB `dump` and `restore` commands for debugging.

1. Set up the board to use CH347.

    For details about related jumper settings, see [Configure CH347 and J-Link](https://docs.qualcomm.com/doc/80-Y8730-1/topic/development_environment_setup.html#configure_ch347_and_j_link).
2. Configure and run GDB:
    1. Enter SDK\tools\jtag\openocd\ch347.
    2. Modify the gdb.gdbinit file and set the `symbol-file` parameter to the actual path of FERMION\_QCLI\_DEMO.elf.
    3. Run ch347\_openocd\_gdb.bat.
3. Use the following commands to get related information:
    1. `bt`: backtrace
    2. `info reg`: get register information
4. Use GDB dump:
    - Dump binary format:

            dump binary memory dump.bin 0x0 0xa0000Copy to clipboard
    - Dump HEX format:

            dump ihex memory dump_hex.bin 0 0xa0000Copy to clipboard
5. Use GDB restore:
    - Restore binary format:

            restore dump.bin binary 0 0 0xa0000Copy to clipboard
    - Restore HEX format:

            restore dump_hex.bin ihex 0 0 0xa0000Copy to clipboard

Last Published: Mar 18, 2026

[Previous Topic
QCLI\_DEMO usage examples](https://docs.qualcomm.com/bundle/publicresource/80-Y8730-1/topics/examples.md) [Next Topic
Frequently asked questions](https://docs.qualcomm.com/bundle/publicresource/80-Y8730-1/topics/frequently_asked_questions.md)