[all-commits] [llvm/llvm-project] 3775be: Target: correct the return value for `GetImageAddr...

Saleem Abdulrasool via All-commits all-commits at lists.llvm.org
Mon Apr 6 17:38:35 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 3775be2d8e17aaeae62ab83ded005867f4bf70ac
      https://github.com/llvm/llvm-project/commit/3775be2d8e17aaeae62ab83ded005867f4bf70ac
  Author: Saleem Abdulrasool <compnerd at compnerd.org>
  Date:   2020-04-06 (Mon, 06 Apr 2020)

  Changed paths:
    M lldb/source/Target/Process.cpp

  Log Message:
  -----------
  Target: correct the return value for `GetImageAddrFromToken`

We would return `LLDB_INVALID_IMAGE_TOKEN` for the address rather than
the correct value of `LLDB_IMAGE_ADDRESS`.  This would result in the
check for the return value to silently pass on x64 as the invalid
address and invalid token are of different sizes (`size_t` vs
`uintprr_t`).  This corrects the return value to `LLDB_INVALID_ADDRESS`
and addresses the rest to reset the mapped address to the invalid value.

This was found by inspection when trying to implement module support for
Windows.




More information about the All-commits mailing list