Author Topic: How to go back after "Goto Implementation"?  (Read 12587 times)

Offline photon3108

  • Multiple posting newcomer
  • *
  • Posts: 32
How to go back after "Goto Implementation"?
« on: October 16, 2013, 03:43:13 am »
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.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How to go back after "Goto Implementation"?
« Reply #1 on: October 16, 2013, 08:24:40 am »
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.

Offline photon3108

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: How to go back after "Goto Implementation"?
« Reply #2 on: October 16, 2013, 08:46:03 am »
Sometimes "Jump back" doesn't work.
I have installed Browse Tracker. Should I click any box in View->Browse Tracker->Setting?

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How to go back after "Goto Implementation"?
« Reply #3 on: October 16, 2013, 09:09:36 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.

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2750
Re: How to go back after "Goto Implementation"?
« Reply #4 on: October 21, 2013, 07:50:11 pm »
BrowseTracker remembers only one location per half page.
 

Offline photon3108

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: How to go back after "Goto Implementation"?
« Reply #5 on: October 22, 2013, 07:12:11 am »
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".

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How to go back after "Goto Implementation"?
« Reply #6 on: October 22, 2013, 07:41:19 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.

Offline frithjofh

  • Regular
  • ***
  • Posts: 376
Re: How to go back after "Goto Implementation"?
« Reply #7 on: October 22, 2013, 12:58:12 pm »
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

Offline photon3108

  • Multiple posting newcomer
  • *
  • Posts: 32
Re: How to go back after "Goto Implementation"?
« Reply #8 on: October 23, 2013, 07:36:16 am »
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.
« Last Edit: October 24, 2013, 03:12:55 am by photon3108 »