Jump to active file on step
aolo2 opened this issue · 1 comments
aolo2 commented
There is a bug with the newly introduced directory browser feature. If I select a file, but the execution point is currently in another file, then the gf
tries to apply line numbers from one file to another.
For example:
- I step into
main()
inmain.c
(let's say it's on line 600) - I switch to another file, say
other.c
- I press F10 to step over one line
gf
tries to displayother.c:601
, intead of switching tomain.c:601
I guess to fix this you have to keep track of two files: one which is selected by the user, and one which is dictated by the exection point. Then the first one is updated from the UI (directory browser), and the second one is updated by gdb. Most importantly, if gdb says that the file is different from the user-selected one, you should switch to it.