Recent

Author Topic: gdb installation with errors  (Read 26509 times)

pawi

  • New member
  • *
  • Posts: 7
Re: gdb installation with errors
« Reply #15 on: October 04, 2013, 12:54:56 pm »
Thanks so far you all for your answers!
I think i have to try my luck somewhere else.
Greetings

murray

  • Newbie
  • Posts: 5
Re: gdb installation with errors
« Reply #16 on: October 22, 2013, 03:28:28 pm »
For what it's worth, I've just gone through the pain of getting gdb back up and running with Lazarus after updating xcode to 5, and OSX to Mountain Lion.

The instructions at
http://emacsclub.github.io/html/gdb_mountainlion.html
were very helpful, but sadly not fully functional (at least for me).

What I did:
installed homebrew with:
Code: [Select]
ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)"and then
Code: [Select]
brew doctor
The next instruction on the above page failed, but I found the following worked:
Code: [Select]
brew install homebrew/dupes/gdb
then I simply needed to follow the codesign instructions at
https://sourceware.org/gdb/wiki/BuildingOnDarwin#Creating_a_certificate

In lazarus, Tools | Options | Debugger | General, you need to set the path correctly (/usr/local/bin/gdb in my case).

Now I can run a program under the debugger, but it doesn't seem to set any of the breakpoints, but that's another matter...

Hope this helps.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12386
  • Debugger - SynEdit - and more
    • wiki
Re: gdb installation with errors
« Reply #17 on: October 22, 2013, 03:52:39 pm »
For ability to set breakpoints:

It Menu > "Project" > "Project Options", debugging:
try either stabs or dwarf2 (with godwarfset)

If neither works, produce and attach a log:

http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session

murray

  • Newbie
  • Posts: 5
Re: gdb installation with errors
« Reply #18 on: October 22, 2013, 04:00:04 pm »
It Menu > "Project" > "Project Options", debugging:
try either stabs or dwarf2 (with godwarfset)

It was already on stabs, which wasn't working for me.
Changing to "Dwarf with sets (-gw -godwarfsets)" worked for me.

Many thanks.

sysrpl

  • Sr. Member
  • ****
  • Posts: 315
    • Get Lazarus
Re: gdb installation with errors
« Reply #19 on: November 21, 2013, 04:35:09 pm »
I have Mavericks installed and was able to setup debugging using macports:

curl https://distfiles.macports.org/MacPorts/MacPorts-2.2.1-10.9-Mavericks.pkg -o macports.pkg
sudo installer -pkg macports.pkg -target /
sudo port install gdb

The debugger will then be located at:

/opt/local/bin/ggdb

You will need to sign ggdb using the setups provided here:

http://www.opensource.apple.com/source/lldb/lldb-69/docs/code-signing.txt

Substitute ggdb for lldb and it should work.

acp693

  • Jr. Member
  • **
  • Posts: 73
Re: gdb installation with errors
« Reply #20 on: December 02, 2013, 04:40:12 pm »
Hi sysrpl,

I've been trying to install gdb on Mavericks and followed your instructions

for the first two lines of commands, it downloads and installs macports successfully at base path /
however when I type the line:

sudo port install gdb

I receive the message:

sudo: port: command not found

Any help in getting this working would be gratefully received.

Albert

JimKueneman

  • Full Member
  • ***
  • Posts: 246
Re: gdb installation with errors
« Reply #21 on: December 03, 2013, 04:19:35 am »
change directories into the macports folder than run it:

Quote
cd /opt/local/bin

Then follow my saga getting it working...

Quote
http://forum.lazarus.freepascal.org/index.php/topic,22675.0.html

Jim

 

TinyPortal © 2005-2018