[llvm-bugs] [Bug 46158] New: Setting Breakpoints Dependent on Microsoft Compiler Environment

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jun 1 08:23:40 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=46158

            Bug ID: 46158
           Summary: Setting Breakpoints Dependent on Microsoft Compiler
                    Environment
           Product: lldb
           Version: 10.0
          Hardware: PC
                OS: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: info at zeusedit.com
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

This is more of a question than a bug report.

In playing with LLDB on a Windows 10 I struggled to get the breakpoints to
work.

Eventually I stumbled across the cause of the issue, which is described in the
steps below:

1. Open command line prompt:

    Microsoft Windows [Version 10.0.18363.836]
    (c) 2019 Microsoft Corporation. All rights reserved.

2. Run LLDB on a debug 'test.exe' but as shown below the breakpoints fail to
set:

    C:\Tutorial\c++>lldb.exe test.exe
    (lldb) target create "test.exe"
    Current executable set to 'C:\Tutorial\c++\test.exe' (i686).
    (lldb) b 7
    error: No selected frame to use to find the default file.
    error: No file supplied and no default file available.
    (lldb) exit

3. The command prompt used was not configured to run the Microsoft compiler:

    C:\Tutorial\c++>cl.exe
    'cl.exe' is not recognized as an internal or external command, operable
program or batch file.

4. I then setup the command prompt to run the Microsoft compiler using their
standard batch file:

    C:\Tutorial\c++>"C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\Common7\Tools\VsDevCmd.bat"
    **********************************************************************
    ** Visual Studio 2019 Developer Command Prompt v16.6.0
    ** Copyright (c) 2020 Microsoft Corporation
    **********************************************************************

5. With the command prompt configured for the Microsoft compiler:

    C:\Tutorial\c++>cl.exe
    Microsoft (R) C/C++ Optimizing Compiler Version 19.26.28805 for x86
    Copyright (C) Microsoft Corporation.  All rights reserved.

6. Now the LLDB breakpoints work as expected:

    C:\Tutorial\c++>lldb.exe test.exe
    (lldb) target create "test.exe"
    Current executable set to 'C:\Tutorial\c++\test.exe' (i686).
    (lldb) b 7
    Breakpoint 1: where = test.exe`_main + 87 at test.cpp:7, address =
0x0040b527
    (lldb) exit

So it seems the LLDB is somehow dependent of the Microsoft compiler environment
setup. Is this correct?

If so what is the actual dependency?

Cheers Jussi

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200601/eaa1faad/attachment.html>


More information about the llvm-bugs mailing list