[Lazarus] [fpc-devel] win64 dwarf patch

Michael Van Canneyt michael at freepascal.org
Sat Oct 16 12:57:44 CEST 2010



On Sat, 16 Oct 2010, Hans-Peter Diettrich wrote:

> And3mD schrieb:
>> I added bug report about using Tag as Pointers in IDE
>> 
>> http://bugs.freepascal.org/view.php?id=17642
>
> For some reason (read-only???) I could not add a note there, so I'll present 
> my ideas here:
>
> IMO Tag should become an int64 for all components, to overcome platform and 
> streaming problems. More properties can be introduced, for best compatibility 
> with existing code (Tag64, TagPtr). These properties could be based on the 
> same int64 field, i.e. r/w part of it, and only that field is streamed. And 
> when we just are extending the type, we also could consider to make it big 
> enough to hold a method reference...

Using tag as a pointer is plain wrong coding, so this change will not make it.

Moreover, streaming it is pure nonsense: There is no guarantee that your pointer
will point to the same object, or indeed whether it will exist at all when the 
program is run.

The IDE code is simply wrong, and should be fixed properly by creating a 
TMenuItem descendent that contains a reference to the notebook page, and 
use that class when constructing the menu.

Michael.



More information about the fpc-devel mailing list