Recent

Author Topic: gdb 7.6.2 unusable under Linux  (Read 4418 times)

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
gdb 7.6.2 unusable under Linux
« on: January 12, 2014, 11:58:41 am »
Trouble with the debugger are not new. But now it crashes for almost every evaluation. I guess it depends on simple types vs. properties, but don't hold me to that.
On start I get this error
Quote
Initialization output:
&"Undefined command: \"\".  Try \"help\".\n"

I'm using GNU gdb (GDB) 7.6.2 on Arch Linux and start with "/usr/bin/fpc  -MObjFPC -Scghi -CX -Cirot -O1 -g -gl -XX -va -Fl...". The Windows setup distributes 7.2 which is okay. So perhaps I have to downgrade. Any other advice?
Lazarus 1.7 (SVN) FPC 3.0.0

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7434
  • Debugger - SynEdit - and more
    • wiki
Re: gdb 7.6.2 unusable under Linux
« Reply #1 on: January 12, 2014, 01:30:24 pm »
Probably downgrade.

I know that 7.5.9 / 7.6.0 / 7.6.1 were very unstable on windows.
So i recommend do go for 7.5.1 or earlier, maybe even 7.4.x


Afak 7.7 release process is under way, but:
- no idea how long that will take
- no idea if it is going to be any more stable.

Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: gdb 7.6.2 unusable under Linux
« Reply #2 on: January 12, 2014, 02:08:35 pm »
Arch's rollback machine goes back to 2013 and v7.6.1 only. From source 7.4 does not compile, 7.5 crashes too (perhaps not that often). The initialization error still pops up.
Lazarus 1.7 (SVN) FPC 3.0.0

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7434
  • Debugger - SynEdit - and more
    • wiki
Re: gdb 7.6.2 unusable under Linux
« Reply #3 on: January 12, 2014, 02:23:30 pm »
For the initialization error attach a full log, please http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session

Check in Menu > Tools > Options:  Debugger / General

In the property Grid on that page, first entry "Debugger_Startup_Options"
The field is empty (not even a space)

------------

Have you tried using Stabs or Dwarf? Menu Project > Project Options / Debugging

NOTE: This setting is also in each package. Make sure you do set all packages explicit to either OFF, or the same as project ("default" is NOT the same as project)

Also ensure the LCL and other are recompiled without (or with the same -gw or -gs (any other -g triggers "default).
See Menu > Tools >Configure Build Lazarus

--------------
Btw: Do not try to inspect "resourcestring". I found this crashes almost all (if not all) gdb.

also note
type
  TFoo = array [0..99999999] of something;
  PFoo = ^ TFoo;

x := allocmem,
PFoo(x)^[1]

The presence of TFoo can kill gdb, as gdb will try to get an impossible amount of memory.
[[ it will definitely, if TFoo is accessed. I am not sure, but it could be that it will even before TFoo is accessed. ]]


Ocye

  • Hero Member
  • *****
  • Posts: 518
    • Scrabble3D
Re: gdb 7.6.2 unusable under Linux
« Reply #4 on: January 12, 2014, 02:33:27 pm »
In the property Grid on that page, first entry "Debugger_Startup_Options"
The field is empty (not even a space)
It was -eval-command="set disassembly-flavor intel" in my options. Without this setting it seems to work much better. I was not able to provoke a crash. Thank you!
Lazarus 1.7 (SVN) FPC 3.0.0

 

TinyPortal © 2005-2018