Re: [Lazarus] Android LCL example with 2.7.1

2013-03-07 Thread Sven Barth

Am 07.03.2013 07:25, schrieb Mattias Gaertner:

On Thu, 7 Mar 2013 07:07:07 +0100
Sven Barth  wrote:


Am 06.03.2013 23:53 schrieb "Mattias Gaertner" :

On Wed, 06 Mar 2013 15:48:43 +0100
Sven Barth  wrote:


Hello together!

I've managed to run the Android LCL example compiled with the
arm-android port of 2.7.1 on the Android emulator (API version 8) with
default settings (no -Cparmv6). What is important though is that in the
lcl.lpk the following code in the Conditionals is removed (line 49)
otherwise a SIGILL error happens when starting the app:

=== code begin ===

if TargetCPU='arm' then
CustomOptions := '-CpARMV6';

=== code end ===

It can only be removed for fpc 2.7.1?
What about 2.6.2?

The only compiler that supports arm-android is 2.7.1.

Thanks. I removed it.

Thank you.

Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Android LCL example with 2.7.1

2013-03-07 Thread Sven Barth

Am 06.03.2013 23:28, schrieb leledumbo:

Nice news Sven, so now I can drop the hacked 2.5.1?
Exactly. Just follow the instructions at 
http://wiki.freepascal.org/Android to generate a 2.7.1 compiler for 
arm-android (of course with a bit of /dev/brain0 applied ;) ). Also 
possible is i386-android. mips-android is AFAIK not supported yet.


Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What's "External: SIGFPE"?

2013-03-07 Thread leledumbo
> Could anyone explain what's SIGFPE?

SIGFPE stands for SIGnal Floating Point Exception, that is caused by a
probably invalid operation involving floating points.

> Why there is a SetExceptionMask?

Probably to override the same thing already done by (implicitly used)
libraries, e.g. gtk2

> Why a normal empty form application will generate SIGFPE with these masks,
> and how to trace down to the cause of this error?

Because setting the mask means telling the processor to generate (or not to
generate? I forgot) SIGFPE for the given operations. e.g. exZeroDivide may
trigger SIGFPE if there's a division by zero with floating point operation.
How to trace? You already get it, the program will report the line that
causes it, you can directly go to the respective line to see what happens.
But this requires that the code lies in the program space (not in external
library) and the code is compiled with runtime error backtrace (-gl).
Otherwise, the program can only report as deep as it can find.



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-What-s-External-SIGFPE-tp4029706p4029715.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What's "External: SIGFPE"?

2013-03-07 Thread Xiangrong Fang
2013/3/7 leledumbo 


> Because setting the mask means telling the processor to generate (or not to
> generate? I forgot) SIGFPE for the given operations. e.g. exZeroDivide may
> trigger SIGFPE if there's a division by zero with floating point operation.
> How to trace? You already get it, the program will report the line that
> causes it, you can directly go to the respective line to see what happens.
> But this requires that the code lies in the program space (not in external
> library) and the code is compiled with runtime error backtrace (-gl).
> Otherwise, the program can only report as deep as it can find.
>

I don't understand:

1) even if I set the masks, why an empty LCL application generate SIGFPE?
It means that somewhere GTK or whatever library *indeed* do things like
1/0, only that they are normally hidden/not reported?

2) I already found the problem in my code which is a like look like:

*if tbLog.Down then Y := exp(Y);*

And Y is a big number e.g. 2500, which caused floating point overflow.
The problem was that the number itself should be Log()ed, so that exp()
only restore its original value.   That was my bug, but the weird thing is
that SIGFPE is generated in unit LCLType on the line that set font height,
which is very innocent, and after I commented out the font.Height
operation, the SIGFPE slipped to somewhere else, but NEVER on the line that
generated it!

Could you explain why? and how to locate where the SIGFPE occurred?

Thanks!
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] What's "External: SIGFPE"?

2013-03-07 Thread Kostas Michalopoulos
Most likely it is your GTK+ theme. Many GTK+ themes and theme engines abuse
floating point calculations which go unnoticed normally since the vast
majority of C/C++ programs do not check for them. The solution is to do
something like (IIRC):

SetExceptionMask([]);


Which disables all floating point exceptions. Alternatively switch to a
theme that doesn't mess FP calculations, bu you can't guarantee that your
users will have it.


