[fpc-devel] Debugger for FPC

2009-03-11 Thread Graeme Geldenhuys
Hi everybody, I'm not sure where is the best place to post this message. If there is a better location, please let me know so I can close this thread and repost in the correct location. Recently there was a discussion about how useless debugging is with FPC and especially inside the Lazarus IDE.

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Michael Schnell
You might want to take a look at the great book by Maltiff Salzmann: The Art of Debugging. They provide a very nice overview about what gdb can do. They also describe the gdb frontends DDD and Eclipse Of course they only use C as a programming language. They say that using a debugger has a

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Graeme Geldenhuys
On Wed, Mar 11, 2009 at 11:14 AM, Michael Schnell mschn...@lumino.de wrote: You might want to take a look at the great book by Maltiff Salzmann: The Art of Debugging. That's, I'll go to Amazon and see what it's about They also describe the gdb frontends DDD and Eclipse Of course they

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Dave Parsons
On Wed, 11 Mar 2009 10:24:53 +0200, Graeme Geldenhuys wrote: I am willing to learn and help. Not having decent debugger support is killing me - and I am clearly not alone, as the thread in the Lazarus mailing list proves. The problem as far as I can see, is that the Free Pascal project is

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Florian Klaempfl
Graeme Geldenhuys schrieb: That's the problem! GDB *doesn't* support all the language features that Object Pascal offers, so some things cannot be debugged. This is not a Lazarus issue, but a limitation of GDB with the Object Pascal language. And I have heard the comments about trying to

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Michael Schnell
Of course they only use C (no surprise) - no other programming language exists. ;-) In fact they do have a section about Java, Perl, Python, and Assembler at the end of the book :). -Michael ___ fpc-devel maillist -

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Michael Van Canneyt
On Wed, 11 Mar 2009, Florian Klaempfl wrote: Graeme Geldenhuys schrieb: That's the problem! GDB *doesn't* support all the language features that Object Pascal offers, so some things cannot be debugged. This is not a Lazarus issue, but a limitation of GDB with the Object Pascal

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Graeme Geldenhuys
On Wed, Mar 11, 2009 at 11:41 AM, Florian Klaempfl flor...@freepascal.org wrote: Are you aware of the fact that Marc already started a debugger? Now that you mention it, I vaguely remember something like that mentioned. I think it was only for Windows, but I'll hunt it down and see if we can

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Martin Schreiber
On Wednesday 11 March 2009 09:24:53 Graeme Geldenhuys wrote: For me GDB with the MSEide frontend is better than the integrated debugger in Delphi 7. It is almost impossible to develop something like MSEide+MSEgui with writeln and logfile approach. Manytimes bugs are hard to find in event

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread dmitry boyarintsev
Finally getting rid of GDB: This is VERY good news indeed :-) it's been getting rid of GDB for some time already... but, imho it should not be removed! 1) because GDB supports a lot of platforms, already. So porting a fpc program to a new platform, will require a debugger. And the only debugger

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread dmitry boyarintsev
sorry! unfinished note: 2) gdb can be extended to support FPC syntax, if enougth information is provided with GDB. And ofcause, some C-programmer might be required. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Tomas Hajny
On Wed, March 11, 2009 10:48, Michael Van Canneyt wrote: On Wed, 11 Mar 2009, Florian Klaempfl wrote: Graeme Geldenhuys schrieb: That's the problem! GDB *doesn't* support all the language features that Object Pascal offers, so some things cannot be debugged. This is not a Lazarus issue,

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Florian Klaempfl
dmitry boyarintsev schrieb: Finally getting rid of GDB: This is VERY good news indeed :-) it's been getting rid of GDB for some time already... but, imho it should not be removed! 1) because GDB supports a lot of platforms, already. So porting a fpc program to a new platform, will require

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Michael Van Canneyt
On Wed, 11 Mar 2009, Tomas Hajny wrote: On Wed, March 11, 2009 10:48, Michael Van Canneyt wrote: On Wed, 11 Mar 2009, Florian Klaempfl wrote: Graeme Geldenhuys schrieb: That's the problem! GDB *doesn't* support all the language features that Object Pascal offers, so some things

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread dmitry boyarintsev
GDB is ported for 10 years to windows and it's behaviour is still *very* poor. but at least, it works. Is there any other debugger that can be used cross-platform, rather than gdb? yes, there should be fpc based debugger, but gdb support should not be removed, either.

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Adriaan van Os
dmitry boyarintsev wrote: Finally getting rid of GDB: This is VERY good news indeed :-) I quite agree ! it's been getting rid of GDB for some time already... but, imho it should not be removed! 1) because GDB supports a lot of platforms, already. So porting a fpc program to a new platform,

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Martin Schreiber
On Wednesday 11 March 2009 11:06:38 Florian Klaempfl wrote: GDB is ported for 10 years to windows and it's behaviour is still *very* poor. MinGW gdb 6.8-3 works well for me. http://sourceforge.net/project/showfiles.php?group_id=2435package_id=20507release_id=594520 Martin

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Marc Weustink
dmitry boyarintsev wrote: sorry! unfinished note: 2) gdb can be extended to support FPC syntax, if enougth information is provided with GDB. And ofcause, some C-programmer might be required. I'm not really sure about this. IIRC the internal design of gdb is modeled after the STABS debug

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Jonas Maebe
Graeme Geldenhuys wrote on wo, 11 mrt 2009: About GDB - this seems to be the debugger of choice for the Free Pascal project. It is the only debugger I know of that supports pretty much every single platform out there. In fact, there are simply very few other free (even as in beer)

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Michael Schnell
Martin Schreiber wrote: ... Martin, I was sure that you would jump in here :) Great ! For me GDB with the MSEide frontend is better than the integrated debugger in Delphi 7. And supposedly better than the Lazarus' one... Could you take a look at the Wiki page mentioned and comment on if the

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread dmitry boyarintsev
Finally getting rid of GDB: This is VERY good news indeed :-) I quite agree ! it was not my words :) Not really, there is low-level debugging support inside the OS. This is true for Windows as well as for UNIX-like operating systems. gdb is always based on system debugging API (DebugAPI in

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Florian Klaempfl
like Visual Studio. ___ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Paul Ishenin
Michael Schnell wrote: Switch the stackframe if you want to examine variables of a caller. Better than Delphi :). Can Lazarus do this, too ? Should it be extended appropriately ? Lazarus can. Best regards, Paul Ishenin. ___ fpc-devel maillist

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Martin Schreiber
On Wednesday 11 March 2009 11:26:07 Florian Klaempfl wrote: My main problem (if they really work) with all gdb gui frontends is that they are dog slow compared with a good debugger like Visual Studio. Agreed. MSEide has a button to disable the watches for fast stepping. On a modern computer

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Martin Schreiber
On Wednesday 11 March 2009 11:28:27 Graeme Geldenhuys wrote: Well writing a new compiler is just such a big task and it didn't prevent Florian from starting FPC. Having a 100% working debugger (no matter if it takes a while to get there) is still much better in the long run - for the

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Martin Schreiber
On Wednesday 11 March 2009 11:23:00 Michael Schnell wrote: GDB can switch the stackframe which Delphi 7 cant. This allows for taking a look at the local variable of a ancestor procedure ? Yes, don't forget to compile with -O-. [...] There are some issues with debuginfo of dynamic arrays

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Graeme Geldenhuys
On Wed, Mar 11, 2009 at 12:20 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: GDB is designed for any language it has maintainers for (just like FPC is designed for all platforms that have active maintainers, and languishes or Probably true, but it's leans a lot more to C/C++ support than any

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Graeme Geldenhuys
On Wed, Mar 11, 2009 at 12:48 PM, Martin Schreiber fp...@bluewin.ch wrote: I think it would be better to extend gdb for better FPC support. I don't see myself relearning C language again! I left C/C++ for a reason. Regards, - Graeme - ___ fpGUI

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Michael Schnell
And of course Also remember that it would be dangerous to call the function from the debugger (outside the normal flow of the application). This can modify the state of the application (a function may change other objects) cannot be solved by any debugger (even if you'd take a complete

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Michael Schnell
Everybody keeps hammering on this point. Delphi has supported property access methods since forever and I have not heard of a single Delphi developer complaining about the possible side effects. For me the pros far outweigh the cons! I suppose thy to check if a read function is pure. I seem

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Michael Schnell
I don't see myself relearning C language again! I left C/C++ for a reason. Where is the problem with C ? Of course it's by far less nice than Object-Pascal, but I don't suppose with doing a Debugger the Object feature does not help that much, and for low-level stuff C seems quite

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Dimitrios Chr. Ioannidis
O/H Dave Parsons έγραψε: On Wed, 11 Mar 2009 10:24:53 +0200, Graeme Geldenhuys wrote: I am willing to learn and help. Not having decent debugger support is killing me - and I am clearly not alone, as the thread in the Lazarus mailing list proves. The problem as far as I can see, is that the

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Jonas Maebe
Graeme Geldenhuys wrote on wo, 11 mrt 2009: On Wed, Mar 11, 2009 at 12:20 PM, Jonas Maebe jonas.ma...@elis.ugent.be wrote: GDB is designed for any language it has maintainers for (just like FPC is designed for all platforms that have active maintainers, and languishes or Probably true,

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Jonas Maebe
Marc Weustink wrote on wo, 11 mrt 2009: I'm not really sure about this. IIRC the internal design of gdb is modeled after the STABS debug format. This means that even for DWARF, it internally is translated to STABS, meaning that not all contstucts possible in DWARF are supported. Given this I

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Paul Ishenin
Jonas Maebe wrote: Just like FPC development, GDB development does not stand still. The above no longer is true (full, or nearly full, DWARF3 support is in the GDB Archer branch, and I have already fixed bugs in FPC's DWARF3 information so that e.g. dynamic arrays work perfectly in that

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread Micha Nelissen
Graeme Geldenhuys wrote: Like I said, I am not very knowledgeable with debugger internals, but I am willing to learn and help. Not having decent debugger support is killing me - and I am clearly not alone, as the thread in the Lazarus The problem is not so much the debugging itself. That is

Re: [fpc-devel] Debugger for FPC

2009-03-11 Thread ABorka
I agree. The current ways to debug FPC/Lazarus programs are not up to the standards even compared to 10-15 years ago Delphi debugging. Most developers does not want to start digging the underlying RTL/Component, etc. source codes to figure out what they should enter into the watch window