int k = 1;
> k = 9;
k = 19;
k = 119;
if (k==1) {...}
It's probably not even that hard to add to the debugger plugin, plus a button in the toolbar and a menu entry. What's missing is an icon. Visual Studio uses a blue arrow. We could use a 50% red one instead :wink:
The jump command does not change the current stack frame, or the stack(quote from gdb-docs)
pointer, or the contents of any memory location or any register other than the
program counter. If line linespec is in a different function from the one cur-
rently executing, the results may be bizarre if the two functions expect different
patterns of arguments or of local variables. For this reason, the jump command
requests confirmation if the specified line is not in the function currently exe-
cuting. However, even bizarre results are predictable if you are well acquainted
with the machine-language code of your program.
We need to parse the output of gdb and open a Yes-No-Messagebox if gdb requests confirmation.Oh please don't. Those stupid messageboxes all over are so darn annoying.
We need to parse the output of gdb and open a Yes-No-Messagebox if gdb requests confirmation.Oh please don't. Those stupid messageboxes all over are so darn annoying.
See, if someone jumps from an arbitrary location in the program to another arbitrary location, this is bound to yield unpredictable results. Every programmer should know that, since it's obvious, and if someone doesn't know, he shouldn't be programming. This is like editing memory pages of a running process in a hex editor... it may work fine, but it's an incredibly stupid thing to do, and if it blows off your right arm, then it's your own fault :)
So either the IDE should not have such a function at all, or it should require you to explicitely enable the button in the settings (with a warning, if you will). However, it should not warn you every single time you press the button, because the behaviour is so obviously undefined that you have to be able to figure yourself.