Recent

Author Topic: Debugger installation  (Read 5647 times)

WildMan

  • New Member
  • *
  • Posts: 22
Debugger installation
« on: November 13, 2017, 12:53:56 am »
I’m mainly a PC user and I desperately need the help of someone smarter than me to get Lazarus set up on a new Mac.  I’ve installed Lazarus, FPC, Xcode and the GDB debugger.  Lazarus comes up fine and I can drop components on my form and whatnot, but if I go to run it I get a debugger error:

The GDB command: "-exec-run" returned the error: ",msg="Unable to find Mach task port for process-id 53243: (os/kern) failure (0x5).\n)

I never specified the location of the GDB debugger; I know I didn’t because I don’t know where the debugger is located.  Is that the issue?  If so, then what should I enter and where?

dbannon

  • Hero Member
  • *****
  • Posts: 2778
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Debugger installation
« Reply #1 on: November 13, 2017, 03:30:41 am »
Did you have a look at
http://wiki.lazarus.freepascal.org/Installing_Lazarus_on_MacOS_X
?
I updated that page a few weeks ago and that model seemed to work fine for me.

David
Lazarus 2, Linux (and reluctantly Win10, OSX)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

WildMan

  • New Member
  • *
  • Posts: 22
Re: Debugger installation
« Reply #2 on: November 17, 2017, 12:29:57 am »
Hi, thank you for your response.  I believe that’s the same page from which I was working when I initially installed, but I’ve carefully reviewed it and I see that I was missing the bit about the Debugger Startup Options.  I entered that whole line and now when I run simple app I get a new message about the debugger initialization but then the process stops with the same debugger error.  I’ve attached images of both of these messages and the debugger options; can you spot something there that I’ve messed up?

WildMan

  • New Member
  • *
  • Posts: 22
Re: Debugger installation
« Reply #3 on: November 22, 2017, 10:07:44 am »
It seems fairly clear that the issue is that I need to set up a keychain certificate as described in: https://sourceware.org/gdb/wiki/BuildingOnDarwin#Giving_gdb_permission_to_control_other_processes%7Cofficial I’ve created the certificate but I’m having trouble trying to code-sign the gdb binary as per section 2.1.3.

I open the terminal and type:   codesign –s gdb-cert gdb
I then get an error message:  No such file or directory

I take it that I need to indicate the full path of the gdb binary, but I have no idea where that file is located (I’m a PC guy so this is all a bit odd to me and everything looks a bit different under High Sierra).  Can anyone give me an example of what that line should look like?

Gizmo

  • Hero Member
  • *****
  • Posts: 831
Re: Debugger installation
« Reply #4 on: November 22, 2017, 03:03:04 pm »
Try "locate gdb" at the terminal. It should tell you the path of GDB.

I've had the same issues as you with GDB on OSX, and even after code-signing I still get the same issue. I just have to go native with OSX and function without a debugger (turned off debugging in Lazarus Options). 

WildMan

  • New Member
  • *
  • Posts: 22
Re: Debugger installation
« Reply #5 on: November 25, 2017, 12:41:07 am »
When I type “locate gdb” in terminal, I get almost 14,000 lines of output ; what would I search for in that?

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4458
  • I like bugs.
Re: Debugger installation
« Reply #6 on: November 25, 2017, 10:07:12 am »
Try "locate gdb" at the terminal. It should tell you the path of GDB.
Maybe "which gdb".
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

madref

  • Hero Member
  • *****
  • Posts: 949
  • ..... A day not Laughed is a day wasted !!
    • Nursing With Humour
Re: Debugger installation
« Reply #7 on: January 04, 2018, 02:07:40 pm »
then use the path stated in lazarus
Code: [Select]
sudo codesign –s gdb-cert /usr/local/bin/gdb
You treat a disease, you win, you lose.
You treat a person and I guarantee you, you win, no matter the outcome.

Lazarus 3.99 (rev main_3_99-649-ge13451a5ab) FPC 3.3.1 x86_64-darwin-cocoa
Mac OS X Monterey

 

TinyPortal © 2005-2018