User forums > General (but related to Code::Blocks)
Set Next Statement (Debugging)
BlackSerpent:
Hello!
I would like to know if there is a way to do "Set Next Statement" like in Visual Studio.
doing Set Next Statement is actually changing the Instruction Pointer while the program is under 'Pause'.
In a more intuitive description: Move the yellow marker to whatever line I want.
Thanks!
BlackSerpent:
to make things clear - I do not mean the "Run to Cursor". Run to cursor is some sort of a breakpoint.
for example: (a silly example showing what I mean)
--- Code: --- int k = 1;
> k = 9;
k = 19;
k = 119;
if (k==1) {...}
--- End code ---
move the > cursor to the if line, ignoring the statements above, while k keeps its original value - 1.
ollydbg:
I know what's your meaning.
I don't think it is necessary since I have using Visual Studio for over 4 years without touch this functionality.
nanyu:
as i known, we can set the next statement by modify the value of "CPU Register: eip".
but i can't add watch "$pc" in c::b. when i did it, the debug process abort.
---
and can we send cmd "jump " to gdb to set the next statement?? i don't known how to do this in c::b.
Ceniza:
I use Visual C++ and Delphi in the office, and I DO use that feature when debugging in both of them. It's handy to have it now that I started using it, when used well of course. Since I never saw it in Code::Blocks, I never felt the need :P
It's also nice that you can drag&drop the arrow to set the next instruction to be executed.
I don't know if GDB has that instruction, but that's what Google is for.
I may check today, but right now I have other things to do. If you find something, do not hesitate in posting it here.
Navigation
[0] Message Index
[#] Next page
Go to full version