Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Florian Klaempfl
Am 12.10.2010 01:04, schrieb Willibald Krenn:
 Hi,
 
 On my Win64 machine, gdb kept crashing whenever I tried to step into
 fpc_raiseexception with an error saying that the reg '-1' wasn't
 defined. And yes, stabs info showed:
 
 
 4943   FUN0  18700408710 66408  fpc_raiseexception:F129
 4944   RSYM   0  6250001 66432  OBJ:R129
 4945   RSYM   0  6250002 66441  ANADDR:R4
 4946   RSYM   0  625 66451  AFRAME:R4
 
 (AFRAME should be 8, since it's passed in R8...)
 
 So in the end I looked into x86reg.dat and was quite amazed that stabs
 index for all 'new' AMD64 regs is set to -1, which is wrong of course.
 Hacking along I changed the stabs-reg indices to match the dwarf64 index
 (see also here:
 http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/amd64-tdep.h?rev=1.18content-type=text/x-cvsweb-markupcvsroot=src)
 and after bootstrapping the compiler, I can now step into raise as
 expected. (That said, I did not double-check whether dwarf64 index
 always matches stabs index...)
 
 Notice: This fix is absolutely necessary if you are working with Lazarus
 on Win64, as Lazarus automatically sets a breakpoint in fpc_raise...
 which then crashes gdb, which in turn crashes any running debugging
 session - in case an exception is raised. Of course it affects also all
 methods/funs that take e.g. three params that can be passed in regs...
 
 Perhaps someone with more knowledge of stabs and the x86reg.dat can do a
 proper fix? TIA!

Afaik, stabs does not support x86-64 that's why it's probably never
fixed/noticed.
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Jonas Maebe


On 12 Oct 2010, at 09:25, Florian Klaempfl wrote:


Afaik, stabs does not support x86-64 that's why it's probably never
fixed/noticed.


The problem is that for some reason, it's nevertheless the default for  
Win64.



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


RE: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Pierre Free Pascal
  Notice: This fix is absolutely necessary if you are working with
 Lazarus
  on Win64, as Lazarus automatically sets a breakpoint in fpc_raise...
  which then crashes gdb, which in turn crashes any running debugging
  session - in case an exception is raised. Of course it affects also
 all
  methods/funs that take e.g. three params that can be passed in
 regs...
 
  Perhaps someone with more knowledge of stabs and the x86reg.dat can
 do a
  proper fix? TIA!
 
 Afaik, stabs does not support x86-64 that's why it's probably never
 fixed/noticed.

  This is not true: 
I src/gdb/amd64-tdep.c you can see this (line 2419 on current CVS):
 /* The default register numbering scheme for AMD64 is referred to
as the DWARF Register Number Mapping in the System V psABI.
The preferred debugging format for all known AMD64 targets is
actually DWARF2, and GCC doesn't seem to support DWARF (that is
DWARF-1), but we provide the same mapping just in case.  This
mapping is also used for stabs, which GCC does support.  */
 set_gdbarch_stab_reg_to_regnum (gdbarch, amd64_dwarf_reg_to_regnum);
 set_gdbarch_dwarf2_reg_to_regnum (gdbarch, amd64_dwarf_reg_to_regnum);

 
  This means that indeed stabs and dwarf register number are equal,
at least for GDB.

  The problem is that this means that we probably also need to
distinguish between stabs32 and stabs64, as we already do for dwarf32 and 
dwarf64...
unless we change the code that reads  x86reg.dat to use dwarf64
indexes for amd64 stabs registers.

Pierre




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


Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Jonas Maebe


On 12 Oct 2010, at 10:25, Pierre Free Pascal wrote:


 This means that indeed stabs and dwarf register number are equal,
at least for GDB.

 The problem is that this means that we probably also need to
distinguish between stabs32 and stabs64, as we already do for  
dwarf32 and dwarf64...


There is no stabs64 format, afaik. See 
http://sourceware.org/bugzilla/show_bug.cgi?id=9327


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


Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Willibald Krenn

Am 12.10.2010 09:51, schrieb Jonas Maebe:

There is no stabs64 format, afaik. See
http://sourceware.org/bugzilla/show_bug.cgi?id=9327


Just checked, this example is working fine on Win64:

PS C:\source\bugs\lokals gdb test.exe
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
http://gnu.org/licenses/gpl.html

This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type show copying
and show warranty for details.
This GDB was configured as x86_64-w64-mingw32.
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from C:\source\bugs\lokals/test.exe...done.
(gdb) break MAINPROC
Breakpoint 1 at 0x40140c: file test.pp, line 5.
(gdb) run
Starting program: C:\source\bugs\lokals/test.exe
[New Thread 8148.0x9a8]

Breakpoint 1, MAINPROC () at test.pp:5
5 x := 5;
(gdb) step
6 writeln('x=',x);
(gdb) print x
$1 = 5
(gdb)

In any case, register indices and offsets are different matters and as 
it seems that DWARF indices are fine for stabs, I'd strongly vote for 
fixing x86_64 stabs info.


Cheers,
 Willi
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


RE: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Pierre Free Pascal


 -Message d'origine-
 De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel-
 boun...@lists.freepascal.org] De la part de Jonas Maebe
 Envoyé : Tuesday, October 12, 2010 10:51 AM
 À : FPC developers' list
 Objet : Re: [fpc-devel] x86_64 stabs info - patch (sort of)
 
 
 On 12 Oct 2010, at 10:25, Pierre Free Pascal wrote:
 
   This means that indeed stabs and dwarf register number are equal,
  at least for GDB.
 
   The problem is that this means that we probably also need to
  distinguish between stabs32 and stabs64, as we already do for
  dwarf32 and dwarf64...
 
 There is no stabs64 format, afaik. See
 http://sourceware.org/bugzilla/show_bug.cgi?id=9327

  I think that dwarf32 and dwarf64 here only refers to 
