Recent

Author Topic: Debugger will not run macos m1  (Read 11807 times)

vonskie

  • Full Member
  • ***
  • Posts: 186
Debugger will not run macos m1
« on: November 06, 2023, 04:24:47 pm »

error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/wsdialogs.o" changed (actual: 0x654902a4, debug map: 0x6547413b) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/wschecklst.o" changed (actual: 0x654902a2, debug map: 0x65474139) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/wscalendar.o" changed (actual: 0x654902a7, debug map: 0x6547413e) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/cocoa/cocoatabcontrols.o" changed (actual: 0x654902b6, debug map: 0x6547414d) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/cocoa/cocoadatepicker.o" changed (actual: 0x654902b6, debug map: 0x6547414d) since this executable was linked, debug info will not be loaded
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) breakpoint set --func fpc_runerror -K false
Breakpoint 2: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) breakpoint set --func fpc_raiseexception -K false
Breakpoint 3: where = ELSIEasyCleaner`FPC_RAISEEXCEPTION, address = 0x00000001000182d0
(lldb) process launch -n
Process 3151 launched: '/Users/admin/Documents/MLD2 6 3/ELSIEasyCleaner.app/Contents/MacOS/ELSIEasyCleaner' (x86_64)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Debugger will not run macos m1
« Reply #1 on: November 06, 2023, 04:56:49 pm »
Unless you are trying to debug into the LCL the warnings can be ignored. Well, so long as no such warnings for the units in your project are given.

You may be able to get rid of those "changed" warnings by recompiling clean => that may mean to recompile the LCL via its package dialog.

I don't know (from memory) what it is trying to set as "breakpoint 1", but I think it is "fpc_break_error" => It is no problem if it is pending (It may affect if/how run errors are reported, but it does not affect if/how your app starts in the debugger).

So the last line from your log says that your app was launched. Then from that I can not see what the issue is? (Unless it is that all is fine, except you can't step into the LCL)

vonskie

  • Full Member
  • ***
  • Posts: 186
Debugging not work on m1 please assist
« Reply #2 on: November 06, 2023, 05:18:28 pm »
Getting this error how to resolve
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/cocoa/cocoawsdatepicker.o" changed (actual: 0x654902b6, debug map: 0x6547414e) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/wsspin.o" changed (actual: 0x654902ad, debug map: 0x65474144) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/wspairsplitter.o" changed (actual: 0x654902ac, debug map: 0x65474143) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/buttonpanel.o" changed (actual: 0x654902a4, debug map: 0x6547413b) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/lcltaskdialog.o" changed (actual: 0x654902a4, debug map: 0x6547413b) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/wsdialogs.o" changed (actual: 0x654902a4, debug map: 0x6547413b) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/wschecklst.o" changed (actual: 0x654902a2, debug map: 0x65474139) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/wscalendar.o" changed (actual: 0x654902a7, debug map: 0x6547413e) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/cocoa/cocoatabcontrols.o" changed (actual: 0x654902b6, debug map: 0x6547414d) since this executable was linked, debug info will not be loaded
error: ELSIEasyCleaner debug map object file "/Applications/Lazarus/lcl/units/x86_64-darwin/cocoa/cocoadatepicker.o" changed (actual: 0x654902b6, debug map: 0x6547414d) since this executable was linked, debug info will not be loaded
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) breakpoint set --func fpc_runerror -K false
Breakpoint 2: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) breakpoint set --func fpc_raiseexception -K false
Breakpoint 3: where = ELSIEasyCleaner`FPC_RAISEEXCEPTION, address = 0x00000001000182d0
(lldb) process launch -n

vonskie

  • Full Member
  • ***
  • Posts: 186
Re: Debugger will not run macos m1
« Reply #3 on: November 06, 2023, 05:30:26 pm »
It runs but the debugger does not attach to it. (assuming)

I have it running at home just fine just not at work.

Not sure what is going on.




Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Debugger will not run macos m1
« Reply #4 on: November 06, 2023, 05:38:28 pm »
It runs but the debugger does not attach to it. (assuming)

I have it running at home just fine just not at work.

Not sure what is going on.

Very important: Which version of Lazarus? And can you try with 3.0RC2?

So that means the app starts, but it does not stop at your breakpoint? Does the color/icon of the breakpoint change?

Please describe exactly what happens.
- You use F9?
- You have breakpoints?
- Your app starts
- You try to hit the pause button?
- You add breakpoints once the app is already running?
...


Please go to menu: View > Ide Internals > Debug Output
This will open a Window in the IDE.
Once that Window is open:
- start your app in the debugger
- do whatever else you try before the error happens (If anything)

when the error has happened, then please copy the entire content of that window (privacy note: this may contain identifier/source names from your app).

vonskie

  • Full Member
  • ***
  • Posts: 186
Re: Debugger will not run macos m1
« Reply #5 on: November 06, 2023, 05:48:21 pm »
2.2.6

I do not see any break points.


vonskie

  • Full Member
  • ***
  • Posts: 186
Re: Debugger will not run macos m1
« Reply #6 on: November 06, 2023, 05:51:11 pm »
Once its starts I can not pause it or anything like the debugger is not attached

I can exit out of the app using the X of course

vonskie

  • Full Member
  • ***
  • Posts: 186
Re: Debugger will not run macos m1
« Reply #7 on: November 06, 2023, 05:53:02 pm »
Compile Project, Target: ELSIEasyCleaner: Success, Errors: 4
Error: ld: warning: -multiply_defined is obsolete
Error: -macosx_version_min has been renamed to -macos_version_min
Error: ld: warning: ignoring duplicate libraries: '-lc'
Error: ld: warning: no platform load command found in '/Users/admin/Documents/MLD2 6 3/lib/x86_64-darwin/ELSIEasyCleaner.or', assuming: macOS

O get tjese errors too but it runs.

vonskie

  • Full Member
  • ***
  • Posts: 186
Re: Debugger will not run macos m1
« Reply #8 on: November 06, 2023, 05:58:23 pm »
Tried 3rc2 same thing debugger error

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Debugger will not run macos m1
« Reply #9 on: November 06, 2023, 06:39:26 pm »
Once its starts I can not pause it or anything like the debugger is not attached

I can exit out of the app using the X of course

Ok, please provide the "debug output" for starting the app, until you press the pause-button.


Also, what happens if you set a breakpoint before you start the app? Will the breakpoint pause the app?

vonskie

  • Full Member
  • ***
  • Posts: 186
Re: Debugger will not run macos m1
« Reply #10 on: November 06, 2023, 08:25:50 pm »
I provided the debug output

See above



Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1067
Re: Debugger will not run macos m1
« Reply #11 on: November 06, 2023, 08:43:42 pm »
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

  • Administrator
  • Hero Member
  • *
  • Posts: 10553
  • Debugger - SynEdit - and more
    • wiki
Re: Debugger will not run macos m1
« Reply #12 on: November 06, 2023, 09:26:20 pm »
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?




I provided the debug output

See above

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  [Select][+][-]
  1. (lldb) breakpoint set --func fpc_runerror -K false
  2. Breakpoint 2: no locations (pending).
  3. >> breakpoint set --func fpc_raiseexception -K false
  4. WARNING:  Unable to resolve breakpoint to any actual locations.
  5. (lldb) breakpoint set --func fpc_raiseexception -K false
  6. Breakpoint 3: where = project1`FPC_RAISEEXCEPTION, address = 0x0000000000433340
  7. >> breakpoint command add 3
  8. >> p/x $rdi
  9. >> p/x $rdx
  10. >> p ((char ***)$rdi)[0][3]
  11. >> p ((char **)$rdi)[1]
  12. >> DONE
  13. >> version
  14. (lldb) breakpoint command add 3
  15. (lldb) version
  16. >> breakpoint command add 2
  17. >> p/x $rdi
  18. >> DONE
  19. >> version
  20. lldb version 16.0.6
  21. (lldb) breakpoint command add 2
  22. (lldb) version
  23. >> breakpoint command add 1
  24. >> p/x $rdi
  25. >> DONE
  26. >> version
  27. lldb version 16.0.6
  28. (lldb) breakpoint command add 1
  29. (lldb) version
  30. >> process launch -n
  31. lldb version 16.0.6
  32. (lldb) process launch -n
  33. Process 2990 launched: '/home/m/tmp/project1' (x86_64)
  34.  

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  [Select][+][-]
  1.   /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.
« Last Edit: November 06, 2023, 09:38:21 pm by Martin_fr »

vonskie

  • Full Member
  • ***
  • Posts: 186
Re: Debugger will not run macos m1
« Reply #13 on: November 07, 2023, 07:46:58 pm »
lldb-1500.0.22.8
Apple Swift version 5.9 (swiftlang-5.9.0.128.108 clang-1500.0.40.1)

vonskie

  • Full Member
  • ***
  • Posts: 186
Re: Debugger will not run macos m1
« Reply #14 on: November 07, 2023, 07:59:56 pm »
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

 

TinyPortal © 2005-2018