News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

How to go back after "Goto Implementation"?

Started by photon3108, October 16, 2013, 03:43:13 AM

Previous topic - Next topic

photon3108

01: int test() {
02: }
03:
04: int main() {
05:     test();
06: }

After "Goto Impelementation" at line 05, how to go back to line 05 from line 01?
It's not a good idea to use "Goto Line" or "Bookmark" because they are not convenient.

ollydbg

There is a function you can use:
Menu->View->Jump->Jump back, note: you should have browsetracker plugin installed.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

photon3108

Sometimes "Jump back" doesn't work.
I have installed Browse Tracker. Should I click any box in View->Browse Tracker->Setting?

ollydbg

Quote from: photon3108 on October 16, 2013, 08:46:03 AM
Sometimes "Jump back" doesn't work.
If the previous jump is too small, I mean you jump from the line 5 to line 1, which is only 4 lines, then I think BrowserTracker will not record the new caret position, so you can not jump back in a small jump.
I guess the minimal lines are 10 lines or more, I have not checked its source code yet. ;)
Quote
I have installed Browse Tracker. Should I click any box in View->Browse Tracker->Setting?
No.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Pecan

BrowseTracker remembers only one location per half page.

photon3108

These days, I use "Jump back" many times. It didn't always jump back the location where I jump from.
Sometimes it is near the location, sometimes not and sometimes correct. I only use "Goto Implementation".

ollydbg

Quote from: photon3108 on October 22, 2013, 07:12:11 AM
It didn't always jump back the location where I jump from.
Me to.
I suspect this is a bug, but it is not easy to reproduce this bug.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

frithjofh

hi,

maybe a stupid question, but did you edit the file before the jump? like adding or erasing a line? maybe the jump back jumps to the original line number, but not to the original line as these may have shifted...

regards
architect with some spare time  -  c::b compiled from last svn  -   openSuSE leap x86_64  -  AMD FX-4100

photon3108

#8
Anyway, it should jump back to the correct location when I do it immediately after "Goto Impelentation".
In the case, I am pretty sure that Codeblocks didn't always do it well.