i386 32-bit registers
versus
amd64 64-bit registers.

  It is in that meaning that I said that we should use 
the dwarf64 column of x86reg.dat to implement
the stabs register number for x86_64 CPU.

Pierre

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


RE: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Pierre Free Pascal


 -Message d'origine-
 De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel-
 boun...@lists.freepascal.org] De la part de Jonas Maebe
 Envoyé : Tuesday, October 12, 2010 10:00 AM
 À : FPC developers' list
 Objet : Re: [fpc-devel] x86_64 stabs info - patch (sort of)
 
 
 On 12 Oct 2010, at 09:25, Florian Klaempfl wrote:
 
  Afaik, stabs does not support x86-64 that's why it's probably never
  fixed/noticed.
 
 The problem is that for some reason, it's nevertheless the default for
 Win64.

  It currently is because dwarf debug information generation 
for x86_64 is still much more buggy than stabs generation.

Pierre

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


Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Jonas Maebe


On 12 Oct 2010, at 11:49, Pierre Free Pascal wrote:


-Message d'origine-
De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel-
boun...@lists.freepascal.org] De la part de Jonas Maebe
Envoyé : Tuesday, October 12, 2010 10:00 AM
À : FPC developers' list
Objet : Re: [fpc-devel] x86_64 stabs info - patch (sort of)


On 12 Oct 2010, at 09:25, Florian Klaempfl wrote:


Afaik, stabs does not support x86-64 that's why it's probably never
fixed/noticed.


The problem is that for some reason, it's nevertheless the default  
for

Win64.


 It currently is because dwarf debug information generation
for x86_64 is still much more buggy than stabs generation.


Is it? I use it all the time on Mac OS X/x86-64 and Linux/x86-64, and  
it works fine.



Jonas___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


RE: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Pierre Free Pascal


 -Message d'origine-
 De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel-
 boun...@lists.freepascal.org] De la part de Jonas Maebe
 Envoyé : Tuesday, October 12, 2010 11:56 AM
 À : FPC developers' list
 Objet : Re: [fpc-devel] x86_64 stabs info - patch (sort of)
 
 
 On 12 Oct 2010, at 11:49, Pierre Free Pascal wrote:
 
  -Message d'origine-
  De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel-
  boun...@lists.freepascal.org] De la part de Jonas Maebe
  Envoyé : Tuesday, October 12, 2010 10:00 AM
  À : FPC developers' list
  Objet : Re: [fpc-devel] x86_64 stabs info - patch (sort of)
 
 
  On 12 Oct 2010, at 09:25, Florian Klaempfl wrote:
 
  Afaik, stabs does not support x86-64 that's why it's probably never
  fixed/noticed.
 
  The problem is that for some reason, it's nevertheless the default
  for
  Win64.
 
   It currently is because dwarf debug information generation
  for x86_64 is still much more buggy than stabs generation.
 
 Is it? I use it all the time on Mac OS X/x86-64 and Linux/x86-64, and
 it works fine.

  It might be specific to win64, especially the internal linker.
