[all-commits] [llvm/llvm-project] ed7e46: [lldb] Improve error message for unrecognized exec...

Jonas Devlieghere via All-commits all-commits at lists.llvm.org
Mon Jul 8 09:29:24 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed7e46877dc7f09b5d194f87c87bfc2bebfcf27a
      https://github.com/llvm/llvm-project/commit/ed7e46877dc7f09b5d194f87c87bfc2bebfcf27a
  Author: Jonas Devlieghere <jonas at devlieghere.com>
  Date:   2024-07-08 (Mon, 08 Jul 2024)

  Changed paths:
    M lldb/include/lldb/Symbol/ObjectFile.h
    M lldb/source/Symbol/ObjectFile.cpp
    M lldb/source/Target/Platform.cpp
    M lldb/test/Shell/ObjectFile/PECOFF/invalid-export-table.yaml

  Log Message:
  -----------
  [lldb] Improve error message for unrecognized executables (#97490)

Currently, LLDB prints out a rather unhelpful error message when passed
a file that it doesn't recognize as an executable.

> error: '/path/to/file' doesn't contain any 'host' platform
> architectures: arm64, armv7, armv7f, armv7k, armv7s, armv7m, armv7em,
> armv6m, armv6, armv5, armv4, arm, thumbv7, thumbv7k, thumbv7s,
> thumbv7f, thumbv7m, thumbv7em, thumbv6m, thumbv6, thumbv5, thumbv4t,
> thumb, x86_64, x86_64, arm64, arm64e

I did a quick search internally and found at least 24 instances of users
being confused by this. This patch improves the error message when it
doesn't recognize the file as an executable, but keeps the existing
error message otherwise, i.e. when it's an object file we understand,
but the current platform doesn't support.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list