breakpoint not hit on ppc64


I'm on a machine like this:

    Linux <MACHINENAME> #1 SMP Tue Feb 18 16:40:30 EST 2020 ppc64
ppc64 ppc64 GNU/Linux
    Red Hat Enterprise Linux Server release 7.8 (Maipo)

It seems that on PPC64 breakpoints are not able to hit, and it doesn't
matter which strategy you choose. Here's an example:

    $ scl enable llvm-toolset-9.0 bash

    $ clang++ --version
    clang version 9.0.1 (Red Hat 9.0.1-1.el7)
    Target: powerpc64-unknown-linux-gnu
    Thread model: posix
    InstalledDir: /opt/rh/llvm-toolset-9.0/root/usr/bin

    $ echo "int main() { return 42; }" > ~/42.cpp

    $ clang++ -g ~/42.cpp

Here's an example to set breakpoint by function name:

    $ lldb -x -b -o "b main" -o "run" a.out
    (lldb) target create "a.out"
    Current executable set to 'a.out' (powerpc64le).
    (lldb) b main
    Breakpoint 1: 2 locations.
    (lldb) run
    Process 3279 exited with status = 42 (0x0000002a)

    Process 3279 launched: '/root/a.out' (powerpc64le)

Please also notice that the process is identified as "powerpc64le"
even though this is a "powerpc64" machine.

The "-b" flag doesn't cause lldb to exit for some reason as well.

I hope someone with more experience than me with ppc64 can enlighten this:

Here are some findings:

* I'm testing now if the error remains to exist in LLVM master (a day
old or so). Then I will continue with looking at the findings further

* Apparently ‘target list’ gets the architecture wrong and outputs
“ppc64le” instead of “ppc64”. Tom S. found out that this is because
there’s a problem with a list of architectures that’s being search

* I found that maybe the bug was introduced by this patch but I'm
still validating this: Add initial support to PowerPC64 little endian

* I have written a test that just reproduces the wrong identification
of ppc64le instead of ppc64: