Recent

Author Topic: (Solved) MacOSX on M1 , LLDB issue  (Read 942 times)

powerpcer

  • Full Member
  • ***
  • Posts: 100
(Solved) MacOSX on M1 , LLDB issue
« on: September 10, 2022, 01:03:22 pm »
after i follow the https://wiki.freepascal.org/Installing_Lazarus_on_macOS
section: Step 5: Configure the Debugger
but when i ran my program, it shows me:
"the debugger entered the error state"  "lldb"

Lazarus version 2.3.0
FPC 3.3.1
« Last Edit: September 10, 2022, 05:10:14 pm by powerpcer »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9874
  • Debugger - SynEdit - and more
    • wiki
Re: MacOSX on M1 , LLDB issue
« Reply #1 on: September 10, 2022, 01:34:46 pm »
Please
- Start the IDE
- Go to Menu: View > IDE Internals > Debug Output => open that window
- Run / F9

Then copy the content of the "Debug Output"



Also the "error state" window, should have a more button. Press it, and copy the info.

powerpcer

  • Full Member
  • ***
  • Posts: 100
Re: MacOSX on M1 , LLDB issue
« Reply #2 on: September 10, 2022, 02:52:23 pm »
Here you are
Code: Pascal  [Select][+][-]
  1. >> settings set -- frame-format "frame #${frame.index}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME\n"
  2. (lldb) settings set -- frame-format "frame #${frame.index}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME\n"
  3. >> settings set -- thread-format "thread #${thread.index}: tid=${thread.id%tid}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME{, stop reason = ${thread.stop-reason}}\n"
  4. (lldb) settings set -- thread-format "thread #${thread.index}: tid=${thread.id%tid}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME{, stop reason = ${thread.stop-reason}}\n"
  5. >> settings set -- thread-stop-format "thread #${thread.index}: tid=${thread.id%tid}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME{, stop reason = ${thread.stop-reason}}\n"
  6. (lldb) settings set -- thread-stop-format "thread #${thread.index}: tid=${thread.id%tid}: ${frame.pc}, {${frame.sp}}, {${frame.fp}} &&//FULL: {${line.file.fullpath}} &&//SHORT: {${line.file.basename}} &&//LINE: {${line.number}} &&//MOD: {${module.file.basename}} &&//FUNC: {${function.name-with-args}} <<&&//FRAME{, stop reason = ${thread.stop-reason}}\n"
  7. >> target stop-hook add -o "thread list"
  8. (lldb) target stop-hook add -o "thread list"
  9. Stop hook #1 added.
  10. >> settings set -- stop-line-count-after 0
  11. (lldb) settings set -- stop-line-count-after 0
  12. >> settings set -- stop-line-count-before 0
  13. (lldb) settings set -- stop-line-count-before 0
  14. >> settings set -- stop-disassembly-count 0
  15. (lldb) settings set -- stop-disassembly-count 0
  16. >> settings set -- target.env-vars "USER=terrylou"
  17. (lldb) settings set -- target.env-vars "USER=terrylou"
  18. >> settings set -- target.env-vars "__CFBundleIdentifier=lazarus.freepascal.ide"
  19. (lldb) settings set -- target.env-vars "__CFBundleIdentifier=lazarus.freepascal.ide"
  20. >> settings set -- target.env-vars "COMMAND_MODE=unix2003"
  21. (lldb) settings set -- target.env-vars "COMMAND_MODE=unix2003"
  22. >> settings set -- target.env-vars "LOGNAME=terrylou"
  23. (lldb) settings set -- target.env-vars "LOGNAME=terrylou"
  24. >> settings set -- target.env-vars "PATH=/usr/bin:/bin:/usr/sbin:/sbin"
  25. (lldb) settings set -- target.env-vars "PATH=/usr/bin:/bin:/usr/sbin:/sbin"
  26. >> settings set -- target.env-vars "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.2CLBlN0mvq/Listeners"
  27. (lldb) settings set -- target.env-vars "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.2CLBlN0mvq/Listeners"
  28. >> settings set -- target.env-vars "SHELL=/bin/zsh"
  29. (lldb) settings set -- target.env-vars "SHELL=/bin/zsh"
  30. >> settings set -- target.env-vars "HOME=/Users/terrylou"
  31. (lldb) settings set -- target.env-vars "HOME=/Users/terrylou"
  32. >> settings set -- target.env-vars "__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x2"
  33. (lldb) settings set -- target.env-vars "__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x2"
  34. >> settings set -- target.env-vars "TMPDIR=/var/folders/_1/06b2vf514jzcvlvwt1vc979w0000gn/T/"
  35. (lldb) settings set -- target.env-vars "TMPDIR=/var/folders/_1/06b2vf514jzcvlvwt1vc979w0000gn/T/"
  36. >> settings set -- target.env-vars "XPC_SERVICE_NAME=application.lazarus.freepascal.ide.18495974.18503029"
  37. (lldb) settings set -- target.env-vars "XPC_SERVICE_NAME=application.lazarus.freepascal.ide.18495974.18503029"
  38. >> settings set -- target.env-vars "XPC_FLAGS=0x0"
  39. (lldb) settings set -- target.env-vars "XPC_FLAGS=0x0"
  40. >> settings set -- target.env-vars "DISPLAY=:0"
  41. (lldb) settings set -- target.env-vars "DISPLAY=:0"
  42. >> target create /Users/terrylou/Desktop/mac_backup/cudatext-src/src/CudaText/CudaText-master/app/builds/macos-cocoa/CodaText.app
  43. (lldb) target create /Users/terrylou/Desktop/mac_backup/cudatext-src/src/CudaText/CudaText-master/app/builds/macos-cocoa/CodaText.app
  44. Current executable set to '/Users/terrylou/Desktop/mac_backup/cudatext-src/src/CudaText/CudaText-master/app/builds/macos-cocoa/CodaText.app' (arm64).
  45. >> settings clear target.run-args
  46. (lldb) settings clear target.run-args
  47. >> breakpoint set --func fpc_break_error -K false
  48. (lldb) breakpoint set --func fpc_break_error -K false
  49. Breakpoint 1: no locations (pending).
  50. >> breakpoint set --func fpc_runerror -K false
  51. WARNING:  Unable to resolve breakpoint to any actual locations.
  52. (lldb) breakpoint set --func fpc_runerror -K false
  53. Breakpoint 2: no locations (pending).
  54. >> breakpoint set --func fpc_raiseexception -K false
  55. WARNING:  Unable to resolve breakpoint to any actual locations.
  56. (lldb) breakpoint set --func fpc_raiseexception -K false
  57. Breakpoint 3: where = CodaText`FPC_RAISEEXCEPTION, address = 0x00000001000104e0
  58. >> breakpoint command add 3
  59. >> p/x $x0
  60. >> p/x $x2
  61. >> p ((char ***)$x0)[0][3]
  62. >> p ((char **)$x0)[1]
  63. >> DONE
  64. >> version
  65. (lldb) breakpoint command add 3
  66. (lldb) version
  67. >> breakpoint command add 2
  68. >> p/x $x0
  69. >> DONE
  70. >> version
  71. lldb-1316.0.9.46
  72. Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
  73. (lldb) breakpoint command add 2
  74. (lldb) version
  75. >> breakpoint command add 1
  76. >> p/x $x0
  77. >> DONE
  78. >> version
  79. lldb-1316.0.9.46
  80. Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
  81. (lldb) breakpoint command add 1
  82. (lldb) version
  83. >> breakpoint set --file cudatext.lpr --line 37
  84. lldb-1316.0.9.46
  85. Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
  86. (lldb) breakpoint set --file cudatext.lpr --line 37
  87. Breakpoint 4: no locations (pending).
  88. >> breakpoint set --file atstreamsearch.pas --line 542
  89. WARNING:  Unable to resolve breakpoint to any actual locations.
  90. (lldb) breakpoint set --file atstreamsearch.pas --line 542
  91. error: CodaText {0x017215f3}: unhandled type tag 0x0020 (DW_TAG_set_type), please file a bug and attach the file at the start of this error message
  92. Breakpoint 5: where = CodaText`TEXTFIND + 1540 at atstreamsearch.pas:542:9, address = 0x00000001003c9194
  93. >> breakpoint set --file atbinhex_strproc.pas --line 120
  94. (lldb) breakpoint set --file atbinhex_strproc.pas --line 120
  95. Breakpoint 6: where = CodaText`SFINDTEXT + 600 at atbinhex_strproc.pas:120:9, address = 0x00000001003c9a68
  96. >> breakpoint set --file formmain_updates_proc.inc --line 984
  97. (lldb) breakpoint set --file formmain_updates_proc.inc --line 984
  98. Breakpoint 7: where = CodaText`UpdateTree + 316 at formmain_updates_proc.inc:984:40, address = 0x000000010007d5cc
  99. >> breakpoint set --file atstrings_editing.inc --line 104
  100. (lldb) breakpoint set --file atstrings_editing.inc --line 104
  101. Breakpoint 8: where = CodaText`TEXTINSERT + 116 at atstrings_editing.inc:104:10, address = 0x0000000100383394
  102. >> process launch -n
  103. (lldb) process launch -n
  104. Process 14670 launched: '/Users/terrylou/Desktop/mac_backup/cudatext-src/src/CudaText/CudaText-master/app/builds/macos-cocoa/CodaText.app/Contents/MacOS/CodaText' (arm64)
  105. Process 14670 stopped
  106. * thread #1: tid=0x7f9c4: 0x0000000100383394, 0x000000016fdfe960, 0x000000016fdfec40 &&//FULL: /Users/terrylou/Desktop/mac_backup/cudatext-src/src/ATSynEdit/ATSynEdit-master/atsynedit/atstrings_editing.inc &&//SHORT: atstrings_editing.inc &&//LINE: 104 &&//MOD: CodaText &&//FUNC: TEXTINSERT(this=0x0000000107f59900, AX=0, AY=0, ATEXT=0x0000000107f7a7b0, AOVERWRITE=false, ASHIFT=(X = 0, Y = 0), APOSAFTER=(X = 0, Y = 0)) <<&&//FRAME, stop reason = breakpoint 8.1
  107.   thread #2: tid=0x7f9e2: 0x00000001ac8c472c, 0x000000016fe86fc0, 0x000000016fe86fe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  108.   thread #3: tid=0x7f9e3: 0x00000001ac8c472c, 0x000000016ff12fc0, 0x000000016ff12fe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  109.   thread #4: tid=0x7f9f6: 0x00000001ac8c472c, 0x000000016ff9eb30, 0x000000016ff9eb50 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  110.   thread #5: tid=0x7f9ff: 0x00000001ac8c472c, 0x000000017002afc0, 0x000000017002afe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  111.   thread #6: tid=0x7fa00: 0x00000001ac8c472c, 0x00000001700b6fc0, 0x00000001700b6fe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  112.   thread #7: tid=0x7fa01: 0x00000001ac8c472c, 0x0000000170142fc0, 0x0000000170142fe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  113.   thread #8: tid=0x7fa02: 0x00000001ac8c472c, 0x00000001701cefc0, 0x00000001701cefe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  114.   thread #9: tid=0x7fa03: 0x00000001ac8c28b0, 0x0000000170259eb0, 0x0000000170259f00 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: mach_msg_trap <<&&//FRAME
  115. This version of LLDB has no plugin for the language "pascal83". Inspection of frame variables will be limited.
  116. Process 14670 stopped
  117. * thread #1: tid=0x7f9c4: 0x0000000100383394, 0x000000016fdfe960, 0x000000016fdfec40 &&//FULL: /Users/terrylou/Desktop/mac_backup/cudatext-src/src/ATSynEdit/ATSynEdit-master/atsynedit/atstrings_editing.inc &&//SHORT: atstrings_editing.inc &&//LINE: 104 &&//MOD: CodaText &&//FUNC: TEXTINSERT(this=0x0000000107f59900, AX=0, AY=0, ATEXT=0x0000000107f7a7b0, AOVERWRITE=false, ASHIFT=(X = 0, Y = 0), APOSAFTER=(X = 0, Y = 0)) <<&&//FRAME, stop reason = breakpoint 8.1
  118.     frame #0: 0x0000000100383394, 0x000000016fdfe960, 0x000000016fdfec40 &&//FULL: /Users/terrylou/Desktop/mac_backup/cudatext-src/src/ATSynEdit/ATSynEdit-master/atsynedit/atstrings_editing.inc &&//SHORT: atstrings_editing.inc &&//LINE: 104 &&//MOD: CodaText &&//FUNC: TEXTINSERT(this=0x0000000107f59900, AX=0, AY=0, ATEXT=0x0000000107f7a7b0, AOVERWRITE=false, ASHIFT=(X = 0, Y = 0), APOSAFTER=(X = 0, Y = 0)) <<&&//FRAME
  119. >> thread list
  120. >> version
  121. Target 0: (CodaText) stopped.
  122. (lldb) thread list
  123. Process 14670 stopped
  124. * thread #1: tid=0x7f9c4: 0x0000000100383394, 0x000000016fdfe960, 0x000000016fdfec40 &&//FULL: /Users/terrylou/Desktop/mac_backup/cudatext-src/src/ATSynEdit/ATSynEdit-master/atsynedit/atstrings_editing.inc &&//SHORT: atstrings_editing.inc &&//LINE: 104 &&//MOD: CodaText &&//FUNC: TEXTINSERT(this=0x0000000107f59900, AX=0, AY=0, ATEXT=0x0000000107f7a7b0, AOVERWRITE=false, ASHIFT=(X = 0, Y = 0), APOSAFTER=(X = 0, Y = 0)) <<&&//FRAME, stop reason = breakpoint 8.1
  125.   thread #2: tid=0x7f9e2: 0x00000001ac8c472c, 0x000000016fe86fc0, 0x000000016fe86fe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  126.   thread #3: tid=0x7f9e3: 0x00000001ac8c472c, 0x000000016ff12fc0, 0x000000016ff12fe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  127.   thread #4: tid=0x7f9f6: 0x00000001ac8c472c, 0x000000016ff9eb30, 0x000000016ff9eb50 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  128.   thread #5: tid=0x7f9ff: 0x00000001ac8c472c, 0x000000017002afc0, 0x000000017002afe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  129.   thread #6: tid=0x7fa00: 0x00000001ac8c472c, 0x00000001700b6fc0, 0x00000001700b6fe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  130.   thread #7: tid=0x7fa01: 0x00000001ac8c472c, 0x0000000170142fc0, 0x0000000170142fe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  131.   thread #8: tid=0x7fa02: 0x00000001ac8c472c, 0x00000001701cefc0, 0x00000001701cefe0 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: __workq_kernreturn <<&&//FRAME
  132.   thread #9: tid=0x7fa03: 0x00000001ac8c28b0, 0x0000000170259eb0, 0x0000000170259f00 &&//FULL:  &&//SHORT:  &&//LINE:  &&//MOD: libsystem_kernel.dylib &&//FUNC: mach_msg_trap <<&&//FRAME
  133. (lldb) version
  134. >> thread backtrace -c 5
  135. >> version
  136. lldb-1316.0.9.46
  137. Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
  138. (lldb) thread backtrace -c 5
  139. * thread #1: tid=0x7f9c4: 0x0000000100383394, 0x000000016fdfe960, 0x000000016fdfec40 &&//FULL: /Users/terrylou/Desktop/mac_backup/cudatext-src/src/ATSynEdit/ATSynEdit-master/atsynedit/atstrings_editing.inc &&//SHORT: atstrings_editing.inc &&//LINE: 104 &&//MOD: CodaText &&//FUNC: TEXTINSERT(this=0x0000000107f59900, AX=0, AY=0, ATEXT=0x0000000107f7a7b0, AOVERWRITE=false, ASHIFT=(X = 0, Y = 0), APOSAFTER=(X = 0, Y = 0)) <<&&//FRAME, stop reason = breakpoint 8.1
  140.   * frame #0: 0x0000000100383394, 0x000000016fdfe960, 0x000000016fdfec40 &&//FULL: /Users/terrylou/Desktop/mac_backup/cudatext-src/src/ATSynEdit/ATSynEdit-master/atsynedit/atstrings_editing.inc &&//SHORT: atstrings_editing.inc &&//LINE: 104 &&//MOD: CodaText &&//FUNC: TEXTINSERT(this=0x0000000107f59900, AX=0, AY=0, ATEXT=0x0000000107f7a7b0, AOVERWRITE=false, ASHIFT=(X = 0, Y = 0), APOSAFTER=(X = 0, Y = 0)) <<&&//FRAME
  141.     frame #1: 0x0000000100348188, 0x000000016fdfec50, 0x000000016fdfee70 &&//FULL: /Users/terrylou/Desktop/mac_backup/cudatext-src/src/ATSynEdit/ATSynEdit-master/atsynedit/atsynedit_cmd_editing.inc &&//SHORT: atsynedit_cmd_editing.inc &&//LINE: 82 &&//MOD: CodaText &&//FUNC: DOCOMMAND_TEXTINSERTATCARETS(this=0x0000000105680d50, ATEXT=0x0000000107f7a7b0, AKEEPCARET=false, AOVRMODE=false, ASELECTTHEN=false) <<&&//FRAME
  142.     frame #2: 0x0000000100344e7c, 0x000000016fdfee80, 0x000000016fdfefb0 &&//FULL: /Users/terrylou/Desktop/mac_backup/cudatext-src/src/ATSynEdit/ATSynEdit-master/atsynedit/atsynedit_cmd_handler.inc &&//SHORT: atsynedit_cmd_handler.inc &&//LINE: 356 &&//MOD: CodaText &&//FUNC: DOCOMMAND(this=0x0000000105680d50, ACMD=150, ATEXT=0x0000000107f7a7b0) <<&&//FRAME
  143.     frame #3: 0x000000010034383c, 0x000000016fdfefc0, 0x000000016fdff0b0 &&//FULL: /Users/terrylou/Desktop/mac_backup/cudatext-src/src/ATSynEdit/ATSynEdit-master/atsynedit/atsynedit_cmd_handler.inc &&//SHORT: atsynedit_cmd_handler.inc &&//LINE: 75 &&//MOD: CodaText &&//FUNC: UTF8KEYPRESS(this=0x0000000105680d50, UTF8KEY=(length = '\x03', st = "中")) <<&&//FRAME
  144.     frame #4: 0x00000001001f6648, 0x000000016fdff0c0, 0x000000016fdff1c0 &&//FULL: /Users/terrylou/Lazarus/lazarus/lcl/include/wincontrol.inc &&//SHORT: wincontrol.inc &&//LINE: 6007 &&//MOD: CodaText &&//FUNC: DOUTF8KEYPRESS(this=0x0000000105680d50, UTF8KEY=(length = '\x03', st = "中")) <<&&//FRAME
  145. (lldb) version
  146. >> frame variable -P 1 -D 5
  147. >> version
  148. lldb-1316.0.9.46
  149. Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
  150. (lldb) frame variable -P 1 -D 5
  151. (LONGINT) AX = 0
  152. (LONGINT) AY = 0
  153. (UNICODESTRING) ATEXT = 0x0000000107f7a7b0 {
  154.   *ATEXT = 20013
  155. }
  156. (BOOLEAN) AOVERWRITE = false
  157. (TPOINT) ASHIFT = {
  158.   X = 0
  159.   Y = 0
  160. }
  161. (TPOINT) APOSAFTER = {
  162.   X = 0
  163.   Y = 0
  164. }
  165. (UNICODESTRING) STR = 0x0000000000000000
  166. (UNICODESTRING) STRLEAD = 0x0000000000000000
  167. (UNICODESTRING) STRTAIL = 0x0000000000000000
  168. (TATSTRINGS) BLOCK = NULL
  169. (TSTRINGLIST) BLOCKUTF8 = NULL
  170. (BOOLEAN) BATLINEEND = false
  171. (BOOLEAN) BATFILEEND = false
  172. (BOOLEAN) BATEMPTYLINE = false
  173. (BOOLEAN) BBLOCKWITHEOL = false
  174. (BOOLEAN) BUSEBLOCKFINALEOL = false
  175. (LONGINT) BLOCKORIGINALLINECOUNT = 0
  176. (lldb) version
  177. >> expression -T -- I
  178. lldb-1316.0.9.46
  179. Apple Swift version 5.6.1 (swiftlang-5.6.0.323.66 clang-1316.0.20.12)
  180. (lldb) expression -T -- I
  181. error: need to add support for DW_TAG_base_type 'FormalDef' encoded with DW_ATE = 0x7, bit_size = 0
  182. error: CodaText {0x008e4074}: unhandled type tag 0x0020 (DW_TAG_set_type), please file a bug and attach the file at the start of this error message
  183. error: CodaText {0x008e4082}: unhandled type tag 0x0020 (DW_TAG_set_type), please file a bug and attach the file at the start of this error message
  184. error: CodaText {0x008e4233}: unhandled type tag 0x0020 (DW_TAG_set_type), please file a bug and attach the file at the start of this error message
  185. error: CodaText {0x008e3efb}: unhandled type tag 0x0020 (DW_TAG_set_type), please file a bug and attach the file at the start of this error message
  186. PLEASE submit a bug report to https://developer.apple.com/bug-reporting/ and include the crash backtrace.
  187. Stack dump:
  188. 0.      Program arguments: /Applications/Xcode.app/Contents/Developer/usr/bin/lldb
  189.  

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9874
  • Debugger - SynEdit - and more
    • wiki
Re: MacOSX on M1 , LLDB issue
« Reply #3 on: September 10, 2022, 03:35:16 pm »
It looks like https://wiki.freepascal.org/Installing_Lazarus_on_macOS#Step_5:_Configure_the_Debugger
you configured
Code: Text  [Select][+][-]
  1. LLDB Debugger (Alpha)
instead of
Code: Text  [Select][+][-]
  1. LLDB Debugger (with FpDebug) (beta)

The 2nd version should work.
If it does fail with the "FpDebug" version, please report again.




However, if you use FPC 3.3.1 then you need the latest Lazarus fixes 2.2.3 (or 2.3). Otherwise certain global variables will not be inspect-able. https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39696


You may have other reasons to use the "LLDB (alpha)"?

The problem is that LLDB has some issues with the "debug info" / "dwarf" that FPC writes (afaik, at least in part this is because of bugs or missing implementation in LLDB).
In the "LLDB (with FpDebug)" debugger, this is handled by "FpDebug".

How to fix (for "LLDB Debugger (Alpha)")

Go to Menu: Project > Project Options => Compiler Options > Debugging.
There is a drop down for "debug info type"

This most likely happens if the drop down is set to "Dwarf 3"

Setting it to "Dwarf with sets" or just "Dwarf 2" will likely fix the issue.

If not, keep the setting at "Dwarf 2", and go to "Custom Options".
Add
Code: Text  [Select][+][-]
  1. -godwarfcpp




It may not be possible at all to inspect some types with the "]LLDB Debugger (Alpha)" debugger. If this is due to restrictions in LLDB then it can't be fixed (until lldb fixes it, and apple choses to upgrade the lldb they include).

If it fails with the "LLDB Debugger (with FpDebug) (beta)" and "dwarf with sets" then please report.

The "LLDB Debugger (with FpDebug) (beta)" should also do with Dwarf-3, but that can not be guaranteed
« Last Edit: September 10, 2022, 03:40:27 pm by Martin_fr »

powerpcer

  • Full Member
  • ***
  • Posts: 100
Re: MacOSX on M1 , LLDB issue
« Reply #4 on: September 10, 2022, 05:10:00 pm »
It looks like https://wiki.freepascal.org/Installing_Lazarus_on_macOS#Step_5:_Configure_the_Debugger
you configured
Code: Text  [Select][+][-]
  1. LLDB Debugger (Alpha)
instead of
Code: Text  [Select][+][-]
  1. LLDB Debugger (with FpDebug) (beta)

The 2nd version should work.
If it does fail with the "FpDebug" version, please report again.




However, if you use FPC 3.3.1 then you need the latest Lazarus fixes 2.2.3 (or 2.3). Otherwise certain global variables will not be inspect-able. https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39696


You may have other reasons to use the "LLDB (alpha)"?

The problem is that LLDB has some issues with the "debug info" / "dwarf" that FPC writes (afaik, at least in part this is because of bugs or missing implementation in LLDB).
In the "LLDB (with FpDebug)" debugger, this is handled by "FpDebug".

How to fix (for "LLDB Debugger (Alpha)")

Go to Menu: Project > Project Options => Compiler Options > Debugging.
There is a drop down for "debug info type"

This most likely happens if the drop down is set to "Dwarf 3"

Setting it to "Dwarf with sets" or just "Dwarf 2" will likely fix the issue.

If not, keep the setting at "Dwarf 2", and go to "Custom Options".
Add
Code: Text  [Select][+][-]
  1. -godwarfcpp




It may not be possible at all to inspect some types with the "]LLDB Debugger (Alpha)" debugger. If this is due to restrictions in LLDB then it can't be fixed (until lldb fixes it, and apple choses to upgrade the lldb they include).

If it fails with the "LLDB Debugger (with FpDebug) (beta)" and "dwarf with sets" then please report.

The "LLDB Debugger (with FpDebug) (beta)" should also do with Dwarf-3, but that can not be guaranteed
USE  "LLDB Debugger (with FpDebug) (beta)"  it works
thanks Martin

 

TinyPortal © 2005-2018