I only tested win64 target, the others might be OK.
  Note that a recent fix by Willibald Krenn might have improved 
things a lot, but I didn't have much time to check it out yet.


Pierre

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


RE: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Pierre Free Pascal


 -Message d'origine-
 De : fpc-devel-boun...@lists.freepascal.org [mailto:fpc-devel-
 boun...@lists.freepascal.org] De la part de Jonas Maebe
 Envoyé : Tuesday, October 12, 2010 10:51 AM
 À : FPC developers' list
 Objet : Re: [fpc-devel] x86_64 stabs info - patch (sort of)
 
 
 On 12 Oct 2010, at 10:25, Pierre Free Pascal wrote:
 
   This means that indeed stabs and dwarf register number are equal,
  at least for GDB.
 
   The problem is that this means that we probably also need to
  distinguish between stabs32 and stabs64, as we already do for
  dwarf32 and dwarf64...
 
 There is no stabs64 format, afaik. See
 http://sourceware.org/bugzilla/show_bug.cgi?id=9327

 This is also not totally true:
I heard recently that Apple has a 64-bit extension of the
stabs debug format in
bfd/mach-o.c:bfd_mach_o_read_symtab_symbol
and
gdb/machoread.c:macho_symtab_read (this doesn't use dbxread.c)

Pierre



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


Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Jonas Maebe


On 12 Oct 2010, at 12:14, Pierre Free Pascal wrote:


There is no stabs64 format, afaik. See
http://sourceware.org/bugzilla/show_bug.cgi?id=9327


This is also not totally true:
I heard recently that Apple has a 64-bit extension of the
stabs debug format in
bfd/mach-o.c:bfd_mach_o_read_symtab_symbol
and
gdb/machoread.c:macho_symtab_read (this doesn't use dbxread.c)


That's true, but
a) afaik it's only supported on Mac OS X
b) our Stabs writer does not support those extensions (I initially  
tried using Stabs on Mac OS X 64 bit because back then DWARF support  
in FPC was not very good, but changing the Stabs writer seemed more  
work than improving the DWARF support)



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


[fpc-devel] FPC 2.4.2 RC1 available

2010-10-12 Thread Marco van de Voort
Hello,

We have placed the first release-candidate of the Free Pascal Compiler
version 2.4.2 on our ftp-servers.

You can help improve the upcoming 2.4.2 release by downloading and
testing this release. If you want you can report what you have done here:
http://wiki.freepascal.org/Testers_2.4.2

Changes that may break backwards compatibility are documented at:
http://wiki.freepascal.org/User_Changes_2.4.2

Downloads are available at:

the main FTP server at

ftp://ftp.freepascal.org/pub/fpc/beta/2.4.2-rc1/

and

ftp://freepascal.stack.nl/pub/fpc/beta/2.4.2-rc1/

Enjoy!

The Free Pascal Compiler Team



Free Pascal Compiler

Version 2.4.2-RC1

**
  What's New in 2.4.2
**

Free Pascal 2.4.2 contains many fixes and a few new features. Most bugfixes
in the RTL and packages before june 2010 have been merged.

Please also see http://wiki.freepascal.org/User_Changes_2.4.2 for a list
of changes which may affect the behaviour of previously working code, and
how to cope with these changes.

Some highlights are:

Compiler:
  * Support D2006+ FOR..IN, with some FPC specific enhancements. Refer to
 http://wiki.freepascal.org/for-in_loop for more information
  * Support for sealed and abstract classes.

Packages:
  * Many improvements to the XML units
  * Many improvements to the database units
  * Many improvemnets to the chm units

See http://bugs.freepascal.org/changelog_page.php for the list of reported
bugs which have been fixed in this release.


**
  What's New in 2.4.0
**

Free Pascal 2.4.0 contains many fixes and new features. While we did not
manage to incorporate all planned additions, we believe this release offers a
nice collection of new functionality and bug fixes.


Please also see http://wiki.freepascal.org/User_Changes_2.4.0 for a list
of changes which may affect the behaviour of previously working code, and
how to cope with these changes.

Some highlights are:

