Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Debugging with Lazarus

  1. #1

    Debugging with Lazarus

    I've built Lazarus from CVS with FPC 2.0.0. So now I can start Lazarus and run applications. But if I set the Debugger Options to tell it where gdb.exe is located, running a program now starts gdb.exe and goes no further. The application does not show and I have to reset the debugger from the IDE. And I still cannot set a breakpoint, run to cursor, step, or anything like that. Those menu items are greyed out.

    How do I debug under Lazarus with GDB?

  2. #2
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    Debugging with Lazarus

    I tried it once long ago and then gave up - Its the main reason I'm still using Delphi instead of Lazarus

    Anyway I am not sure that Lazarus can be compiled with FPC 2.0.... I am on the Lazarus mailing list but read hardly any of the mails (there are about 50 per day).

    Sorry
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

  3. #3

    Debugging with Lazarus

    It compiled fine, and it runs fine, except for getting this debugger working.

  4. #4
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Debugging with Lazarus

    So I guess it's safe to say that the next major fix the Lazarus team to work on would be the debugger.

    Or so it seems to be the one that most people seem to want.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  5. #5

    Debugging with Lazarus

    I got a reply on the Lazarus mailing list that it works better with some versions of gdb than others, ie. MinGW's is better than Cygwin's. Don't know how well FPC's version of gdb rates.

    It is a shame that a lot of open source software degenerates into a mess of "you must have version x.y.z of library abc in order to get software blah working correctly. Version x.y.z+/-1 will not work".

  6. #6

    Debugging with Lazarus

    Well, that last blabber of yours was really helpful. In any case minGW debugger works. FPC 2.0 works too. See my guide for getting things working right.(on free pascal part of forums, it's sticky)

    As to the versioning, it's not FPCs fault. It's actualy a windows/gnu problem, go tell bill and stalman.
    Feel the power of Open Source.
    <br />Feel the power of Free Pascal.

  7. #7
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    Debugging with Lazarus

    Well true Sly didn't offer up much of a solution to the issue, But he did point out where some of the problem lies.

    Is there a way to get a version that works on both Windows and Lazarus? Not nessissarily the latest one, but a dependable one. I mean how radically different are the different versions of GDB?

    Is there a debugger that has common enough functionality in Windows, Linux and Mac OS X that it can be standardized to come with Lazarus being pre-setup on installation?
    Jason McMillen
    Pascal Game Development
    Co-Founder





  8. #8

    Debugging with Lazarus

    Yes, IIRC version 6.x from mingw works. It's a bit hidden in the downloads sections as it's considered unstable(it works as good as linux one for me).

    About that "open source version x does not work with version y". Well if you really take everything into consideration it's quite a miracle so many things work as they do. Take delphi for example. One OS, one architecture, self-made debugger, no external 3rd party programs to be dependent on.

    Now take Lazarus. 3 Oses, 2 architectures, therefor internal debugger is huge effort which IMO is not worth it considering gdb is everywhere.

    You're comparing apples and oranges. If FPC and Lazarus concentrated on one platform they would work tip-top all the time too.
    Feel the power of Open Source.
    <br />Feel the power of Free Pascal.

  9. #9

    Debugging with Lazarus

    The comment was aimed at the differences between different distributions of gdb. The MinGW version (gdb 5.2.1) works with Lazarus, but the version supplied with FreePascal 2.0.0 (gdb 6.2.1) does not. The release notes supplied with the MinGW version mention that he made some changes which make it work it better in Windows. Well then, why don't other distributions pick up those changes? Where does FPC's gdb version come from? If the Lazarus project is so closely tied to the FPC project, why can't the Lazarus team campaign for FPC to distribute a compatible version of gdb?

    Yes, I was frustrated at the time. This is not the first time that I have come across version hell with open source libraries and software (mostly to do with trying to setup Linux servers).

  10. #10

    Debugging with Lazarus

    I'm one of the guys for wich debugging didn't work for quite some time, now it works "out of the box" i don't set anything and it just works, try getting the snapshot from http://www.ca.freepascal.org/Lazarus
    I didn't care about debugger much since i only use breakpoints and i can always user WriteLn or ShowMessage in some parts of the code where i think there are problems.
    From what i know the debugger always worked on Linux without any special setup and now it works fine in win32 too.
    The future must be... Fast and OpenSource so...
    <br />Think Open and Lightning Fast!

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •