* * *

Author Topic: GDB 8.0  (Read 2023 times)

Pascal

  • Hero Member
  • *****
  • Posts: 541
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 - fpc trunk 32bit - Windows 10 Pro x64

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 659
    • 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.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4419
    • 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: 4807
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.
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

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

  • Full Member
  • ***
  • Posts: 243
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 »
macOS 10.12.6
Lazarus 1.8.0 RC4
FPC 3.0.2

Phil

  • Hero Member
  • *****
  • Posts: 2324
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: 4807
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 »
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

esvignolo

  • Full Member
  • ***
  • Posts: 137
  • 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: 4807
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!@!!
"Logically, no number of positive outcomes at the level of experimental testing can confirm a scientific theory, but a single counterexample is logically decisive."

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

  • Sr. Member
  • ****
  • Posts: 333
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...

 

Recent

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