Recent

Author Topic: Inspect variable with gdb unparsed remainder problem  (Read 1692 times)

Dmitriy

  • Newbie
  • Posts: 4
Inspect variable with gdb unparsed remainder problem
« on: October 26, 2021, 12:32:08 pm »
I can not inspect string variable.
Debugger says ###("gdb unparsed remainder:...)###
(like on screenshot)
How to inspect this variable in IDE (Lazarus 2.0.12)?
Best regards, Dmitriy

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7515
  • Debugger - SynEdit - and more
    • wiki
Re: Inspect variable with gdb unparsed remainder problem
« Reply #1 on: October 27, 2021, 03:41:18 pm »
If you are on Win/Linux, 2.0.12 already includes fpdebug. You may need to install the package LazDebuggerFp.

Otherwise, I am not sure how much code the IDE already have to try and work around that. You may report it as a bug, if you can reproduce it. I can't tell it it is fixable at all, or when.

You can also try to download a diff version of gdb from our sourceforge page. But I do not expect it to make a difference.

MarkMLl

  • Hero Member
  • *****
  • Posts: 3481
Re: Inspect variable with gdb unparsed remainder problem
« Reply #2 on: October 27, 2021, 04:06:20 pm »
I meant to confirm this and comment yesterday evening: it only affect the local variables window, not the dropdown value when you hover over a variable in the source window.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7515
  • Debugger - SynEdit - and more
    • wiki
Re: Inspect variable with gdb unparsed remainder problem
« Reply #3 on: October 27, 2021, 04:34:30 pm »
The local Window currently shows more or less pure gdb replies.

So yes its quality is lower. Getting the improved results, would cause a bit of slowdown (especially if there are lots of locals). So best is to add any value like this to the watches.

MarkMLl

  • Hero Member
  • *****
  • Posts: 3481
Re: Inspect variable with gdb unparsed remainder problem
« Reply #4 on: October 27, 2021, 04:49:59 pm »
The local window truncates it, but the dropdown doesn't.

Can this at least be made configurable?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7515
  • Debugger - SynEdit - and more
    • wiki
Re: Inspect variable with gdb unparsed remainder problem
« Reply #5 on: October 27, 2021, 05:02:23 pm »
In principal, it can be configurable. But it needs quite some work on the gdbmi debugger backend.

It also depends, what will happen to the frontend. There is some todo there... Joost was working on some interesting stuff in his DAB. If that gets ported, that may offer better options for this here issue to.


It is not just changing one or two commands to gdb.

At the moment the IDE gets all locals in a single gdb output.
To change it, the gdb backend would have to
- get the names
- create dummy watches for each
- eval them each
- collect, and then send the result.

That also means, that other than the watches win that gradually fills, the locals would be empty, till all locals are there.

Of course clever tricks, like spotting integers and keep them could be done.... But that is more code to implement to get it done.


 

TinyPortal © 2005-2018