Platforms:
  * New platform: Mac OS X/PowerPC64
  * New platform: Mac OS X/x86_64
  * New platform: Mac OS X/ARM (iPhone)

Compiler:
  * Support for Delphi-style resource handling
  * Whole-program optimization infrastructure, which initially supports
program devirtualization and unused virtual method removal
  * Much faster compilation of units containing many type-sections
  * The ability to suppress individual hints/warnings/notes
  * Several improvements to the DWARF debug information generation
  * Fixes to the generics support
  * Fixes to the interface delegation (implements) support
  * Improved cpu register allocation
  * Improved ARM/EABI support
  
RTL:
  * Linearly scaling multi-threaded memory manager
  * Support for (advisory) file locking on Unix-based platforms
when using the SysUtils file creation/opening routines
  * Support for ANSI ISO Extended Pascal ReadStr/WriteStr
  * A UnicodeString type that, while not yet equivalent to Delphi 2009's
UnicodeString type, offers reference counted UnicodeString support on
the Windows, Linux, Mac OS X, FreeBSD and Beos/Haiku platforms.

Packages:
  * Many improvements to the XML units
  * Many improvements to the database units
  * Updated the common Mac OS X Pascal interfaces to r241, including
header a translation of the CFNetwork framework
  * The zipper unit now works correctly on big endian platforms

See http://bugs.freepascal.org/changelog_page.php for the list of reported
bugs which have been fixed in this release.


**
  What's New in 2.2.3
**

Free Pascal 2.2.3 contains many bug fixes and some new features. The 
main purpose of this release is to fix problems reported with FPC 2.2.2.

Please also see http://wiki.freepascal.org/User_Changes_2.2.4 for a list
of changes which may affect the behaviour of previously working code, and
how to cope with these changes.

Some highlights are:

All:
  * Experimental packages-installation tool

Packages:
  * Added support for TIFF reading/writing in fcl-image
  * Improvements and fixes in CHM support
  * Fixed linking the gtk2-package with gtk versions above 2.13.4

IDE:
  * Added support for CHM help files

Documentation

See http://bugs.freepascal.org/changelog_page.php for the list of reported
bugs which have been fixed in this release.


**
  What's New in 2.2.2

Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Willibald Krenn

Am 12.10.2010 10:55, schrieb Jonas Maebe:

It currently is because dwarf debug information generation
for x86_64 is still much more buggy than stabs generation.


Is it? I use it all the time on Mac OS X/x86-64 and Linux/x86-64, and it
works fine.


DWARF does not work on Win64: while dwarf3 produces an internal error 
(2010092801, sounds familiar ;-)), dwarf2 debug information seems to be 
broken too. At least gdb 7.2 reports invalid offsets.
Hence for the time being, stabs is the only option and better than 
nothing. Therefore I'd really love to see the register indices changed.


Thanks,
 Willi
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


[fpc-devel] Re: [Lazarus] FPC 2.4.2 RC1 available

2010-10-12 Thread Felipe Monteiro de Carvalho
Thank you very much, I was really waiting for this one =)

By the way, this link doesn't work:

ftp://freepascal.stack.nl/pub/fpc/beta/2.4.2-rc1/
--
Felipe Monteiro de Carvalho
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Jonas Maebe

On 12 Oct 2010, at 21:26, Willibald Krenn wrote:

 Am 12.10.2010 10:55, schrieb Jonas Maebe:
 It currently is because dwarf debug information generation
 for x86_64 is still much more buggy than stabs generation.
 
 Is it? I use it all the time on Mac OS X/x86-64 and Linux/x86-64, and it
 works fine.
 
 DWARF does not work on Win64: while dwarf3 produces an internal error 
 (2010092801, sounds familiar ;-)),

DWARF3 is not yet really tested.

 dwarf2 debug information seems to be broken too.

Keep this in mind: http://bugs.freepascal.org/view.php?id=15692

You may also want to try with the external linker (-Xe).


Jonas___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Willibald Krenn

Am 12.10.2010 20:33, schrieb Jonas Maebe:

dwarf2 debug information seems to be broken too.


Keep this in mind: http://bugs.freepascal.org/view.php?id=15692


I don't know exactly what to conclude from this discussion. Are 32 bit 
pointers enough for WinPE? Then stabs would be fine anyways.



You may also want to try with the external linker (-Xe).


