Recent

Author Topic: Memory - hex dumps  (Read 349 times)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 8602
  • Debugger - SynEdit - and more
    • wiki
Memory - hex dumps
« on: September 17, 2022, 09:05:00 pm »
From a PM conversation that developed into a topic of maybe general interest.




Quote
That said, you would not need full-featured dump indow, if Watches or Evel could do it.

But watches can....

There is an option in their properties window. Under "Display format"

Combine that with:
- repeat count (at least under fpdebug)
- the magnifying glass of the watches window's toolbar...

Quote
In Turbo Pascal and Delphi you could:  add the " , x" after the expression - and it makes the "intrinsic" `show HEX dump` - it would be enought for many of cases.
TOgether with "pretend static array, byte count parameter" - it covers 99% of needs.

But - i could not make this work in Lazarus....

Make HEX DUMP GUI and intrinsic (both override formatting and optionally override SizeOf) into Watch/Eval windows - and it would indeed cover 99% of needs of memory dump :-)

See above. In the watches window you can get mem dumps. And you can override size of. The magnify glass gives you space for a 16 bytes per line format (use the splitter to make space). Downside it is multi purpose and does not use a monospaced font.



Arioch

  • Sr. Member
  • ****
  • Posts: 415
Re: Memory - hex dumps
« Reply #1 on: September 17, 2022, 09:32:54 pm »
Thanks, i'll test it later.

Maybe it has to be made easy to find, in the GUI explicitly or in the documentation.

Coming from Delphi, I was looking for it and did not find. It also did not help that F1 keystroke is kileld by Anchor Docking - and there is no mouse-clickable HELP button to signal presense of iwndow help

MarkMLl

  • Hero Member
  • *****
  • Posts: 5860
Re: Memory - hex dumps
« Reply #2 on: September 17, 2022, 09:40:27 pm »
Thanks for that Martin. As somebody who is basically a systems+comms programmer I do tend to find the default decimal display somewhat dismal.

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: 8602
  • Debugger - SynEdit - and more
    • wiki
Re: Memory - hex dumps
« Reply #3 on: September 17, 2022, 10:22:26 pm »
Here is the help page
https://wiki.lazarus.freepascal.org/IDE_Window:_Watch_list

It is a bit dated, but maybe someone has time.

- The "magnifier" needs to be added, the icon will be in the lazarus install's images folder...
- The properties are there as image: Adding things like "memory dump" and "hexadecimal" into the text would help it being found by the search field.
-- Also the effect of "repeat count" on the mem dump
- Taking a Laz 2.3  Watches Screenshot, and add details about expanding structures and the array viewer => great.

Other suggestions, probably welcome, always possible to discuss here first if there is any doubt.

Arioch

  • Sr. Member
  • ****
  • Posts: 415
Re: Memory - hex dumps
« Reply #4 on: September 17, 2022, 11:05:30 pm »
Here is the help page
https://wiki.lazarus.freepascal.org/IDE_Window:_Watch_list

...but new users don't know it exists.

There is no "Help" button visually, and keyboard F1 might not work... https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39890

So why i said the debug tool dialogs should have HELP button added. MAybe as in Windows-95 style caption bar (see TForm.BorderIcons), if not a regular TButton
« Last Edit: September 17, 2022, 11:07:01 pm by Arioch »

 

TinyPortal © 2005-2018