1

I'm experiencing the Heisenbug on my program and this post suggested me to execute the command set disable-randomization off into GDB. However, I have no idea how to execute a GDB command in CLion and when I should do so. The GDB tab in the debugging remain uneditable when I try to copy paste my command.

How can I execute my command? Do I need to debug without CLion?

ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
Winter
  • 3,894
  • 7
  • 24
  • 56
  • 1
    I'd recommend learning to use GDB from the command line. GDB is very old and nearly ubiquitous, much like vi/vim. It was originally a command-line only tool, and all the graphical front-ends and IDE integration came later. Whatever it is in CLion that is preventing you from issuing GDB commands directly is unlikely to affect your ability to issue those commands in the command line interface. – Mike Holt Jul 31 '17 at 20:50
  • There's no way to execute a custom GDB command prior to launching the debugger yet, unfortunately. As a workaround, you can add this command to your `~/.gdbinit` file. – Eldar Abusalimov Aug 01 '17 at 08:29
  • @EldarAbusalimov Created the file and added the command but nothing changed. How can I check if gdb has successfully executed my command? – Winter Aug 01 '17 at 12:24
  • 1
    @Winter After starting debug session, pause the execution so that GDB console view becomes editable, and execute "show disable-randomization" there. It should report `off`, if everything goes well and GDB reads `~/.gdbinit`. – Eldar Abusalimov Aug 01 '17 at 13:35

1 Answers1

0

In debug mode, you can enter LLDB (presumably also GDB) commands using the following interface

enter image description here

ilciavo
  • 3,069
  • 7
  • 26
  • 40