Re: [fpc-pascal] How to analyze a core dump?

2007-06-26 Thread Luca Olivetti

En/na Tom Walsh ha escrit:


Nope, it is 'gdb -c '.  Sorry :-(


Been there, done that, got the t-shirt.
http://article.gmane.org/gmane.comp.compilers.free-pascal.general/8211

thanks for trying.

--
Luca

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to analyze a core dump?

2007-06-26 Thread Jonas Maebe


On 25 jun 2007, at 22:44, Luca Olivetti wrote:


En/na Jonas Maebe ha escrit:

On 14 jun 2007, at 19:04, Luca Olivetti wrote:
No suggestions? Is there some special option (apart from -g) that  
I should specify to compile/link my program?
No. But the garbage backtrace means that either your gdb cannot  
parse the signal handler frame, or that your program corrupted the  
call stack.


Well, I'm starting to get desperate


Try compiling everything with -gv and using valgrind


Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to analyze a core dump?

2007-06-26 Thread Luca Olivetti

En/na Jonas Maebe ha escrit:


On 25 jun 2007, at 22:44, Luca Olivetti wrote:


En/na Jonas Maebe ha escrit:

On 14 jun 2007, at 19:04, Luca Olivetti wrote:
No suggestions? Is there some special option (apart from -g) that I 
should specify to compile/link my program?
No. But the garbage backtrace means that either your gdb cannot parse 
the signal handler frame, or that your program corrupted the call stack.


Well, I'm starting to get desperate


Try compiling everything with -gv and using valgrind


running under valgrind I cannot reproduce the segment violation :-(
I should read valgrind documentation to interpret the data it prints 
out, however there's something that strikes me:


==5051== Thread 1:
==5051== Conditional jump or move depends on uninitialised value(s)
==5051==at 0x808DB59: BUTLER_TBUTLERPHONE_$__RECEIVE$ANSISTRING 
(butler.pas:444)

==5051==by 0x808F7B4: BUTLER_TSTATUSTHREAD_$__RECEIVE (butler.pas:697)
==5051==by 0x806BAA0: CLASSES_CHECKSYNCHRONIZE$LONGINT (in 
/home/luca/botphone/botphone)

==5051==by 0x804A96B: main (botphone.lpr:568)

where line 444 is:

442:  L:=length(s);
443:  if L<1 then exit;
444:  case s[1] of

so I can't see how it could possibly be uninitialized.

Bye
--
Luca
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to analyze a core dump?

2007-06-26 Thread Cesar Romero

Where S is initialized?
I only see L initialized.

[]s


Cesar Romero


442:  L:=length(s);
443:  if L<1 then exit;
444:  case s[1] of

so I can't see how it could possibly be uninitialized.

Bye


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] How to analyze a core dump?

2007-06-26 Thread Luca Olivetti

En/na Cesar Romero ha escrit:

Where S is initialized?
I only see L initialized.

[]s


Cesar Romero


442:  L:=length(s);
443:  if L<1 then exit;
444:  case s[1] of

so I can't see how it could possibly be uninitialized.


nothwithstanding the fact that if length(s)<1 line 444 won't be 
executed, so the "uninitialized" should be flagged in line 442, I know 
that this chunk is inside


procedure TButlerPhone.Receive(s: string);

so s is a parameter.
This procedure is called exclusively from

procedure TStatusThread.Receive;
begin
  FOwner.Receive(FData)
end;

(FOwner is a TButlerPhone)

which in turn is called only here:

  FData:=copy(buffer,i+2,L-1);
  if buffer[i+L+1]=checksum(FData) then
  begin
   if not terminated then synchronize(@Receive);
  end else


Bye
--
Luca

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Re: Re: Lua and Freepascal and ARM

2007-06-26 Thread Paul Nicholls

 Hi Paul,



 I also need, as you, to call lua procedures from delphi/fpc and I need
Lua
 call procedures inside delphi/fpc.
 Should it posible to share with me your implementation in order to check
it
 works with fpc (linux-arm)?


Sure, I am not sure if I am allowed to add attachments to this mailing list
but I will attempt to add my Lua units and an example program for you to use
:)

EDIT: the previous post I sent hasn't appeared yet so I am assuming I can't 
post with attachments to the group so I have uploaded the files, you can 
download them here:


fpc4gp2x.eonclash.com/downloads/lua5.1.dll
fpc4gp2x.eonclash.com/downloads/luaobjects.pas
fpc4gp2x.eonclash.com/downloads/LuaPas.pas
fpc4gp2x.eonclash.com/downloads/LuaTest.dpr

Lua5.1.dll is the Windows Lua DLL for this version.
LuaTest.dpr is a Delphi program (also works under Freepascal) showing how to
use my TLuaScript class.
LuaPas.pas is the interface file for Lua version 5.1
LuaObjects.pas is the pascal file containing my TLuaScript class and other
helper functions, etc.

Enjoy, and I hope it helps you :-)
cheers,
Paul

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Fw: last svn fpc laz when build

2007-06-26 Thread 刘治国

- Original Message - 
From: 刘治国 
To: [EMAIL PROTECTED] 
Sent: Wednesday, June 27, 2007 9:57 AM
Subject: last svn fpc laz when build 


last svn fpc laz  when build 

erroer


IDECommands.pas(586,11) Error: Illegal type conversion: "Set Of TShiftStateEnum"
 to "LongInt"
IDECommands.pas(586,38) Error: Illegal type conversion: "Set Of TShiftStateEnum"
 to "LongInt"
IDECommands.pas(588,11) Error: Illegal type conversion: "Set Of TShiftStateEnum"
 to "LongInt"
IDECommands.pas(588,38) Error: Illegal type conversion: "Set Of TShiftStateEnum"
 to "LongInt"___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal