I know that GDB can read as ~/.gdbinit as a .gdbinit present in the startup folder, but what I need is to run the gdb with a particular list of comands in order to connect to a remote server (openocd).
Actually, for OpenOCD we have a special OpenOCD Download & Run configuration - https://www.jetbrains.com/help/clion/openocd-support.html. After configuring it, you will be able to launch the debugging process just by clicking the debug button. Isn't it suitable for you?
sorry if I'm not been complete with my explanation, but my case it is a little more complex.
I'm making the ESP32 plugin (ESP32 is a espressif System On Chip). Because it is possible using openocd and gdb for debugging purpose, I would like add this feature to my plugin, creating a configuration using an existing configuration or, if not possible, a custom configuration in some way.
Running openocd it shouldn't be a problem because I saw I can select a specific configuration , but I need also start gdb (the version for ESP32 chip) with specific starting commands.
So, now you understand why I need to run an gdb instance with a specific set of commands.
I can't use .gdbinit files because those commands are shared with all the gdb instance and I should ask to the user to change/modify his file.
And for your second suggesting I think it is not applicable: I have to run gdb with the a specific set of commands and I don't see how to pass they configuring openocd.
Anyway, I very appreciate your help I will be glad if you will found a third, a fourth, .. advice.
Hello!
The ~/.gdbinit file contains GDB commands to automatically execute during GDB startup. Is that what you're looking for?
Hi Anna,
I know that GDB can read as ~/.gdbinit as a .gdbinit present in the startup folder, but what I need is to run the gdb with a particular list of comands in order to connect to a remote server (openocd).
Anyway, thanks for your answer.
Paolo
Actually, for OpenOCD we have a special OpenOCD Download & Run configuration - https://www.jetbrains.com/help/clion/openocd-support.html. After configuring it, you will be able to launch the debugging process just by clicking the debug button. Isn't it suitable for you?
Hi Anna,
sorry if I'm not been complete with my explanation, but my case it is a little more complex.
I'm making the ESP32 plugin (ESP32 is a espressif System On Chip). Because it is possible using openocd and gdb for debugging purpose, I would like add this feature to my plugin, creating a configuration using an existing configuration or, if not possible, a custom configuration in some way.
Running openocd it shouldn't be a problem because I saw I can select a specific configuration , but I need also start gdb (the version for ESP32 chip) with specific starting commands.
So, now you understand why I need to run an gdb instance with a specific set of commands.
I can't use .gdbinit files because those commands are shared with all the gdb instance and I should ask to the user to change/modify his file.
And for your second suggesting I think it is not applicable: I have to run gdb with the a specific set of commands and I don't see how to pass they configuring openocd.
Anyway, I very appreciate your help I will be glad if you will found a third, a fourth, .. advice.
Ragards,
Paolo