AIX

AIX

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


#Power
#Power
 View Only
  • 1.  LLDB 22.0.0 - executable doesn't exist

    Posted Fri November 14, 2025 02:49 PM
    Edited by Emanuel Reisinger Fri November 14, 2025 02:49 PM

    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



  • 2.  RE: LLDB 22.0.0 - executable doesn't exist

    Posted Mon November 17, 2025 09:49 AM

    Hi Emanuel,

    Thank you for reaching out.

    Regarding the issues you're encountering, it appears as they are specific to 32-bit applications.

    LLDB for AIX is currently under active development, and support for debugging 32-bit applications is already planned for upcoming releases.

    In the meantime, we kindly recommend testing with 64-bit applications (using the -m64 compiler flag) to see if the issue persists. Please let us know your results-your feedback is greatly appreciated and helps us make LLDB more robust.

    Thanks,
    Hemang Gadhavi



    ------------------------------
    Hemang Gadhavi
    ------------------------------



  • 3.  RE: LLDB 22.0.0 - executable doesn't exist

    Posted Mon November 17, 2025 11:10 AM

    Hi Hemang,

    The issue still persists with 64-bit applications.

    er@paris:/sources/er/lldb# file test
    test: 64-bit XCOFF executable or object module not stripped
    er@paris:/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 + 28 at test.C:9, address = 0x000000010000091c
    (lldb) r
    error: executable doesn't exist: '(empty)'
    (lldb) q

    By the way, our applications on AIX are all built as 64-bit applications. Only for the simple test we missed the -m64 flag. But good to know that there is a difference in debugging support.

    Regards,



    ------------------------------
    Emanuel Reisinger
    Axians ICT Austria GmbH
    ------------------------------



  • 4.  RE: LLDB 22.0.0 - executable doesn't exist

    Posted Tue November 18, 2025 12:45 PM
    Edited by Dhruv Srivastava Tue November 18, 2025 12:51 PM

    Hi Emanuel,

    We are pleased to inform you that a newer version of LLDB, which includes a fix for the reported issue, is available.

    We will share this updated package with IBM Support so that you can evaluate it. Please ensure that you use the updated script included in the package for a smooth uninstallation and installation process.

    This will help ensure that the binaries are correctly placed in your environment.

    Best Regards,



    ------------------------------
    Dhruv Srivastava

    LLDB Development

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