Forum > macOS / Mac OS X

Debugger will not run macos m1

<< < (3/6) > >>

vonskie:
I provided the debug output

See above


Jonas Maebe:
You can get rid of the "XXX changed since this executable was linked, debug info will not be loaded" warnings by compiling with -Xg (use external debug symbols info).

The linker warnings about multiply_defined and macosx_version_min are harmless. I don't know why Lazarus presents them as errors, but they're not errors (otherwise no executable would have been generated).

Martin_fr:
Your first log showed that your project was compiled for x86.

What CPU do you have?
Intel X86, M1 or M2?

Typing
  lldb --version
into a terminal, which version is reported?



--- Quote from: vonskie on November 06, 2023, 08:25:50 pm ---I provided the debug output

See above

--- End quote ---

Ah, sorry. Possible that 2.2.6 has a different output from what I expected (and hence I thought it was from a different log / the debugger can log similar info to different outputs).

I expected something like (note the ">>" on many of the lines / but that may be 3.0 only)

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---(lldb) breakpoint set --func fpc_runerror -K false Breakpoint 2: no locations (pending).>> breakpoint set --func fpc_raiseexception -K false WARNING:  Unable to resolve breakpoint to any actual locations.(lldb) breakpoint set --func fpc_raiseexception -K false Breakpoint 3: where = project1`FPC_RAISEEXCEPTION, address = 0x0000000000433340>> breakpoint command add 3>> p/x $rdi>> p/x $rdx>> p ((char ***)$rdi)[0][3]>> p ((char **)$rdi)[1]>> DONE>> version(lldb) breakpoint command add 3(lldb) version>> breakpoint command add 2>> p/x $rdi>> DONE>> versionlldb version 16.0.6(lldb) breakpoint command add 2(lldb) version>> breakpoint command add 1>> p/x $rdi>> DONE>> versionlldb version 16.0.6(lldb) breakpoint command add 1(lldb) version>> process launch -nlldb version 16.0.6(lldb) process launch -nProcess 2990 launched: '/home/m/tmp/project1' (x86_64) 
It is always hard to analyse output of an older version.

Yours also misses the "breakpoint command add 3" which should be there even in the old IDE.


So in any case, your first post had output that contained "Process 3151 launched: ....."

Which means if you press pause, the "debug output" should print "process interrupt". And hopefully pause the app.

Your later post does not contain that. Which means something unexpected with lldb itself. Maybe a different lldb version. Some people reported issues (albeit different from yours) with the latest xcode (and the lldb that comes with it)

Unfortunately from here on forward, it all becomes a bit guess work.

On Mac debugging needs lldb, which is not under our control, and so if it does not behave, it can be a lot of guessing to try and find out more...



The missing "Process.. launched:" in the 2nd example may be a serious issue. If the log did not omit anything then that may be a bug in lldb which may not be easy to workaround (if at all)

The absence of the "breakpoint command add 3" is puzzling though, since this should be added by the  IDE and the output up to the point were it should be looks correct. That makes me think, that there may be something missing from the logs.

Since nothing will be fixed on 2.2.6 any longer, you need to upgrade to 3.0.RC2.
This may not fix it, but it will at least produce the latest debug-logs.

Also please try to get a different log. It may or may not work (I had repeated cases were the underlying log engine did not write the data, and yet don't know why)
Run your lazarus IDE as follows

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  /path/to/lazarus/lazarus.app/Contents/MacOS/lazarus --debug-log=/path/to/yourfiles/laz.log --debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,FPDBG_DWARF_ERRORS,FPDBG_DWARF_WARNINGS,FPDBG_DWARF_DATA_WARNINGS,DBG_VERBOSE,DBG_WARNINGS,DBG_STATE,DBG_EVENTS,DBG_THREAD_AND_FRAME,DBG_ERRORS
/path/to/lazarus/lazarus.app/ may be somewhere in your home folder if you installed packages into the IDE. Unfortunately I don't have the exact path (I don't work much on Mac).

If it works it should produce a more detailed log of the lldb interaction.

You may also want to try to uninstall and reinstall xcode, or otherwise force it to re-install itself. Or if you are on the latest xcode, try downgrading to the previous.

vonskie:
lldb-1500.0.22.8
Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)

vonskie:
Here is the debug file part based on the command


 << << TCmdLineDebugger.ReadLn "Breakpoint 1: no locations (pending)."
  TDBGInstructionQueue: Got Data, but no command running: Breakpoint 1: no locations (pending).
  << << TCmdLineDebugger.ReadLn "WARNING:  Unable to resolve breakpoint to any actual locations."
  TDBGInstructionQueue: Got Data, but no command running: WARNING:  Unable to resolve breakpoint to any actual locations.
  << << TCmdLineDebugger.ReadLn "(lldb) breakpoint set --func fpc_runerror -K false "
  TDBGInstructionQueue: Got Data, but no command running: breakpoint set --func fpc_runerror -K false
  << << TCmdLineDebugger.ReadLn "Breakpoint 2: no locations (pending)."
  TDBGInstructionQueue: Got Data, but no command running: Breakpoint 2: no locations (pending).
  << << TCmdLineDebugger.ReadLn "WARNING:  Unable to resolve breakpoint to any actual locations."
  TDBGInstructionQueue: Got Data, but no command running: WARNING:  Unable to resolve breakpoint to any actual locations.
  << << TCmdLineDebugger.ReadLn "(lldb) breakpoint set --func fpc_raiseexception -K false "
  TDBGInstructionQueue: Got Data, but no command running: breakpoint set --func fpc_raiseexception -K false
< TDebuggerIntf.UnlockRelease 1
!!! TLldbDebugger.Done;
  TDebugProcess.StopDebugProcess FDbgProcess = nil False
  DebuggerState: Setting to dsNone, from dsError
    TLldbThreads: >>ENTER: TLldbThreads.DoStateChange  New-State=dsNone
    TLldbThreads: <<EXIT: TLldbThreads.DoStateChange
    TIdeThreadsMonitor: >>ENTER: TIdeThreadsMonitor.DoStateChange  New-State=dsNone
    TIdeThreadsMonitor: <<EXIT: TIdeThreadsMonitor.DoStateChange
    TLldbCallStack: >>ENTER: TLldbCallStack.DoStateChange  New-State=dsNone
    TLldbCallStack: <<EXIT: TLldbCallStack.DoStateChange
    TIdeCallStackMonitor: >>ENTER: TIdeCallStackMonitor.DoStateChange  New-State=dsNone
    TIdeCallStackMonitor: <<EXIT: TIdeCallStackMonitor.DoStateChange
    TLldbLocals: >>ENTER: TLldbLocals.DoStateChange  New-State=dsNone
    TLldbLocals: <<EXIT: TLldbLocals.DoStateChange
    TIdeLocalsMonitor: >>ENTER: TIdeLocalsMonitor.DoStateChange  New-State=dsNone
    TIdeLocalsMonitor: <<EXIT: TIdeLocalsMonitor.DoStateChange
    TLldbRegisterSupplier: >>ENTER: TLldbRegisterSupplier.DoStateChange  New-State=dsNone
    TLldbRegisterSupplier: <<EXIT: TLldbRegisterSupplier.DoStateChange
    TIdeRegistersMonitor: >>ENTER: TIdeRegistersMonitor.DoStateChange  New-State=dsNone
    TIdeRegistersMonitor: <<EXIT: TIdeRegistersMonitor.DoStateChange
    TLldbWatches: >>ENTER: TLldbWatches.DoStateChange  New-State=dsNone
    TLldbWatches: <<EXIT: TLldbWatches.DoStateChange
    TIdeWatchesMonitor: >>ENTER: TIdeWatchesMonitor.DoStateChange  New-State=dsNone
    TIdeWatchesMonitor: <<EXIT: TIdeWatchesMonitor.DoStateChange
    DebugDataMonitor: >>ENTER: TSnapshotManager.DoStateChange  New-State=None
    DebugDataMonitor: <<EXIT: TSnapshotManager.DoStateChange
  DebuggerState: Finished dsNone
!!! TLldbDebugger.Done;
!!!!!!!!!!!!!!! TLldbDebugger.Destroy
!!! TLldbDebugger.Done;
  TDebugProcess.StopDebugProcess FDbgProcess = nil False
!!! TLldbDebugger.Done;
LAZARUS END - cleaning up ...
FreeFormEditor: FormEditor1=TFormEditor
Hint: (lazarus) [TMainIDE.Destroy] B  -> inherited Destroy... TMainIDE
Hint: (lazarus) [TMainIDE.Destroy] END

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version