Hmm, -Xe does not seem to work on my system. So, stabs remains the only 
thing that is working. (Even if it has limitations it is better than 0.)



Cheers,
 Willi
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Jonas Maebe

On 12 Oct 2010, at 21:55, Willibald Krenn wrote:

 Am 12.10.2010 20:33, schrieb Jonas Maebe:
 dwarf2 debug information seems to be broken too.
 
 Keep this in mind: http://bugs.freepascal.org/view.php?id=15692
 
 I don't know exactly what to conclude from this discussion.

Try using the -WB004 command line option.

 Are 32 bit pointers enough for WinPE? Then stabs would be fine anyways.

The problem is that GDB (at least in the past) zero-extends all offsets in the 
stabs debug information. That means that a local variable at location ebp-16 is 
interpreted as being at location ebp+4294967280. There are probably more such 
small problems, because Stabs was never designed nor implemented to be used for 
64 bit platforms within the GNU tool chain.

 You may also want to try with the external linker (-Xe).
 
 Hmm, -Xe does not seem to work on my system.

What does not work mean?

 So, stabs remains the only thing that is working. (Even if it has limitations 
 it is better than 0.)

I'm not opposed to committing that change, it's just that Stabs is a dead end 
and since no compiler I know of uses it for generating 64 bit debug information 
(other than a few older Mac OS X compilers, but Mac OS X uses its own fork of 
GDB), it's probably also very badly tested within GDB itself.


Jonas___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Willibald Krenn

Am 12.10.2010 21:02, schrieb Jonas Maebe:

I don't know exactly what to conclude from this discussion.


Try using the -WB004 command line option.


PS C:\source\bugs\exception del *.o
PS C:\source\bugs\exception del *.exe
PS C:\source\bugs\exception fpc -gw -WB004 .\project1.lpr
PS C:\source\bugs\exception gdb .\project1.exe
(gdb) list
invalid dwarf2 offset 504164
(gdb)


Are 32 bit pointers enough for WinPE? Then stabs would be fine anyways.


The problem is that GDB (at least in the past) zero-extends all offsets
in the stabs debug information. That means that a local variable at
location ebp-16 is interpreted as being at location ebp+4294967280.
There are probably more such small problems, because Stabs was never
designed nor implemented to be used for 64 bit platforms within the GNU
tool chain.


At least on my system, having stabs info like the following

58 FUN0  18 00401540 3216   RAISEEXCEPTION:F1
59 PSYM   0  20 fff8 3234   A:5
60 PSYM   0  21 fff0 3238   B:5
61 PSYM   0  22 ffe8 3242   C:5
62 PSYM   0  23 ff90 3246   D:6
63 PSYM   0  24 ff88 3250   E:7
64 SOL0  0  00401540 3254   project1.lpr

yields

Breakpoint 2, RAISEEXCEPTION () at project1.lpr:44
44raise EAbort.Create('test');
(gdb) info locals
A = 20
B = 1
C = 2
D = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 
19, 20}

E = 0x42c150 'Hello World!'

which is quite ok ;-).


You may also want to try with the external linker (-Xe).


Hmm, -Xe does not seem to work on my system.


What does not work mean?


Sorry, I meant to say that it does not improve the situation.

PS C:\source\bugs\exception del *.o
PS C:\source\bugs\exception del *.exe
PS C:\source\bugs\exception fpc -gw -Xe .\project1.lpr
[0.578] Using util C:\source\mingw64\bin\ld.exe
PS C:\source\bugs\exception gdb .\project1.exe
(gdb) list
invalid dwarf2 offset 6439543


I'm not opposed to committing that change, it's just that Stabs is a
dead end and since no compiler I know of uses it for generating 64 bit
debug information (other than a few older Mac OS X compilers, but Mac OS
X uses its own fork of GDB), it's probably also very badly tested within
GDB itself.


Yes, I understand that stabs is a dead-end. But it's also very useful if 
you want to work with the compiler on Win64 :)


Cheers,
 Willi
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] x86_64 stabs info - patch (sort of)

2010-10-12 Thread Jonas Maebe

On 12 Oct 2010, at 22:31, Willibald Krenn wrote:

 PS C:\source\bugs\exception del *.o
 PS C:\source\bugs\exception del *.exe
 PS C:\source\bugs\exception fpc -gw -WB004 .\project1.lpr
 PS C:\source\bugs\exception gdb .\project1.exe
 (gdb) list
 invalid dwarf2 offset 504164