On Thu, Mar 7, 2013 at 10:04 AM, Xiangrong Fang  wrote:

> 2013/3/7 leledumbo 
>
>
>> Because setting the mask means telling the processor to generate (or not
>> to
>> generate? I forgot) SIGFPE for the given operations. e.g. exZeroDivide may
>> trigger SIGFPE if there's a division by zero with floating point
>> operation.
>> How to trace? You already get it, the program will report the line that
>> causes it, you can directly go to the respective line to see what happens.
>> But this requires that the code lies in the program space (not in external
>> library) and the code is compiled with runtime error backtrace (-gl).
>> Otherwise, the program can only report as deep as it can find.
>>
>
> I don't understand:
>
> 1) even if I set the masks, why an empty LCL application generate SIGFPE?
> It means that somewhere GTK or whatever library *indeed* do things like
> 1/0, only that they are normally hidden/not reported?
>
> 2) I already found the problem in my code which is a like look like:
>
> *if tbLog.Down then Y := exp(Y);*
>
> And Y is a big number e.g. 2500, which caused floating point overflow.
> The problem was that the number itself should be Log()ed, so that exp()
> only restore its original value.   That was my bug, but the weird thing is
> that SIGFPE is generated in unit LCLType on the line that set font height,
> which is very innocent, and after I commented out the font.Height
> operation, the SIGFPE slipped to somewhere else, but NEVER on the line that
> generated it!
>
> Could you explain why? and how to locate where the SIGFPE occurred?
>
> Thanks!
>
>
>
> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Free-pascal question

2013-03-07 Thread Chavoux Luyt
Hi all

This might be slightly off-topic... I have some fpc -related questions:
1. How good is Lazarus/fpc for embedded programming (compared to C)? It
will probably be on a (custom-made) device with ARM/Atmel-based chipset
(with or without an OS - will this make a difference?).
2. I remember that the original Turbo Pascal (and Delphi) could use in-line
(i386) assembler. Is this still possible with Lazarus/free-pascal and for
other chipsets like Atmel/ARM?

Thanks
Chavoux
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Sven Barth

Am 07.03.2013 10:45, schrieb Chavoux Luyt:
1. How good is Lazarus/fpc for embedded programming (compared to C)? 
It will probably be on a (custom-made) device with ARM/Atmel-based 
chipset (with or without an OS - will this make a difference?).
I can't tell you how good or bad it is, but there are quite some boards 
supported already by FPC. You can take a look here for the current list: 
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/embedded/arm/
2. I remember that the original Turbo Pascal (and Delphi) could use 
in-line (i386) assembler. Is this still possible with 
Lazarus/free-pascal and for other chipsets like Atmel/ARM?
FPC supports inline assembly for each supported target except the JVM 
ones. Of course you need to write in the correct assembly language for 
each CPU (and maybe differentiate with {$ifdef CPUXYZ} if you want to 
support multiple processors).


As a sidenote: For pure Pascal development (and I consider embedded 
development part of this) I suggest you to use the fpc-pascal list in 
the future.


Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Graeme Geldenhuys
On 2013-03-07 09:45, Chavoux Luyt wrote:
> 
> This might be slightly off-topic... I have some fpc -related questions:
> 1. How good is Lazarus/fpc for embedded programming (compared to C)?

FPC works just fine for embedded programming. I haven't tried LCL for
such tasks, simply because LCL is to "fat" for my taste. Rather large
executables, even for a "hello world" application.

Paul Breneman has some excellent information about embedded work with
FPC in combination with fpGUI toolkit. A simple 2.5MB download and you
have a compiler, fpGUI toolkit, Visual Forms Designer and the
experimental Maximus IDE. Due to the usage of fpGUI, executables are
nice and small too.

I've tested his downloads with a Garmin iQue M5 (WinCE device), and with
a Raspberry Pi (ARM Linux). Paul uses different devices.

  http://www.turbocontrol.com/easyfpgui.htm


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Michael Schnell

On 03/07/2013 10:45 AM, Chavoux Luyt wrote:
1. How good is Lazarus/fpc for embedded programming (compared to C)? 
It will probably be on a (custom-made) device with ARM/Atmel-based 
chipset (with or without an OS - will this make a difference?).



What exactly do you mean by embedded ?

