Have "View Code" take compilation directory into account.
The "View Code" command cannot find the source file in some situations,
although the source is correctly displayed at program stops (breakpoint,
next, ...).
For example, compile kdbg in debug mode, move the executable somewhere
else, say /var/build/debug/kdbg, then debug it:
cd /var/build/debug/kdbg; ./kdbg kdbg
The code window shows the main() function. You can add breakpoints from
that window and run step by step. Everything is OK until now. Now add a
breakpoint to SourceWindow::loadFile and click "View Code": nothing
happens.
Inspecting the code, it appears that kdbg uses some heuristics when it
comes to find out the absolute path of a relative file, which fails in
the situation. However, gdb may know where to find the source.
With this change, kdbg asks gdb with "info line".