improve source file lookupmaster
commit9bbcc54368f9aa94f7511018dfe93918379e1d24
authorrofl0r <rofl0r@users.noreply.github.com>
Sun, 14 Mar 2021 17:43:40 +0000 (14 17:43 +0000)
committerrofl0r <rofl0r@users.noreply.github.com>
Sun, 14 Mar 2021 17:43:40 +0000 (14 17:43 +0000)
tree664cc3e1ee7002f5bc342262a55021ded42fd184
parent8ff2e332acd7342a98ee69400bebc3318a963aa3
improve source file lookup

1) the assumption that compilation directory always is the right prefix
   for relative pathnames turned out to be false.
   for example an app might be compiled from top-level dir and compiles
   sources in src/.
2) if file is not found, and path relative, go through sources list
   again and check whether one of the sources ends with "/" + filename.
3) call "info sources" again only when everything else fails, as it might
   produce a huge list (including libc source file names) and is slow to
   process. in one case i noticed lag of several seconds.
gdb.py