Recent

Author Topic: Lazarus debugger fail in Ubuntu 13.04  (Read 37094 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11164
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus debugger fail in Ubuntu 13.04
« Reply #45 on: May 06, 2013, 10:08:12 pm »
We use MI.

But not all commands work in MI . And even those that do, we still need to support old ones.
Though to be fair, some more commands could get MI fallback. But it's a lot of work...

You can create a bug report, for the setting of LANG=C

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11164
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus debugger fail in Ubuntu 13.04
« Reply #46 on: May 10, 2013, 12:47:19 am »
@macmike

The problem you have may be the same as referenced here:
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Issues_with_GDB_7.5.9_or_7.6

macmike

  • Jr. Member
  • **
  • Posts: 85
    • Soft-Practice
Re: Lazarus debugger fail in Ubuntu 13.04
« Reply #47 on: May 10, 2013, 02:34:58 am »
Thanks for the link - sorry I've not come back to this I've just bought a mac so I've been a bit focussed on getting that set up with Lazarus (which was easy and the results are brilliant).

I've had a bit of luck stabilising the debugger by fiddling with the options... for some reason I had -gh (heaptrc for memleaks) and -pg (gprof) on. I've noticed for a while that the memleak report was always showing 0 even if I tried to deliberately cause a leak so I was fiddling around with these settings. Long story short, memleak reporting is now working and the debugger can step on but it still crashes after hovering over (almost) any value.

I tried removing all of my watches and hiding the local vars window but it didn't help. My code's heavily instrumented so I'm kind of getting away with it at the moment. Also, I'm building on Linux, Win and Mac so I've got a choice of platforms to play with.

I had a theory it could be do to with my code somehow so I created the following test app which causes the crash after hovering over OpenDialog1.FileName (hovering over "blah" is ok):

Code: [Select]
procedure TForm1.Button1Click(Sender : TObject);
var blah : string;
begin
  blah := 'hello';
  OpenDialog1.Execute;
  if OpenDialog1.FileName = blah then
    Exit;
end;       

Full log for the session attached.



Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11164
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus debugger fail in Ubuntu 13.04
« Reply #48 on: May 10, 2013, 02:49:06 am »
The logfile starts with

Quote
"GNU gdb (GDB) 7.5.91.20130417-cvs-ubuntu\n""

And due to the bug in GDB this version of GDB can not be used.

You will need to install an older version of GDB.
Or if you build it yourself, you can try the patch from the gdb bug report.

macmike

  • Jr. Member
  • **
  • Posts: 85
    • Soft-Practice
Re: Lazarus debugger fail in Ubuntu 13.04
« Reply #49 on: May 10, 2013, 01:01:26 pm »
Edit: Spoke to soon.... Reinstalling gdb made it a bit more stable but didn't fix the problems entirely. Off I go to downgrade gdb.
« Last Edit: May 10, 2013, 01:49:22 pm by macmike »

macmike

  • Jr. Member
  • **
  • Posts: 85
    • Soft-Practice
Re: Lazarus debugger fail in Ubuntu 13.04
« Reply #50 on: May 10, 2013, 02:56:29 pm »
I've downgraded gdb to 7.5-ubuntu and now debugging seems stable again. Thanks for your help :)

 

TinyPortal © 2005-2018