Recent

Author Topic: problem gdb13.1 with lazarus2.2.6 Raspberry5/Debian12  (Read 1030 times)

Fred vS

  • Hero Member
  • *****
  • Posts: 3624
    • StrumPract is the musicians best friend
Re: problem gdb13.1 with lazarus2.2.6 Raspberry5/Debian12
« Reply #15 on: May 13, 2025, 04:00:18 pm »
Hello,
I initially used fpc deluxe, but not knowing how to uninstall a version, I preferred "apt-get install...".
After installing fcp3.2.3+lazarus4.0 arm64.deb, the gdb errors are the same.

Sorry, not sure to understand, so you are using the deb packages from debian server using "apt-get install..."?
And not the one from fpc sourceforge?

To uninstall fpcupdeluxe and install a new version, simply delete the directory /home/you/fpcupdeluxe and fpcup.ini, fpcupdeluxe.ini then reload the binary fpcupdeluxe to re-create a new version.
« Last Edit: May 13, 2025, 04:22:11 pm by Fred vS »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 11349
  • Debugger - SynEdit - and more
    • wiki
Re: problem gdb13.1 with lazarus2.2.6 Raspberry5/Debian12
« Reply #16 on: May 13, 2025, 04:13:22 pm »
Bug GDB with message "..ptype r.ftabmots..."
I think the problem appears depending on the type of variable being scanned (in this case, a dynamic array, etc.).

There aren't any settings for that.

GDB has a very very limited understanding of Pascal types. In order to get better results, years and years of work went into the IDE tweaking the input to GDB (e.g. appending ^ if necessary) in order to get as much info as possible.
But then in each GDB version different issue arose were GDB itself would crash.

I used to test with combination of more than 10 gdb versions versus 3 or 4 fpc versions and with different debug info settings.... Very time consuming.

Since a couple of years my focus moved to FpDebug (but that does only support i386/x86).
I still want to update the gdb backend of the IDE again. But I simply hadn't had time in a few years.

I had never gotten it 100% stable with the old gdb versions (can't workaround every gdb bug), and the newer gdb versions haven't always improved it.




As I said LLDB should work (and likely be more stable) on your platform.

IIRC the package is called LazDebuggerLLDB  (there MUST NOT be any "FP" in the name).
Well if you install it, install both: the one with and the one without "FP" in the name.

You can then test "LLDB alpha" and "LLDB+FpDebug" as debugger backends.

**IF** "LLDB+FpDebug" works, then great => that should give you a really good experience (though it be a a little bit slower showing watches)

Otherwise the "LLDB alpha" should work. (Use only "Dwarf 2"). However watches need to be entered C-style: obj->field


Unfortunately that are currently all the options.


Fred vS

  • Hero Member
  • *****
  • Posts: 3624
    • StrumPract is the musicians best friend
Re: problem gdb13.1 with lazarus2.2.6 Raspberry5/Debian12
« Reply #17 on: May 13, 2025, 04:39:39 pm »
Bug GDB with message "..ptype r.ftabmots..."
I think the problem appears depending on the type of variable being scanned (in this case, a dynamic array, etc.).

Could you give a demo program/code that produces that kind of message?
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Thaddy

  • Hero Member
  • *****
  • Posts: 17176
  • Ceterum censeo Trump esse delendam
Re: problem gdb13.1 with lazarus2.2.6 Raspberry5/Debian12
« Reply #18 on: May 13, 2025, 06:41:47 pm »
At least, build from source there aren't any issues I am aware of.
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Fred vS

  • Hero Member
  • *****
  • Posts: 3624
    • StrumPract is the musicians best friend
Re: problem gdb13.1 with lazarus2.2.6 Raspberry5/Debian12
« Reply #19 on: May 13, 2025, 08:52:49 pm »
At least, build from source there aren't any issues I am aware of.

Same here, and if you dont want to touch to your system configuration, install it in your favorite custom folder:
 
Code: Pascal  [Select][+][-]
  1.     $ ../configure --prefix=~/gdb-custom
  2.     $ make
  3.     $ make install

If you are not fan (like me) that GDB try to connect to the network, use --disable-debuginfod parameter in configure (Last Lazarus can deal to no download C debuginfo files but not to prevent gdb from connecting to the network).

Once you have the new GDB binary, also to not touch at your system, replace the old gdb in /fpcupdeluxe/fpcbootstrap/gdb/arm-linux/gdb  (that is a copy of /usr/bin/gdb in fact) with the new one.

And use fpc-Lazarus from /fpcupdeluxe/.

So all will be centralized in /fpcupdeluxe.
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

 

TinyPortal © 2005-2018