thank you for the quick answer and already some solutions! I haven't tried them yet because I just changed my program to store the return value in a temporary variable instead of just writing the calculating expression in the return statement.
Additionally, I used the "show/expand variable" command very often. It's the simplest way I found to show the dump of a (dereferenced) pointer variable. Or is there any easier way to derefence a pointer and show that address in the dump?
By the way I think there's a problem with the dump: Unfortunately I don't really know whether I've found a way to reproduce it, but if I switch in the dump from "Dec" display to "Hex" it just shows "Error" in all fields. As soon as I select another datatype it works (also if I select the original datatype (uInteger) again). You may try this (and hopefully you can reproduce it this way):
Use the following code, compile with "-s console -g" fbc 1.00 or fbc 0.91 (other versions may also work, but I've tried just these two):
Code: Select all
Dim heap As Any Ptr
Dim heapSz As UInteger
'heap of size 32 Kbytes
this.heapSz = 32*1024
this.heap = Allocate(heapSz)
this.heap = 0
Dim Shared h As Heap
Load the EXE into FbDebugger and step until you've passed the allocation in the constructor.
Select the HEAP var in "Proc/var" tab under "ThID=..." -> "THIS ..." and then right click and select "show/expand variable".
In the popup window select the pointee ("<void> = ...") and then click "Dump" on the right and close the popup window.
Finally right click on the dump-area (the "Manage dump" popup window appears) and select "Hex".
All values show "Error".
As soon as you select "uInteger" again it works.
And yet another little wish: It would be nice if the dump would use a fixed-width font.
edit: some other nice-to-have features I can think of while using it:
Allow to directly not only dump variable, but - in case of pointers - dump dereferenced pointer variable.
Allow to copy values in memory dump to clipboard (introduce context menu)
"Goto address" context-menu command in memory dump if right click on an address (32-bit value).
Maybe also allow to edit memory contents in memory dump?
Scrollbar in memory dump (maybe without scrollbar, but up/down arrows and mouse wheel)
Of course some of these ideas will be quite difficult/costly to implement; so take it just as ideas and drop the ones you think that are too hard to implement ;-)
Thank you SARG for all the effort you put into FbDebugger!