libdebugger: Fix #12944.hrev50529
commit584fd9619cdc9d2a8b97de2703d0e9d87fec79d8
authorRene Gollent <rene@gollent.com>
Wed, 7 Sep 2016 02:50:55 +0000 (6 22:50 -0400)
committerRene Gollent <rene@gollent.com>
Wed, 7 Sep 2016 02:56:52 +0000 (6 22:56 -0400)
tree5e14be9a09522e9502233e1fdf025f8e19ac6495
parented99a95f359befa9029c95f173b025ad2d1af1b9
libdebugger: Fix #12944.

LocatableFile:
- If there is no parent path, don't insert a path separator between parent
  and filename. This may be the case depending on how the source file was
  specified during compilation.

FileManager:
- When constructing an EntryPath from a LocatableEntry, ensure that the
  parent folder actually has a path string that isn't simply empty to ensure
  consistency with the raw dir/file case. Otherwise, hash lookups that are
  dependent on the parent dir being NULL if not specified will fail, causing
  us to not locate the file successfully. This was preventing us from updating
  source location information for make 4.2's main.c, as the latter was
  specified in such a way that the above combination of conditions would
  occur, and consequently when asking the FileManager to update the source
  location with the actual file, the entry couldn't be found in the table,
  and no information would be updated.
src/kits/debugger/files/FileManager.cpp
src/kits/debugger/files/LocatableFile.cpp