That seems like this bug report: http://bugs.freepascal.org/view.php?id=16297

I can't help any further with that since I don't develop for/under Windows 
though.


Jonas___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] JSON Beautifier

2010-10-12 Thread Michael Van Canneyt


Hello,

Just a short follow-up, to say that I've committed support (a bit later than
planned) for FormatJSON() which has several options. Revision 16146.

Function FormatJSON(Options : TFormatOptions = DefaultFormat; Indentsize : 
Integer = DefaultIndentSize) : TJSONStringType;

Options:

  TFormatOption = (foSingleLineArray,   // Array without CR/LF : all on one line
   foSingleLineObject,  // Object without CR/LF : all on one 
line
   foDoNotQuoteMembers, // Do not quote object member names.
   foUseTabchar);   // Use tab characters instead of spaces.
  TFormatOptions = set of TFormatOption;

And defaults:

Const
  DefaultIndentSize = 2;
  DefaultFormat = [];
  AsJSONFormat  = [foSingleLineArray,foSingleLineObject]; // These options 
make FormatJSON behave as AsJSON

If need be, more options can be added. But the above seem like the logical ones.

Michael.



On Fri, 24 Sep 2010, theo wrote:


/ Any idea when this feature will be ready?

/ Somewhere next week.

Great.



myJSONObject['testdate']:=TJSONDate.Create('2010/11/10');



I see. Thank you

Regards
Theo



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


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


[fpc-devel] JSON Beautifier

2010-10-12 Thread theo

Thank you Michael, great!

There is one little problem: the right square bracket which is closing 
an array always goes to the first position (no indentation).
And it's a matter of taste, if brackets and parenthesis should go to the 
same line.
I've attached an example.  The FormatJSON output (above) and the 
NetBeans Formatter output (below).


Thanks
Theo

---
{
 i_width : 1280,
 i_height : 1024,
 layouts : [
   {
 s_name : Unbenannt_1,
 i_duration : 3000,
 t_starttime : null,
 t_endtime : null,
 t_startdate : null,
 t_enddate : null,
 i_dayofweek : 0,
 i_timetype : 0,
 frames : [
   {
 s_name : Unbenannt,
 i_top : 10,
 i_left : 200,
 i_width : 200,
 i_height : 200,
 texts : [
   {
 s_url : test.php,
 i_contenttype : 1,
 s_html : {0D1FB698-709D-4817-9F76-34E8960CE4F2},
 s_name : Unbenannt,
 i_duration : 5000,
 t_starttime : null,
 t_endtime : null,
 t_startdate : null,
 t_enddate : null,
 i_timetype : 0,
 i_dayofweek : 0
   }
]
   }
]
   }
]
}


---

{
   i_width : 1280,
   i_height : 1024,
   layouts : [{
   s_name : Unbenannt_1,
   i_duration : 3000,
   t_starttime : null,
   t_endtime : null,
   t_startdate : null,
   t_enddate : null,
   i_dayofweek : 0,
   i_timetype : 0,
   frames : [{
   s_name : Unbenannt,
   i_top : 10,
   i_left : 200,
   i_width : 200,
   i_height : 200,
   texts : [{
   s_url : test.php,
   i_contenttype : 1,
   s_html : {E52CD0B2-E4C1-4C7E-96FA-9C9E1275DAC8},
   s_name : Unbenannt,
   i_duration : 5000,
   t_starttime : null,
   t_endtime : null,
   t_startdate : null,
   t_enddate : null,
   i_timetype : 0,
   i_dayofweek : 0
   }]
   }]
   }]
}


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


Re: [fpc-devel] FPC 2.4.2 RC1 available

2010-10-12 Thread Luiz Americo Pereira Camara

Marco van de Voort escreveu:

Hello,

We have placed the first release-candidate of the Free Pascal Compiler
version 2.4.2 on our ftp-servers.
  


It does not compile the following program

It works with both 240 and 251

Luiz


You can help improve the upcoming 2.4.2 release by downloading and
testing this release. If you want you can report what you have done here:
http://wiki.freepascal.org/Testers_2.4.2

Changes that may break backwards compatibility are documented at:
http://wiki.freepascal.org/User_Changes_2.4.2

Downloads are available at:

the main FTP server at