Possible definitions include:

 - (hard) real-time
 - direct hardware access
 - interrupt programming
 - code in Flash memory (for "diskless" low-cost hardware)
 - no OS
 - no GUI (for "headless" low-cost hardware)
 - memory space efficiency (for low-cost hardware)
 - speed efficiency (for low-cost hardware)
 - cross compiling
 - remote debugging

Some people (especially in the German Lazarus forum) currently are 
experimenting with cross compiling and remote debugging using a QNAP NAS 
(headless ARM Linux device using an embedded "diskless" Linux distribution)


Others are experimenting with Android (on ARM-Linux) or devices like 
"Raspberry Pi" (extremely cheap ARM-Linux device constructed for 
educational use).


-Michael




--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Sven Barth

Am 07.03.2013 11:11, schrieb Michael Schnell:
Others are experimenting with Android (on ARM-Linux) or devices like 
"Raspberry Pi" (extremely cheap ARM-Linux device constructed for 
educational use).
Note: for Android the new native android target in 2.7.1 should be used 
(currently supports arm-android and i386-android, but AFAIK not yet 
mips-android).


Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Michael Schnell

On 03/07/2013 11:28 AM, Sven Barth wrote:

Note: for Android the new native android target in 2.7.1 should be used

I understand this is the JVM compiler. Correct ?

-Michael

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] History Window?

2013-03-07 Thread Graeme Geldenhuys
Hi,

I accidentally pressed Ctrl+Alt+H and it brought up a History window.
See attached image. Pressing F1 didn't bring up any help (using Lazarus
1.0.6).

What is that window used for?


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

<>--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Sven Barth

Am 07.03.2013 11:35, schrieb Michael Schnell:

On 03/07/2013 11:28 AM, Sven Barth wrote:

Note: for Android the new native android target in 2.7.1 should be used

I understand this is the JVM compiler. Correct ?
No, you're wrong. Since a few weeks native android support was merged to 
trunk. When I write arm-android, i386-android and mips-android I mean 
these the native platforms. If I talk about the JVM one that is jvm-android.


Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Chavoux Luyt
Hi Michael

On 7 March 2013 12:11, Michael Schnell  wrote:

> On 03/07/2013 10:45 AM, Chavoux Luyt wrote:
>
>> 1. How good is Lazarus/fpc for embedded programming (compared to C)? It
>> will probably be on a (custom-made) device with ARM/Atmel-based chipset
>> (with or without an OS - will this make a difference?).
>>
>>  What exactly do you mean by embedded ?
>
I am not going to build the hardware myself, but will probably (help to)
program the device. It will be a programmable GPS collar, so I am not sure
what the engineers are going to include. But to answer your questions:

>
> Possible definitions include:
>
>  - (hard) real-time
>
Probably not necessary. It will need a real-time clock, though.

>  - direct hardware access
>
Yes, this will be needed.

>  - interrupt programming
>
Yes, probably. I want to include an accelerator meter and it should send a
hardware interrupt to tell the device to take a GPS reading.

>  - code in Flash memory (for "diskless" low-cost hardware)
>
Definitely diskless to fit in a GPS collar.

>  - no OS
>
Although an OS will probably make things easier, low power consumption will
be the most (?) important requirement. An OS that runs all the time (or use
too much power to boot up every time it receives a hardware interrupt) will
probably not work (even if an open-source OS exists for a specific chipset).

>  - no GUI (for "headless" low-cost hardware)
>
Yes! (If there is an OS, it might be possible to have a web interface and
embedded web server for settings etc., though).

>  - memory space efficiency (for low-cost hardware)
>
Yes! It needs to store at least  2160 GPS data points (in addition to the
main program itself and any configuration settings).

>  - speed efficiency (for low-cost hardware)
>
Yes!

>  - cross compiling
>
Yes, the development will be done on Linux (either fpc or c cross-compiler)
and written to the device using whatever pins/connectors are available
(probably USB and possibly wireless/UHF - this will depend on hardware
design)

>  - remote debugging
>
Will depend on the chipset and hardware design... can this be done using
fpc?

.Thanks
Chavoux
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Reinier Olislagers
On 7-3-2013 11:57, Chavoux Luyt wrote:
> Will depend on the chipset and hardware design... can this be done using
> fpc?
fpc list please.


