Lazarus

Installation => macOS / Mac OS X => Topic started by: WimVan on June 24, 2017, 02:47:46 pm

Title: OS X 10.12 Sierra error gdb on un !
Post by: WimVan 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 (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...
Title: Re: OS X 10.12 Sierra error gdb on un !
Post by: Phil 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
Title: Re: OS X 10.12 Sierra error gdb on un !
Post by: tianya 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
Title: Re: OS X 10.12 Sierra error gdb on un !
Post by: jmpessoa 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
Title: Re: OS X 10.12 Sierra error gdb on un !
Post by: Martin_fr 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.
Title: Re: OS X 10.12 Sierra error gdb on un !
Post by: dbannon 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
TinyPortal © 2005-2018