AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only

LLDB 22.0.0 - executable doesn't exist

  • 1.  LLDB 22.0.0 - executable doesn't exist

    Posted an hour ago
    Edited by Emanuel Reisinger an hour ago

    Hi,

    When lldb is started without absolute path it cannot load the executable on run.

    Setup:

    er@vega:/sources/er/lldb# lldb -version
    lldb version 22.0.0git (https://github.com/Dhruv-Srivastava-IBM/lldb-for-aix.git revision 17055ab537d7673e7640d0bd993c5ad1c64fe938)
      clang revision 17055ab537d7673e7640d0bd993c5ad1c64fe938
      llvm revision 17055ab537d7673e7640d0bd993c5ad1c64fe938

    er@vega:/sources/er/lldb# which lldb
    /opt/lldb/bin/lldb
    er@vega:/sources/er/lldb# ls -l /opt/lldb*
    lrwxrwxrwx    1 root     system           31 Nov 14 20:38 /opt/lldb -> /opt/lldb-aix-pre-release-1.0.x

    /opt/lldb-aix-pre-release-1.0.x:
    total 0
    drwxr-xr-x    2 root     system          256 Nov 11 11:34 bin

    er@vega:/sources/er/lldb# echo $PATH
    ...:/opt/lldb/bin:...
    er@vega:/sources/er/lldb#

    The failure:

    er@vega:/sources/er/lldb# file test
    test: executable (RISC System/6000) or object module not stripped
    er@vega:/sources/er/lldb# lldb test

    (lldb) target create "test"
    Current executable set to '/sources/er/lldb/test' (powerpc64).
    (lldb) b main
    Breakpoint 1: where = test`main + 44 at test.C:9, address = 0x000000001000074c
    (lldb) r
    error: executable doesn't exist: '(empty)'
    (lldb) q

    But when starting lldb with absolute path it works:

    er@vega:/sources/er/lldb# /opt/lldb/bin/lldb test
    (lldb) target create "test"
    Current executable set to '/sources/er/lldb/test' (powerpc64).
    (lldb) b main
    Breakpoint 1: where = test`main + 44 at test.C:9, address = 0x000000001000074c
    (lldb) r
    Process 10158724 launched: '/sources/er/lldb/test' (powerpc64)
    Process 10158724 stopped
    * thread #1, name = 'test', stop reason = breakpoint 1.1
        frame #0: 0x000000001000074c test`main(argc=1, argv=0x2ff2295000000001) at test.C:9
       6     int main(int argc, char **argv)
       7     {
       8       char text[len];
    -> 9       memset(text, 'a', len-1);
       10      text[len-1]='\0';
       11      printf("%s\n", text);
       12    }
    (lldb) q
    Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n]



    -------------------------------------------

    Emanuel Reisinger

    cargoNET // Axians ICT Austria GmbH