I'm sure having this kind of information there would be helpful both to
current subscribers and people searching the fpc list later.

Having it in the Laz list makes it awkward to search and pollutes the
dicussions.

Thanks,
Reinier

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Android LCL example with 2.7.1

2013-03-07 Thread Samuel Herzog
Hello,

any estimate when the Lazarus daily snapshots will contain fpc 2.7.1.

Regards,

Sam




 Von: Sven Barth 
An: lazarus@lists.lazarus.freepascal.org 
Gesendet: 9:35 Donnerstag, 7.März 2013
Betreff: Re: [Lazarus] Android LCL example with 2.7.1
 
Am 07.03.2013 07:25, schrieb Mattias Gaertner:
> On Thu, 7 Mar 2013 07:07:07 +0100
> Sven Barth  wrote:
>
>> Am 06.03.2013 23:53 schrieb "Mattias Gaertner" :
>>> On Wed, 06 Mar 2013 15:48:43 +0100
>>> Sven Barth  wrote:
>>>
 Hello together!

 I've managed to run the Android LCL example compiled with the
 arm-android port of 2.7.1 on the Android emulator (API version 8) with
 default settings (no -Cparmv6). What is important though is that in the
 lcl.lpk the following code in the Conditionals is removed (line 49)
 otherwise a SIGILL error happens when starting the app:

 === code begin ===

 if TargetCPU='arm' then
     CustomOptions := '-CpARMV6';

 === code end ===
>>> It can only be removed for fpc 2.7.1?
>>> What about 2.6.2?
>> The only compiler that supports arm-android is 2.7.1.
> Thanks. I removed it.
Thank you.

Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Chavoux Luyt
Hi Reinier

On 7 March 2013 13:18, Reinier Olislagers  wrote:
>
> On 7-3-2013 11:57, Chavoux Luyt wrote:
> > Will depend on the chipset and hardware design... can this be done using
> > fpc?
> fpc list please.

I am not currently a member of that list. Should I join fpc-Pascal or
fpc-devel to ask this? (I assume it is one of the lists found on this
page: http://www.freepascal.org/maillist.var)?

Regards
Chavoux

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Android LCL example with 2.7.1

2013-03-07 Thread Felipe Monteiro de Carvalho
But why is -CpARMV6 a problem? It is correct. The default is ARMv4
which is not supported by Android, so we change it to ARMv6. Looks
like a compiler bug or change in the code generator? Also, was the
default changed?

More details should appear by finding the exact assembler instruction
which causes the problem, like I did when I added this directive.

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Sven Barth

Am 07.03.2013 12:32, schrieb Chavoux Luyt:

Hi Reinier

On 7 March 2013 13:18, Reinier Olislagers  wrote:

On 7-3-2013 11:57, Chavoux Luyt wrote:

Will depend on the chipset and hardware design... can this be done using
fpc?

fpc list please.

I am not currently a member of that list. Should I join fpc-Pascal or
fpc-devel to ask this? (I assume it is one of the lists found on this
page: http://www.freepascal.org/maillist.var)?
As you want to use FPC (or at least research whether you should) the 
correct list would be fpc-pascal. And the link is correct.


Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] Error while compiling

2013-03-07 Thread Ivo Carrajola

Hello,


When i try to compile a a simple project, the linker complains:

   Linking demo
   /usr/bin/ld: warning: link.res contains output sections; did you
   forget -T?
   /usr/local/lib64/libX11.a(xcb_io.o): In function `process_responses':
   (.text+0x4f9): undefined reference to `xcb_xlib_unlock'
   /usr/local/lib64/libX11.a(xcb_io.o): In function `process_responses':
   (.text+0x522): undefined reference to `xcb_xlib_lock'
   /usr/local/lib64/libX11.a(xcb_io.o): In function `_XReply':
   (.text+0x9ec): undefined reference to `xcb_xlib_unlock'
   /usr/local/lib64/libX11.a(xcb_lock.o): In function `_XPutXCBBuffer':
   (.text+0xcb): undefined reference to `xcb_get_request_sent'
   /usr/local/lib64/libX11.a(xcb_lock.o): In function `_XPutXCBBuffer':
   (.text+0x41f): undefined reference to `xcb_get_request_sent'
   /usr/local/lib64/libX11.a(xcb_lock.o): In function `_XGetXCBBuffer':
   (.text+0x5f5): undefined reference to `xcb_get_request_sent'
   /usr/local/lib64/libX11.a(xcb_lock.o): In function `_XCBUnlockDisplay':
   (.text+0x73c): undefined reference to `xcb_xlib_unlock'
   /usr/local/lib64/libX11.a(xcb_lock.o): In function `_XCBUnlockDisplay':
   (.text+0x760): undefined reference to `xcb_get_request_sent'
   /usr/local/lib64/libX11.a(xcb_lock.o): In function `_XCBLockDisplay':
   (.text+0x80c): undefined reference to `xcb_xlib_lock'
   demo.lpr(20,1) Error: Error while linking
   demo.lpr(20,1) Fatal: There were 1 errors compiling module, stopping
   TMessagesView.CollectLineParts WARNING: 28<>8 SrcLine=demo.lpr(20,1)
   Fatal: There were 1 errors compiling module, stopping


I'm on openSuse 12.2, using lazarus-1.0.6-0 and fpc-2.6.0-2.
What library am i missing?


Thanks

--
Ivo Carrajola
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Android LCL example with 2.7.1

2013-03-07 Thread Dejan Boras
Think it's a problem because the android emu up to android 2.3 (api level
9) uses ARMv5, not ARMv6.

