Recent

Author Topic: GDB 8.0  (Read 7034 times)

Pascal

  • Hero Member
  • *****
  • Posts: 932
GDB 8.0
« on: June 09, 2017, 12:37:50 pm »
I just saw that GDB 8.0 was released these days.
Can it be used with Lazarus? Does it provide any new features to debugging with Lazarus?
laz trunk x64 - fpc trunk i386 (cross x64) - Windows 10 Pro x64 (21H2)

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: GDB 8.0
« Reply #1 on: June 09, 2017, 01:04:54 pm »
If GDB 8.0 maintains backward compatibility, you can use it.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9791
  • Debugger - SynEdit - and more
    • wiki
Re: GDB 8.0
« Reply #2 on: June 09, 2017, 01:24:07 pm »
There is a debugger test case in the debugger directory (under components/gdbmi.....)

My experience was that at least on windows gdb 7.8 and up, were less stable than older versions. (Probably todo with debug info for pascal typical structures, that are uncommon in C)

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: GDB 8.0
« Reply #3 on: June 09, 2017, 02:26:35 pm »
If GDBMI is our default on all platforms it simply works. Even with quirks. I can't test anymore with the libs linked in.
Specialize a type, not a var.

wid

  • Newbie
  • Posts: 3
Re: GDB 8.0
« Reply #4 on: July 25, 2017, 12:48:45 am »
Unfortunately GDB 8.0 unexpectedly exits under OSX 10.12.6 (Sierrra)
The exit message is:
"During startup program terminated with signal ?", "Unknown signal.""

I have used instructions how to install from here (very clear info):
https://www.youtube.com/watch?v=QE_IAjkXElg

but they use old version there. Anybody can help how to make it work for GDB 8.0 or how to downgrade to 7.12 ?

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Re: GDB 8.0
« Reply #5 on: July 25, 2017, 02:09:55 am »
Wid, I would strongly recommend using the project described on this page https://macpgmr.github.io/ObjP/ProjectXC.html in order to use Xcode and LLDB to debug Lazarus projects.

From what I can gather GDB and Sierra just do not play well together.

The Xcode method may seem a bit clumsy at first, but I have had some very good results with it, and once one's muscle memory gets accustomed to it, it's pretty easy to use.
« Last Edit: July 25, 2017, 02:14:04 am by carl_caulkett »
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: GDB 8.0
« Reply #6 on: July 25, 2017, 03:15:26 am »
The Xcode method may seem a bit clumsy at first

I'll see if I can integrate it into Lazarus on the Tools menu. Maybe a command called Export To Xcode or something.


Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: GDB 8.0
« Reply #7 on: July 25, 2017, 09:28:02 am »
Try GDB 8.0 with FPC trunk and Laz trunk. It *should* work out of the box now because of the GDBMI default. I will try to test this on my MAC mini. I am almost sure it will work.
It won't work on older FPC versions, because those will link gdb statically. You can also try to build 3.0 or later with make <normal make parameters> GDBMI=1 that would also work. The GDBMI interface hardly changed between 7.8 and 8.0 AFAIK.
« Last Edit: July 25, 2017, 09:33:33 am by Thaddy »
Specialize a type, not a var.

esvignolo

  • Full Member
  • ***
  • Posts: 159
  • Using FPC in Windows, Linux, Macos
Re: GDB 8.0
« Reply #8 on: July 25, 2017, 02:24:22 pm »
Great ! +1 :)

The Xcode method may seem a bit clumsy at first

I'll see if I can integrate it into Lazarus on the Tools menu. Maybe a command called Export To Xcode or something.

Thaddy

  • Hero Member
  • *****
  • Posts: 14197
  • Probably until I exterminate Putin.
Re: GDB 8.0
« Reply #9 on: July 25, 2017, 02:31:11 pm »
Great ! +1 :)

The Xcode method may seem a bit clumsy at first

I'll see if I can integrate it into Lazarus on the Tools menu. Maybe a command called Export To Xcode or something.
You still need to check your FPC version, though. AND your Laz version. It is so hard to debug anything if we don't have VERSIONS!@!!
Specialize a type, not a var.

wid

  • Newbie
  • Posts: 3
Re: GDB 8.0
« Reply #10 on: July 26, 2017, 11:25:18 am »
What are conclusions from this discussion so far ?

I am interesting to lunch IDE - the one I will be able to generate target binary for: OSX, Linux, Windows.

So far, I have assumed it is good idea to lunch 3x IDE (Win/Linux/OSX) separately, and to incl. GDB each. Now, GDB seems to be not perfect for OSX. Please advice.
« Last Edit: July 26, 2017, 11:27:56 am by wid »

wid

  • Newbie
  • Posts: 3
Re: GDB 8.0
« Reply #11 on: September 03, 2017, 02:46:05 am »
Any news regarding GDB 8.0 making work on Mac OSX please ?
If not GDB, how about LLDB on OSX ?

Akira1364

  • Hero Member
  • *****
  • Posts: 561
Re: GDB 8.0
« Reply #12 on: September 03, 2017, 04:20:53 am »
There is a debugger test case in the debugger directory (under components/gdbmi.....)

My experience was that at least on windows gdb 7.8 and up, were less stable than older versions. (Probably todo with debug info for pascal typical structures, that are uncommon in C)

The old GDB 7.2 that's been distributed with Lazarus for the last couple years or so regularly causes "hard lockups" (meaning you have to physically reset the computer) on at least Windows 8, 8.1, and 10, though. (Possibly Windows 7 as well, not sure.) As far as GDB and Lazarus as a pair are concerned I've always found that the newer the GDB, the better...

 

TinyPortal © 2005-2018