What is the schedule for possibility to use debugger in IDE lazarus / 12-Debugger ---------------------------------------------------------------------- stab · 2008-11-08 19:24 Lazarus just seemed wonderful for the possibility to write apps for different platforms. I downloaded lazarus-0.9.26-fpc-2.2.2-win32.exe and Lazarus-0.9.26-fpc-2.2.2-cross-arm-wince-win32.exe  and tried to make the most simple program: One button and a label, clicking the button should change label.caption Running it from within the IDE just stopped with "External: SIGSEGV" Setting debugger option NONE made the app run OK. In the forum I notice quit a few persons running into the same problems. Is there some work going on to fix this or could one use some other debugger? Regretfully I think it is no use to try using Lazarus, that otherwise seems to be real great, for any development as long as you can't debug from within the IDE Regards stab ---------------------------------------------------------------------- Leledumbo · 2008-11-10 03:57 I can use the debugger with no problem by building the debugger myself or downloading it from MinGW. ---------------------------------------------------------------------- stab · 2008-11-10 15:21 Hi again, Downloded gdb-6.8-mingw-3.tar.bz2, but how do I uncompress in Win32 Regards stab ---------------------------------------------------------------------- Ñuño_Martínez · 2008-11-10 15:43 There are different programs to open bz2 files on Windows. Personally I'm using 7-zip, which supports a lot of different compression formats. ---------------------------------------------------------------------- Vincent Snijders · 2008-11-11 11:02 I added gdb 6.8-3 to the Lazarus snapshots. ---------------------------------------------------------------------- Dibo · 2008-11-23 19:49 I have this same problem. It start from 0.9.24 version (don't remember, I think not in stable but in snapshots after 0.9.24). I Can't debugging so I write own class to logs in txt file. QuoteI added gdb 6.8-3 to the Lazarus snapshots. I have snapshot from 17 november and still have this problem. Maybe I must compile debugger on my computer like leledumbo? How can I do this? Which compiler I need? ---------------------------------------------------------------------- Leledumbo · 2008-11-24 03:53 QuoteMaybe I must compile debugger on my computer like leledumbo? How can I do this? Which compiler I need? These are the tools I use. Download them from the same site you got GDB: - gcc 4.2.1-dw2 (sjlj might work, too. But I use dw2 version) - binutils 2.18 - w32api 3.12 - mingw runtime 3.15.1 - msys 1.0.10 - mingw32-make 3.81 (use this if msys' make doesn't work) - gdb 6.8-3 source Check MinGW's Wiki for instruction on how to install these tools. After that, simply type ./configure (--prefix=) from msys terminal, or sh configure from cmd. If everything is OK, type make install. For those who can wait, I'll provide a precompiled gdb in my esnips account tomorrow. ---------------------------------------------------------------------- Dibo · 2008-11-24 08:21 QuoteFor those who can wait, I'll provide a precompiled gdb in my esnips account tomorrow Thanks. So I wait for yours version, maybe it help ---------------------------------------------------------------------- Leledumbo · 2008-11-25 04:10 Here you go! Oh, you might also want to check my Free Pascal and Lazarus Library Documentation in chm format. ---------------------------------------------------------------------- Dibo · 2008-11-25 18:00 Hm, when I run application I have error: Ooops, the debugger entered the error state. Save your work now! Hit Stop, and hope the best, we're pulling the plug. I must only replace gdb.exe? I have Windows Vista, so maybe this is the main problem P.S. Thanks for library documentation, good work! ---------------------------------------------------------------------- Leledumbo · 2008-11-26 03:52 Hmm... I don't have Vista, so I can't confirm whether it works fine or not there. It works fine on my XP. ---------------------------------------------------------------------- Dibo · 2008-11-26 20:51 Ok, I found mingw auto installer. He download required packages. So, I extract "gdb-6.8" folder to C:/Mingw. Then run msys.bat. In terminal I type "cd c:mingw/gdb-6.8" and now what? . When I type "./configure --prefix=/test_folder" I have this: Code: [Select]checking build system type... i686-pc-mingw32 checking host system type... i686-pc-mingw32 checking target system type... i686-pc-mingw32 checking for a BSD-compatible install... /bin/install -c checking whether ln works... yes checking whether ln -s works... yes checking for gcc... no checking for cc... no checking for cc... no checking for cl... no configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. Then, after "make install" : Code: [Select]make: *** No rule to make target `install'.  Stop Folder "gdb-6.8" contain files like "install-sh", "makefile.in", but subfolder "gdb" contains  similar files ---------------------------------------------------------------------- Leledumbo · 2008-11-27 02:49 The installer doesn't automatically add C:\mingw\bin to your PATH environment variable. ---------------------------------------------------------------------- Dibo · 2008-11-27 18:46 Thanks for your hints Leledumbo! Now I have my own gdb.exe (it have 9MB!) . So I copy this file to C:\Lazarus\MinGW\bin, run application project (with big smile on the face) and after linking output file... my old good error: "Project raised exception class 'External: SIGSEGV'", then "Execution paused. Adres: $10009CBC Procedure: ?? File: (Some day an assembler window might popup here " . I give up. Maybe I have some specific software installed on my system? Because I have this same error on my second computer. Now I work on nootebok HP Pavilion dv6000 with Windows Vista, but I have desktop Dell with Windows XP and in this computer this error is too. In both computers I have installed this same favourite softwares (firewalls, Anitvir, IM, .NET frameworks, etc.) Is possible that software is the reason? Are generated any logs of debugger? Thanks again Leledumbo for your patient Edit: I decided to search something about SIGSEGV in goole. 1. People suggest to run project from path that not contains spaces. I try, it not help 2. I found how create backtrace with GDB. This is my output log: Code: [Select]GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later 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 "i686-pc-mingw32"... (gdb) run Starting program: C:\lazarus\Projects/project1.exe [New thread 316.0x134] Program received signal SIGSEGV, Segmentation fault. 0x10009cbc in ?? () (gdb) quit The program is running.  Exit anyway? (y or n) 3. I have GDB configured as "i686-pc-mingw32". I found that I must: QuoteReplace this GDB with i686-mingw version from www.mingw.org and all should be fine but I can't find this version of GDB ---------------------------------------------------------------------- Leledumbo · 2008-11-28 02:14 QuoteNow I have my own gdb.exe (it have 9MB!) Shouldn't be that big of you pass CFLAGS='-s -O3' LDFLAGS='-s -O3' (no debugging symbols + level 3 optimizations) when calling configure (now you know how my GDB can be that small). Quotefirewalls, Anitvir, IM, .NET frameworks, etc. I also have AntiVir and .NET framework 2.0 installed, so I guess it has nothing to do with them Does my GDB run fine on your XP machine? Ah, one more thing. My LCL and components are all smartlinked and stripped, so -g will only add debug symbols to my project. Please try (on Tools->Configure build Lazarus clean and build LCL, then add -XXs in Options editbox) ---------------------------------------------------------------------- duncanparsons · 2008-11-28 12:27 Quote from: "Leledumbo"Here you go! Oh, you might also want to check my Free Pascal and Lazarus Library Documentation in chm format. Hi L/d.. Sorry to report, the chm doesn't work in Windows.. I'm using XP64, and it can't find any of the pages... is the TOC correct? Great initiative DSP ---------------------------------------------------------------------- Leledumbo · 2008-11-29 06:33 It works on 32-bit Windows, but perhaps doesn't work on 64-bit Windows. AFAIK Windows doesn't provide any free chm tools anymore, I compile it using MS HTML Help Workshop 1.4, which is very old. ---------------------------------------------------------------------- Dibo · 2008-11-29 11:22 Quote from: "Leledumbo"Does my GDB run fine on your XP machine? First, I have error "can't find iconv.dll". So I download it. Then when I run application I have again "Project raised exception class 'External: SIGSEGV"  :? Quote from: "Leledumbo"so -g will only add debug symbols to my project. Please try (on Tools->Configure build Lazarus clean and build LCL, then add -XXs in Options editbox) -g and -XXs? XXs is options parameter too? I add both, then checked radiobutton "Clean Up + Build All " and build lazarus. It doesn't help, but my exe size doesn't change (it should be smaller?) EDIT: Ok, I found how do this on lazarus wikipage. My exe is smaller but SIGSEGV error doesn't disappear. I tryed several compiler configuration (with and without smart linker, with and without debug symbol, etc). I give up. Thanks leledumbo for help. ---------------------------------------------------------------------- Jose Mejuto · 2008-12-19 22:23 Quote from: Dibo on November 29, 2008, 12:22:56 pmOk, I found how do this on lazarus wikipage. My exe is smaller but SIGSEGV error doesn't disappear. I tryed several compiler configuration (with and without smart linker, with and without debug symbol, etc). I give up. Thanks leledumbo for help. Hello, In the past I had the same error, it was a side effect of my printer driver when the software tries to enumerate data in the default printer, I solved it installing "Generic / Text printer" and setting it as default, now gdb does not break with the SIGSEGV. Try it, you will not lost anything