On Thu, Mar 7, 2013 at 12:33 PM, Felipe Monteiro de Carvalho <
felipemonteiro.carva...@gmail.com> wrote:

> But why is -CpARMV6 a problem? It is correct. The default is ARMv4
> which is not supported by Android, so we change it to ARMv6. Looks
> like a compiler bug or change in the code generator? Also, was the
> default changed?
>
> More details should appear by finding the exact assembler instruction
> which causes the problem, like I did when I added this directive.
>
> --
> Felipe Monteiro de Carvalho
>
> --
> ___
> Lazarus mailing list
> Lazarus@lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Android LCL example with 2.7.1

2013-03-07 Thread Felipe Monteiro de Carvalho
On Thu, Mar 7, 2013 at 9:05 AM, Dejan Boras  wrote:
> Think it's a problem because the android emu up to android 2.3 (api level 9)
> uses ARMv5, not ARMv6.

ARMv5 and v6 are nearly identical and I´ve never seen a real device
that uses ARMv5, all low end use v6. Also I tested the previous setup
in the emulator and also 30+ devices. I doubt that the new setup wont
crash in a lot of real devices.

-- 
Felipe Monteiro de Carvalho

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] History Window?

2013-03-07 Thread Martin

On 07/03/2013 10:45, Graeme Geldenhuys wrote:

Hi,

I accidentally pressed Ctrl+Alt+H and it brought up a History window.
See attached image. Pressing F1 didn't bring up any help (using Lazarus
1.0.6).

What is that window used for?



F1 should bring you to the wiki 
http://wiki.lazarus.freepascal.org/IDE_Window:_Debug_History


The debugger keeps track of the last 25 times the app stopped. (e.g. 
breakpoint, finished step).
This allows you to view stack, watches etc, as they were then. However, 
only if you stopped long enough to allow evaluation. If you immediately 
step again, then not all watches are evaluated.


There is also a breakpoint, that will not stop, but take a snapshot. So 
if you have a focus sensitive app, you can collect all data, and later 
review it.


Finally, it has an export, so you can send your debug session to a 
fellow developer. (Though there is an issue with clicking stack entries, 
as pathes are not yet adjusted)


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Michael Schnell

On 03/07/2013 11:57 AM, Chavoux Luyt wrote:


Although an OS will probably make things easier, low power consumption 
will be the most (?) important requirement.


If power consumption is a very major issue, the best possible arch that 
somewhere is in reach is the PIC32 which in fact is a MIPS variant. I 
know that a MIPS implementation for the fpc compiler is being worked on.



 - no GUI (for "headless" low-cost hardware)
Yes! (If there is an OS, it might be possible to have a web interface 
and embedded web server for settings etc., though).


While no-GUI projects are not too hard a problem, you need to consider, 
that the normal Delphi like "event driven" programming paradigm is not 
possible with the current Lazarus library (it is possible with the "mse" 
library, that is similar on other accounts.)


 - cross compiling

