codelldb icon indicating copy to clipboard operation
codelldb copied to clipboard

lldb doesn't stop on breakpoints with code, compiled by gcc from MSYS2

Open psycha0s opened this issue 3 years ago • 1 comments

OS: Windows 10 VSCode version: 1.72.2 CodeLLDB version: 1.8.1 Compiler: gcc.exe (Rev1, Built by MSYS2 project) 12.2.0 Debuggee: x86_64-w64-mingw32

The debugger doesn't stop on breakpoints. I did read the troubleshooting page on Wiki but sadly still can't figure out what's wrong here. I can't extract section information with objdump:

$ objdump -P sections ./redo.exe

./redo.exe:     file format pei-x86-64
D:\tools\msys64\mingw64\bin\objdump.exe: option -P/--private not supported by this file

I compile my project with debug information enabled (-g flag for GCC) and gdb works flawlessly, but not lldb. Maybe you could give me some additional hint what I should check? Thanks.

Verbose log
Initial debug configuration: {
  name: 'redo (lldb2)',
  type: 'lldb',
  request: 'launch',
  program: '${command:cmake.launchTargetPath}',
  cwd: '${workspaceFolder}',
  initCommands: [ 'settings set target.x86-disassembly-flavor intel' ],
  __configurationTarget: 6
}
Resolved debug configuration: {
  name: 'redo (lldb2)',
  type: 'lldb',
  request: 'launch',
  program: '${command:cmake.launchTargetPath}',
  cwd: '${workspaceFolder}',
  initCommands: [ 'settings set target.x86-disassembly-flavor intel' ],
  __configurationTarget: 6,
  terminal: 'external',
  relativePathBase: 'd:\\workspace\\libssh-test',
  _adapterSettings: {
    displayFormat: 'auto',
    showDisassembly: 'auto',
    dereferencePointers: true,
    suppressMissingSourceFiles: true,
    evaluationTimeout: 5,
    consoleMode: 'commands',
    sourceLanguages: null,
    terminalPromptClear: null,
    evaluateForHovers: true,
    commandCompletions: true,
    reproducer: false
  }
}
liblldb: d:\tools\vscode\data\extensions\vadimcn.vscode-lldb-1.8.1\lldb\bin\liblldb.dll
environment: {}
params: { evaluateForHovers: true, commandCompletions: true }
[2022-10-15T12:23:41.385Z DEBUG codelldb] New debug session
[2022-10-15T12:23:41.523Z DEBUG codelldb::dap_codec] --> {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"lldb","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true},"type":"request","seq":1}
[2022-10-15T12:23:41.523Z DEBUG codelldb::dap_codec]  {"command":"launch","arguments":{"name":"redo (lldb2)","type":"lldb","request":"launch","program":"D:\\workspace\\libssh-test\\build\\Debug\\redo.exe","cwd":"D:\\workspace\\libssh-test","initCommands":["settings set target.x86-disassembly-flavor intel"],"__configurationTarget":6,"terminal":"external","relativePathBase":"d:\\workspace\\libssh-test","_adapterSettings":{"displayFormat":"auto","showDisassembly":"auto","dereferencePointers":true,"suppressMissingSourceFiles":true,"evaluationTimeout":5,"consoleMode":"commands","sourceLanguages":null,"terminalPromptClear":null,"evaluateForHovers":true,"commandCompletions":true,"reproducer":false},"__sessionId":"69fdae79-cd88-48bb-a5c9-17df4507f841"},"type":"request","seq":2}
[2022-10-15T12:23:41.540Z DEBUG codelldb::dap_codec]  SuccessFinishResult, Error:  Success
INFO(Python) 15:23:41 formatters: Initializing
INFO(Python) 15:23:41 formatters.rust: Initializing
[2022-10-15T12:23:41.600Z DEBUG codelldb::dap_codec]  {"command":"setBreakpoints","arguments":{"source":{"name":"main.cpp","path":"d:\\workspace\\libssh-test\\main.cpp"},"lines":[70],"breakpoints":[{"line":70}],"sourceModified":false},"type":"request","seq":3}
[2022-10-15T12:23:41.618Z DEBUG codelldb::dap_codec]  {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":4}
[2022-10-15T12:23:41.627Z DEBUG codelldb::dap_codec]  {"type":"response","seq":5,"command":"runInTerminal","request_seq":6,"success":true,"body":{}}
[2022-10-15T12:23:41.632Z DEBUG codelldb::dap_codec] --> {"command":"setDataBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":6}
[2022-10-15T12:23:41.632Z DEBUG codelldb::dap_codec]  {"command":"setExceptionBreakpoints","arguments":{"filters":[]},"type":"request","seq":7}
[2022-10-15T12:23:41.650Z DEBUG codelldb::dap_codec]  {"command":"configurationDone","type":"request","seq":8}
[2022-10-15T12:23:41.665Z DEBUG codelldb::dap_codec]  {"command":"threads","type":"request","seq":9}
[2022-10-15T12:23:41.674Z DEBUG codelldb::dap_codec]  {"command":"disconnect","arguments":{"restart":false,"terminateDebuggee":false},"type":"request","seq":10}
[2022-10-15T12:23:41.834Z DEBUG codelldb::dap_codec] 

psycha0s avatar Oct 15 '22 13:10 psycha0s

#798 Similar questions

zyfjeff avatar Oct 27 '22 09:10 zyfjeff