ftp://ftp.freepascal.org/pub/fpc/beta/2.4.2-rc1/

and

ftp://freepascal.stack.nl/pub/fpc/beta/2.4.2-rc1/

Enjoy!

The Free Pascal Compiler Team



Free Pascal Compiler

Version 2.4.2-RC1

**
  What's New in 2.4.2
**

Free Pascal 2.4.2 contains many fixes and a few new features. Most bugfixes
in the RTL and packages before june 2010 have been merged.

Please also see http://wiki.freepascal.org/User_Changes_2.4.2 for a list
of changes which may affect the behaviour of previously working code, and
how to cope with these changes.

Some highlights are:

Compiler:
  * Support D2006+ FOR..IN, with some FPC specific enhancements. Refer to
 http://wiki.freepascal.org/for-in_loop for more information
  * Support for sealed and abstract classes.

Packages:
  * Many improvements to the XML units
  * Many improvements to the database units
  * Many improvemnets to the chm units

See http://bugs.freepascal.org/changelog_page.php for the list of reported
bugs which have been fixed in this release.


**
  What's New in 2.4.0
**

Free Pascal 2.4.0 contains many fixes and new features. While we did not
manage to incorporate all planned additions, we believe this release offers a
nice collection of new functionality and bug fixes.


Please also see http://wiki.freepascal.org/User_Changes_2.4.0 for a list
of changes which may affect the behaviour of previously working code, and
how to cope with these changes.

Some highlights are:

Platforms:
  * New platform: Mac OS X/PowerPC64
  * New platform: Mac OS X/x86_64
  * New platform: Mac OS X/ARM (iPhone)

Compiler:
  * Support for Delphi-style resource handling
  * Whole-program optimization infrastructure, which initially supports
program devirtualization and unused virtual method removal
  * Much faster compilation of units containing many type-sections
  * The ability to suppress individual hints/warnings/notes
  * Several improvements to the DWARF debug information generation
  * Fixes to the generics support
  * Fixes to the interface delegation (implements) support
  * Improved cpu register allocation
  * Improved ARM/EABI support
  
RTL:

  * Linearly scaling multi-threaded memory manager
  * Support for (advisory) file locking on Unix-based platforms
when using the SysUtils file creation/opening routines
  * Support for ANSI ISO Extended Pascal ReadStr/WriteStr
  * A UnicodeString type that, while not yet equivalent to Delphi 2009's
UnicodeString type, offers reference counted UnicodeString support on
the Windows, Linux, Mac OS X, FreeBSD and Beos/Haiku platforms.

Packages:
  * Many improvements to the XML units
  * Many improvements to the database units
  * Updated the common Mac OS X Pascal interfaces to r241, including
header a translation of the CFNetwork framework
  * The zipper unit now works correctly on big endian platforms

See http://bugs.freepascal.org/changelog_page.php for the list of reported
bugs which have been fixed in this release.


**
  What's New in 2.2.3
**

Free Pascal 2.2.3 contains many bug fixes and some new features. The 
main purpose of this release is to fix problems reported with FPC 2.2.2.


Please also see http://wiki.freepascal.org/User_Changes_2.2.4 for a list
of changes which may affect the behaviour of previously working code, and
how to cope with these changes.

Some highlights are:

All:
  * Experimental packages-installation tool

Packages:
  * Added support for TIFF reading/writing in fcl-image
  * Improvements and fixes in CHM support
  * Fixed linking the gtk2-package with gtk versions above 2.13.4

IDE:
  * Added support for CHM help files

Documentation

See http://bugs.freepascal.org/changelog_page.php for the list of reported
bugs which have been fixed in this release.



[fpc-devel] win64 dwarf patch

2010-10-12 Thread Willibald Krenn

Hi,

After adding 'tf_dwarf_only_local_labels' to the
flags in i_win.pas (line 105) dwarf2 seems to be working. (Even without 
-WB0040).


Cheers,
 Willi
___
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel


Re: [fpc-devel] win64 dwarf patch

2010-10-12 Thread Willibald Krenn

Am 13.10.2010 01:40, schrieb Willibald Krenn:

Hi,

After adding 'tf_dwarf_only_local_labels' to the
flags in i_win.pas (line 105) dwarf2 seems to be working. (Even without
-WB0040).


Additional remark: The -WB option is still needed, otherwise, e.g., 
'disas' is not working correctly in gdb.


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