Yes, the development will be done on Linux (either fpc or c 
cross-compiler) and written to the device using whatever 
pins/connectors are available (probably USB and possibly wireless/UHF 
- this will depend on hardware design)


While fpc officially does support Cross compiling, it is no especially 
easy to get it working (see the appropriate Wiki articles)


 - remote debugging

Will depend on the chipset and hardware design... can this be done 
using fpc?




Lazarus uses gdb for debugging. If you don't use an OS (such as Linux) 
on the target, you can't use the GNU created gdb "receiver" (either gdb 
or gdbserver). I seem to remember that in this forum I read something 
about a standard protocol that allows to attach hardware debugger 
devices, that someone might be willing to implement into Lazarus.


-Michael
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Android LCL example with 2.7.1

2013-03-07 Thread Sven Barth

Am 07.03.2013 12:33, schrieb Felipe Monteiro de Carvalho:

But why is -CpARMV6 a problem? It is correct. The default is ARMv4
which is not supported by Android, so we change it to ARMv6. Looks
like a compiler bug or change in the code generator? Also, was the
default changed?
The default for Android was changed to armv5t (though I don't know why 
Yury chose the *t variant...)

More details should appear by finding the exact assembler instruction
which causes the problem, like I did when I added this directive.
The offending instruction was a "uxth" in 
customdrawn_androidproc.FPColorToAndroidColor which is only generated by 
the compiler if the CPU type is ARMv6 or higher (and according to the 
reference manual for ARM it does indeed only exist for ARMv6 and 
higher). And this instruction crashed the emulator (which is ARMv5 at 
least for API version 8). I've also tested the LCL test app compiled for 
ARMv5 on my Evo 3D which has an ARMv7 processor and the app runs without 
any crashes.


As 2.7.1 officially suppports (arm-)android you can now report bugs if 
an app crashes because of an illegal instruction, but please state the 
CPU's model as detailed as possible (for my phone it would be "Qualcomm 
Snapdragon S3 MSM8260")


Regards,
Sven

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Graeme Geldenhuys
On 2013-03-07 12:33, Michael Schnell wrote:
> While fpc officially does support Cross compiling, it is no especially 
> easy to get it working (see the appropriate Wiki articles)


All it takes is a bit of practice with the installation.

Alternatively, use CodeTyphon
[http://www.pilotlogic.com/sitejoom/index.php/codetyphon]. CodeTyphon is
a repackaged FPC & Lazarus with lots of cross-compiling options all
built-in, plus every component you could ever wish for. It is like the
"Studio version" of Lazarus. :) Quite impressive actually.


> Lazarus uses gdb for debugging. If you don't use an OS (such as Linux) 
> on the target, you can't use the GNU created gdb "receiver" (either gdb 
> or gdbserver).

You could also debug using a debugserver and the dbugintf unit included
with FPC. Making it communicate over TCP shouldn't be too hard, and is
on my todo list. FPC includes a rudimentary console debug server, and
LCL and fpGUI versions also exist, which are much better.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] History Window?

2013-03-07 Thread Graeme Geldenhuys
On 2013-03-07 12:19, Martin wrote:
> 
> The debugger keeps track of the last 25 times the app stopped. (e.g. 
> breakpoint, finished step).

Nice. Thanks for the explanation.


> There is also a breakpoint, that will not stop, but take a snapshot. So 
> if you have a focus sensitive app, you can collect all data, and later 
> review it.

Very handy. I had to always resort to using the "debug server" (and
dbugintf unit) to accomplish this.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] [FEATURE] Improves the project inspector

2013-03-07 Thread silvioprog
Hello,

Please see:

http://bugs.freepascal.org/view.php?id=24010

Thank you!

-- 
Silvio Clécio
My public projects - github.com/silvioprog
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Error while compiling

2013-03-07 Thread leledumbo
Installing libx11-dev should automatically install libxcb-dev (which is the
one you miss)



--
View this message in context: 
http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Error-while-compiling-tp4029732p4029741.html
Sent from the Free Pascal - Lazarus mailing list archive at Nabble.com.

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Ubuntu 12.10 install problem

2013-03-07 Thread appjaws

