[fpc-pascal] Re: Inconsistency detected by ld.so

2009-12-01 Thread Seth Grover
Interestingly: $ ldd tw12704b linux-gate.so.1 => (0x00c69000) libtw12704a.so => ./libtw12704a.so (0x00701000) However, if I add a unit that uses glibc (like the systemlog unit) I get: $ ldd tw12704b linux-gate.so.1 => (0x00df6000) libtw12704a.so => ./libtw12704a

Re: [fpc-pascal] Linux : Using SDL with GTK2 ?

2009-12-01 Thread Darius Blaszyk
Hi Andrew, I found this mail from you regarding attaching SDL to the used widgetset. But whatever I do I cannot get it to work. The example you attached in the email below works fine, so it has to be possible. So why not when using the LCL? I hope you don;t mind me bugging you about this, but I'v

[fpc-pascal] Inconsistency detected by ld.so

2009-12-01 Thread Seth Grover
Using the examples from the test suite for an .so and a host program (http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/tests/webtbs/tw12704a.pp?view=markup and http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/tests/webtbs/tw12704b.pp?view=markup), when I run the host program I get: $ ./tw1270

Re: [fpc-pascal] Validate heap/stack addresses

2009-12-01 Thread Anthony Walter
Oh and for querying stack pointers, there should be an OS function somewhere to give you the base stack pointer address and available stack size, though I don't know the names of functions off the top of my head. ___ fpc-pascal maillist - fpc-pascal@lis

Re: [fpc-pascal] Validate heap/stack addresses

2009-12-01 Thread Anthony Walter
On Tue, Dec 1, 2009 at 11:58 AM, Bruce Bauman wrote: > I’m trying to port/debug some ugly Pascal code. > > Is there a way I can tell if an arbitrary address is within the heap or > stack? Without hooking/replacing the memory manager, I don't believe you can handle memory tracking this information

Re: [fpc-pascal] String types in a wider perspective

2009-12-01 Thread Jonas Maebe
On 01 Dec 2009, at 18:03, Luca Olivetti wrote: > I always protect multithreaded sting access with a critical section. > Do you mean it is not needed? The reference counting of ansistrings/... is thread safe. Accessing the characters etc still requires explicit synchronisation if at least one wr

Re: [fpc-pascal] Validate heap/stack addresses

2009-12-01 Thread Jonas Maebe
On 01 Dec 2009, at 17:58, Bruce Bauman wrote: > Is there a way I can tell if an arbitrary address is within the heap or > stack? > > I want to do something like: > > Assert(ValidHeapAddress(a)) That is not possible without installing your own memory manager that tracks all allocations. Also k

Re: [fpc-pascal] String types in a wider perspective

2009-12-01 Thread Luca Olivetti
En/na Mattias Gaertner ha escrit: One of the innovations of the last years is the higher demand for multi threaded apps. Reference counted strings need atomic operations and are therefore much slower as soon as you start another thread. I always protect multithreaded sting access with a criti

[fpc-pascal] Validate heap/stack addresses

2009-12-01 Thread Bruce Bauman
I'm trying to port/debug some ugly Pascal code. Is there a way I can tell if an arbitrary address is within the heap or stack? I want to do something like: Assert(ValidHeapAddress(a)) Assert(ValidStackAddress(a)) to catch potential errors in the code. I'm guessing any address b

Re: [fpc-pascal] String types in a wider perspective (was: private integer is an illegal counter variable)

2009-12-01 Thread Mattias Gaertner
On Tue, 1 Dec 2009 14:03:37 +0200 Juha Manninen wrote: >[...] > This apparently small syntax detail has a wider symbolic message. When people > here are seriously arguing about how important ShortString is ('cause you can > save 3 bytes or something...) the message for potential new Pascal > p

[fpc-pascal] String types in a wider perspective (was: private integer is an illegal counter variable)

2009-12-01 Thread Juha Manninen
On lauantai, 28. marraskuuta 2009 12:12:19 Jürgen Hestermann wrote: > > And there are many reasons why there are so many string types nowadays. > > True. > > > Simply use {mode objfpc}{$h+} like lazarus suggests. > > I think the root cause of all these problems are generic types. They cause > m