I'm trying to run multiple commands on a single line, e.g
(gdb) info threads; c
Args must be numbers or '$' variables.
But it looks like gdb doesn't support so. Any ideas?
Click Start, type cmd, and press Enter to open a command prompt window. In the Windows taskbar, right-click the command prompt window icon and select Command Prompt. A second command prompt window is opened.
Run Multiple Commands Through &, &&, and || sign This will allow your second command to run after the complete execution of the first command. The second command will run as soon as the first command completely runs. It won't matter that first command has run successfully or not.
Use define
command to define your own command:
(gdb) define mycommand
Type commands for definition of "mycommand".
End with a line saying just "end".
>info threads
>c
>end
(gdb) mycommand
For detailed information, you can refer: https://sourceware.org/gdb/onlinedocs/gdb/Define.html#Define.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With