Hi,
I am running lazarus on amd64bit kubuntu 12.10 with kde 4.9.5 This is 
what I did to get the latest versions.
I downloaded the following rpm versions from the lazarus and freepascal 
sites.

  fpc_2.6.0-2.fc17_amd64.rpm
  fpc-doc_2.6.0-2.fc17_amd64.rpm
  fpc-src_2.6.0-2.fc17_amd64.rpm
  lazarus_1.0.4-0_amd64.rpm

I then converted to deb

 sudo alien -k fpc-2.6.0-2.fc17.x86_64.rpm
 sudo alien -k fpc-doc-2.6.0-2.fc17.x86_64.rpm
 sudo alien -k fpc-src-2.6.0-2.fc17.x86_64.rpm
 sudo alien -k lazarus-1.0.4-0.x86_64.rpm

then installed the deb versions
  sudo dpkg -i fpc_2.6.0-2.fc17_amd64.deb
  sudo dpkg -i fpc-doc_2.6.0-2.fc17_amd64.deb
  sudo dpkg -i fpc-src_2.6.0-2.fc17_amd64.deb
  sudo dpkg -i lazarus_1.0.4-0_amd64.deb

This all went without a hitch and is fully working.  This remind me I 
must update to lazarus 1.0.6.


Hope this helps
Paul

--
---This message has been sent using Thunderbird on kubuntu---

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Free-pascal question

2013-03-07 Thread Chavoux Luyt
Hi

On 7 March 2013 15:20, Graeme Geldenhuys  wrote:
> On 2013-03-07 12:33, Michael Schnell wrote:
>> While fpc officially does support Cross compiling, it is no especially
>> easy to get it working (see the appropriate Wiki articles)
>
>
> All it takes is a bit of practice with the installation.
>
> Alternatively, use CodeTyphon
> [http://www.pilotlogic.com/sitejoom/index.php/codetyphon]. CodeTyphon is
> a repackaged FPC & Lazarus with lots of cross-compiling options all
> built-in, plus every component you could ever wish for. It is like the
> "Studio version" of Lazarus. :) Quite impressive actually.
Thanks Graeme, I'll have a look.

>> Lazarus uses gdb for debugging. If you don't use an OS (such as Linux)
>> on the target, you can't use the GNU created gdb "receiver" (either gdb
>> or gdbserver).
>
> You could also debug using a debugserver and the dbugintf unit included
> with FPC. Making it communicate over TCP shouldn't be too hard, and is
> on my todo list. FPC includes a rudimentary console debug server, and
> LCL and fpGUI versions also exist, which are much better.
Or use a well-placed oscilloscope. ;-)
I have done a few embedded projects in the past (using C/assembler)
where that was my only debugging tool...
not so much fun for a programmer, but a good learning experience.
Unfortunately, I don't have my own oscilloscope (they are really
expensive), but I hope one of the engineers will have one.

Cheers
Chavoux

--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Ok I give up!

2013-03-07 Thread waldo kitty

On 3/5/2013 13:01, Jürgen Hestermann wrote:

I just recently installed a snapshot version of Lazarus on Windows (I cannot 
copy
the version number from the "about" window because I cannot select text. Why?).


right click on the help window where the graphic is ;)


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


[Lazarus] SQLite - disk I/O error only on virtual machine

2013-03-07 Thread Krzysztof
Hi,

I noticed strange behavior when running application on virtualbox linux
mint 14 64bit machine. This occur only when I attach second database to
sqlite3connection and then call SQLTransaction.Commit. This is my code:

  try
FConn := TMySqlite3Connection.Create(Self);
FConn.Transaction := SQLTransaction1;
FConn.DatabaseName :=
IncludeTrailingBackslash(ProgramDirectory)+'db1.sqlite';
FConn.Connected := True;
FConn.ExecSQLNoTrans('attach database '+
  QuotedStr(IncludeTrailingBackslash(ProgramDirectory)+'db2.sqlite')+'
as d2');

FConn.ExecuteDirect('create table if not exists a(col integer)');
FConn.ExecuteDirect('create table if not exists d2.b(col integer)');
SQLTransaction1.Commit;
  except on e: Exception do
ShowMessage(e.Message);
  end;

Even if error occur, commit succesful created tables. When I run it on
normal Linux installation (also Mint 14 64bit) then everything is ok. Both
OS have same sqlite version (3.7.13) from ubuntu repo.
I will post this report on sqlite mailing list too, but maybe you had
similar problem.

Regards
--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus