[Lazarus] Improve message dialog

Benito van der Zander benito at benibela.de
Fri May 18 14:26:16 CEST 2012


>
> Do you have an example where it shows the wrong length? 
Always. (but I haven't updated Lazarus in a while, it's still r36797, 
perhaps it was fixed)
E.g:

program Project1;
{$mode objfpc}{$H+}
uses Classes;
var x: array of TRect;
begin
    setlength(x, 3);
    x[2].Left:= 4;
    writeln;
end.

>
> You can change the watch type to memory. 
Nice, there it is. Last time I checked it was disabled...

Although it takes a while to figure out that you have to write own 
addresses like (0x7fffffffe9c0)^.



Benito

On 05/18/12 13:57, Martin wrote:
> On 18/05/2012 12:18, Benito van der Zander wrote:
>> Hi,
>> the watch dialog is already much better than it used to be (remember 
>> the time, it just dumped the entire gdb output in a single line...)
>> so I think there are two other features that are really important for 
>> it:
>>
>> * complete support for dynamical arrays (still shows the wrong length 
>> / not all elements,  or "No symbol \"length\" in current context." )
>
> Do you have an example where it shows the wrong length?
> http://imagebin.org/212839  First thing in the watch is the len (and 
> yes it is a dyn array)
>
> "length" is a function. And function evaluation does not yet work 
> (would be nice to have, but different topic).
> Simulating "length" imho is no good. Because if there is a local 
> function of the same name, the simulation still had the default 
> behaviour, and the result would be wrong.
> Simulating is also not needed, since len is shown.
>
> About showing the content of dyn arrays. Currently the first 5 entries 
> are shown.
>
> One of the issues here is that the IDE must ask gdb for each entry. 
> This can be a very time consuming process. And since a dynamic array 
> can have thousands of entries, some limit need to apply. ( *** One day 
> this should be made configurable. *** )
>
> If you do want to change your own limit:
> debugger\gdbtypeinfo.pp  line 2025
>   FArrayIndexValueLimit := 5;
>
> For multi dimensional arrays, the nested level have the limit lowered 
> by 3 for each level...
>
>
>>
>> * direct memory inspection:
>>    So you can print all bytes from address $123 to $456, or all 
>> TRects from @foo[0] to @foo[high(foo)]...
>>    Then, if gdb fails to understand again some types, you can still 
>> watch the variables.
>
> You can change the watch type to memory.
> Of course it would be nice to have a better viewer, but with the new 
> "detail pane" (from the patch), it is usable.
>
>
>
> -- 
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus




More information about the Lazarus mailing list