* * *

Author Topic: OS X 10.12 Sierra error gdb on un !  (Read 3653 times)

WimVan

  • New member
  • *
  • Posts: 12
OS X 10.12 Sierra error gdb on un !
« on: June 24, 2017, 02:47:46 pm »
Hello,
I installed VMWare, Xcode, Lazarus ... gdb as writen in http://www.schoolfreeware.com/Install_Free_Pascal_Lazarus_On_Mac_OS_X_Tutorial.html

When loading the project I can
Compile, build without problems, but asking to run I got next:

Quote
The GDB command:"-exec-run" returned the error:
".msg="During startup program terminated with signal SIGTRAP, Trace/breakpoint trap.""

I just can stop and so test nothing...

Phil

  • Hero Member
  • *****
  • Posts: 2600
Re: OS X 10.12 Sierra error gdb on un !
« Reply #1 on: June 24, 2017, 08:30:47 pm »
I just can stop and so test nothing...

If your Lazarus has a Run | Run without Debugging menu item, try that. That should allow you to run the compiled app even though the debugger isn't working.

For running WITH debugging, you have two choices, I suppose. Since your problem has been reported here many times, you could read through the various posts and suggestions for how to get gdb running on Mac. Sometimes people succeed, sometimes they don't.

Or you could just create an Xcode project for your Lazarus project and debug your app in Xcode. Then you'll be using the lldb debugger that's included with Xcode. Here's how:

https://macpgmr.github.io/ObjP/ProjectXC.html

tianya

  • New member
  • *
  • Posts: 23
Re: OS X 10.12 Sierra error gdb on un !
« Reply #2 on: August 11, 2017, 04:28:43 pm »
sign you gdb ,then add "--eval-command=set startup-with-shell off" to your lazarus option, debug->Debugger_startup_options

jmpessoa

  • Hero Member
  • *****
  • Posts: 1112
Re: OS X 10.12 Sierra error gdb on un !
« Reply #3 on: May 09, 2018, 10:46:41 pm »

Quote
--eval-command=set startup-with-shell off

Yes!!!

[MacOs 10.13.4]

how to codesign is here: 
https://medium.com/@royalstream/how-to-install-and-codesign-gdb-on-os-x-el-capitan-aab3d1172e95
« Last Edit: May 09, 2018, 10:48:51 pm by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4572
    • wiki
Re: OS X 10.12 Sierra error gdb on un !
« Reply #4 on: May 18, 2018, 07:57:19 pm »
Lazarus svn trunk (revision 57956) has now a dedicated option that can be enabled to issue the command to gdb.

dbannon

  • Full Member
  • ***
  • Posts: 245
Re: OS X 10.12 Sierra error gdb on un !
« Reply #5 on: May 19, 2018, 12:27:25 pm »
Quote
dedicated option that can be enabled to issue the command to gdb.

Great, thats a very useful improvement !  One less 'strange' step to confuse first timers.

davo
Lazarus 1.8, Linux (and reluctantly Win10, OSX)

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus