Re: [fpc-pascal] bitwise generator

2008-12-29 Thread Zaher Dirkey
You can increase the Generator by its value, but be sure the first
value of this generator is 1

select gen_id("GenAccID", gen_id("GenAccID", 0)) from rdb$database


On Sat, Dec 6, 2008 at 5:00 PM, ik  wrote:
>
> Thanks for the answer.
>
> I wanted to do it using Firebird instead of my Pascal code.. now I
> understand thanks to you, that I need to do it using stored procedure.
>
> Thanks,
> Ido
>
> On Sat, Dec 6, 2008 at 4:38 PM, Francisco Reyes 
> wrote:
>>
>> ik writes:
>>
>>
>>> I wish to create a firebird generator that does bitwise  generation
>>> rather then ordinal generator.
>>>
>>> I mean:
>>> 1 2 4 8 16 32 64 128 etc..
>>>
>>> Does anyone have knowledge how to create such generation in firebird ?
>>
>> I am not clear what you are trying to do.
>> You are trying to generate the sequence above, that much I get.
>> However, is it a pascal program which will be a firebird stored procedure?
>>
>> The algorithm to generate the sequence is trivial so I don't quite follow
>> which part you are having problems with. The generation? The creation of the
>> firebird stored procedure?
>>
>> If the question is how to generate the sequence in Firebird and not use
>> FPC, then the answer is that you need to have some sort of stored procedure.
>> You could even just have a table with the values.
>>  ___
>> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
>
> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



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


Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread dmitry boyarintsev
Jonas,
I've added tf_dwarf_relative_addresses to system information for win32
target and have recompiled the compiler.
so now whenether i'm using 'gw2' or 'gw3' compiler options i'm getting
test.pas(9,1) Fatal: Internal error 200404124

test.pas(9,1) line 'end.' (see source is the at the first mail of this thread')

should 'tf_dwarf_relative_addresses' be used with some other flag?
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread Florian Klaempfl
dmitry boyarintsev schrieb:
> Jonas,
> I've added tf_dwarf_relative_addresses to system information for win32
> target and have recompiled the compiler.
> so now whenether i'm using 'gw2' or 'gw3' compiler options i'm getting
> test.pas(9,1) Fatal: Internal error 200404124
> 
> test.pas(9,1) line 'end.' (see source is the at the first mail of this 
> thread')
> 
> should 'tf_dwarf_relative_addresses' be used with some other flag?

Please compile with -Aas for testing purposes.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread dmitry boyarintsev
thanks Florian and Jonas

i've just did it, right before receiving your email. and it made it work.
exe is compiled succesfully.
gdb is able to set up break points, though warnings are still present.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread dmitry boyarintsev
i've also tried using external linker -Aas -Xe and it works too.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread Jonas Maebe


On 29 Dec 2008, at 21:16, dmitry boyarintsev wrote:


gdb is able to set up break points, though warnings are still present.


What kind of warnings?


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


Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread dmitry boyarintsev
compile line
fpc -Aas -gw2 test.pas
gdb test.exe
...
(gdb) b test.pas:7
warning: (Internal error: pc 0x40144e in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x40144e in read in psymtab, but not in symtab.)

Breakpoint 1 at 0x40144e: file test.pas, line 7.

...
break point works ok.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread Jonas Maebe


On 29 Dec 2008, at 23:10, dmitry boyarintsev wrote:


compile line
fpc -Aas -gw2 test.pas
gdb test.exe
...
(gdb) b test.pas:7
warning: (Internal error: pc 0x40144e in read in psymtab, but not in  
symtab.)


warning: (Internal error: pc 0x40144e in read in psymtab, but not in  
symtab.)


I got these warnings also on Mac OS X when I was initially on dwarf  
support there. Unfortunately, I don't remember anymore which fix  
exactly solved them, or what the root cause was.


Could you execute the following gdb commands to to see which code this  
address corresponds to?


info line *0x40144e
x/10i 0x40144e


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


Re: [fpc-pascal] DWARF line info cannot be used gdb

2008-12-29 Thread dmitry boyarintsev
here you go (i've accidently deleted test.pas, and created new one,
naming main.pas, but the code is the same) :

(gdb) info line *0x40144e
warning: (Internal error: pc 0x40144e in read in psymtab, but not in symtab.)

warning: (Internal error: pc 0x40144e in read in psymtab, but not in symtab.)

Line 7 of "main.pas" starts at address 0x40144ewarning: (Internal
error: pc 0x40 144e in read in psymtab, but not in symtab.)

  and ends at 0x401457warning: (Internal error: pc 0x401457
in read in psymtab, but not in symtab.)
 .

(gdb) x/10i 0x40144e
0x40144ewarning: (Internal error: pc 0x40144e in read in psymtab, but
not in symtab.)
 : mov$0x5,%ax
0x401452warning: (Internal error: pc 0x401452 in read in psymtab, but
not in symtab.)
 : call   0x401400warning: (Internal error: pc 0x401400
in read inpsymtab, but not in symtab.)
 
0x401457warning: (Internal error: pc 0x401457 in read in psymtab, but
not in symtab.)
 : call   0x406ec0 
0x40145cwarning: (Internal error: pc 0x40145c in read in psymtab, but
not in symtab.)
 : mov%eax,%ebx
0x40145ewarning: (Internal error: pc 0x40145e in read in psymtab, but
not in symtab.)
 : mov%ebx,%edx
0x401460warning: (Internal error: pc 0x401460 in read in psymtab, but
not in symtab.)
 : mov$0x40a000,%ecx
0x401465warning: (Internal error: pc 0x401465 in read in psymtab, but
not in symtab.)
 : mov$0x0,%eax
0x40146awarning: (Internal error: pc 0x40146a in read in psymtab, but
not in symtab.)
 : call   0x407110 
0x40146fwarning: (Internal error: pc 0x40146f in read in psymtab, but
not in symtab.)
 : call   0x403b00 
0x401474warning: (Internal error: pc 0x401474 in read in psymtab, but
not in symtab.)
 : mov%ebx,%eax
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal