Lazarus is not working when I use a debugger lazarus / 8-Other ---------------------------------------------------------------------- dotniet · 2009-10-14 10:22 Hi. I have Lazarus SVN (0929) on Ubuntu. I can compile and run programs in Lazarus ONLY if I don't have a debugger defined in the Environment->Options panel. If I define 'Gnu debugger' (/usr/bin/gdb) then Lazarus says 'debugging...' and the program never shows on screen. All I can do is to press the Stop button. PS: the path to debugger exists. ---------------------------------------------------------------------- Marc · 2009-10-14 11:57 What is the output of the view - debugger - debugoutput window ? ---------------------------------------------------------------------- dotniet · 2009-10-14 15:50 I will look there soon. Anyway, I think it cannot connect to the debugger because when I put a breakpoint into the source code, it is shown as invalid ('?' during desing and them during runtime an 'X'). Again: the (default) path to the debugger is valid. I just checked. I am running Lazarus without root permissions. ---------------------------------------------------------------------- dotniet · 2009-10-14 16:24 <-file-exec-and-symbols "/megx/home/me/my_data/programare/lazarus_maper3/maper.exe"> ^done (gdb) <-gdb-set language pascal> ^done (gdb) <-environment-cd .> ^done (gdb) <-environment-cd "/megx/home/me/my_data/programare/lazarus_maper3/"> ^done (gdb) <-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC> &"No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context.\n" ^error,msg="No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context." (gdb) &"info functions FPC_CPUINIT\n" ~"All functions matching regular expression \"FPC_CPUINIT\":\n" ~"\n" ~"Non-debugging symbols:\n" ~"0x08049a10  SYSTEM_FPC_CPUINIT\n" ^done (gdb) <-exec-arguments > ^done (gdb) <-gdb-set language pascal> ^done (gdb) &"info address main\n" ~"Symbol \"main\" is a function at address 0x80483f0.\n" ^done (gdb) <-break-insert -t *134513648> ^done,bkpt={number="9",type="breakpoint",disp="del",enabled="y",addr=" 0x080483f0",func="main",file="maper3.lpr",fullname="/megx/home/me/my_d ata/programare/lazarus_maper3/maper3.lpr",line="84",times="0"} (gdb) <-break-insert FPC_RAISEEXCEPTION> ^done,bkpt={number="10",type="breakpoint",disp="keep",enabled="y",addr ="0x08055986",at="",times="0"} (gdb) <-break-insert FPC_BREAK_ERROR> ^done,bkpt={number="11",type="breakpoint",disp="keep",enabled="y",addr ="0x08058a60",at="",times="0"} (gdb) <-break-insert FPC_RUNERROR> ^done,bkpt={number="12",type="breakpoint",disp="keep",enabled="y",addr ="0x08058b53",at="",times="0"} (gdb) &"info file\n" ~"Symbols from \"/megx/home/me/my_data/programare/lazarus_maper3/maper.exe\".\n" ~"Local exec file:\n" ~"\t`/megx/home/me/my_data/programare/lazarus_maper3/maper.exe', \n" ~"        file type elf32-i386.\n" ~"\tEntry point: 0x8095c50\t0x08048080 - 0x08095cc0 is .text\n" ~"\t0x08096000 - 0x080b47b0 is .data\n" ~"\t0x080b47b0 - 0x080b8484 is .bss\n" ^done (gdb) <-exec-run> ^running (gdb) &"warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4\n" *stopped,thread-id="0",frame={addr="0x080483f0",func="main",args=[],fi le="maper3.lpr",fullname="/megx/home/me/my_data/programare/lazarus_map er3/maper3.lpr",line="84"} (gdb) &"info program\n" ~"\tUsing the running image of child process 19328.\n" ~"Program stopped at 0x80483f0.\n" ~"It stopped at a breakpoint that has since been deleted.\n" ~"Type \"info stack\" or \"info registers\" for more information.\n" ^done (gdb) <-break-insert tester.sh:1> &"No source file named tester.sh.\n" ^error,msg="No source file named tester.sh." (gdb) <-exec-continue> ^running (gdb) *stopped,reason="signal-received",signal-name="SIGINT",signal- meaning="Interrupt",thread- id="0",frame={addr="0xffffe405",func="__kernel_vsyscall",args=[]} (gdb) <-symbol-list-lines /megx/home/me/my_data/programare/lazarus_maper3/maper3.lpr> ^done,lines=[{pc="0x08048080",line="30"},{pc="0x0804808c",line="30"},{ pc="0x080480bf",line="32"},{pc="0x080480e0",line="33"},{pc="0x080480e7 ",line="34"},{pc="0x08048109",line="35"},{pc="0x08048110",line="39"},{ pc="0x08048124",line="40"},{pc="0x08048132",line="41"},{pc="0x08048139 ",line="44"},{pc="0x08048148",line="46"},{pc="0x0804814c",line="48"},{ pc="0x08048176",line="50"},{pc="0x080481a3",line="54"},{pc="0x080481ca ",line="58"},{pc="0x080481dd",line="59"},{pc="0x08048214",line="59"},{ pc="0x08048220",line="62"},{pc="0x0804822f",line="62"},{pc="0x08048264 ",line="63"},{pc="0x08048274",line="64"},{pc="0x08048285",line="65"},{ pc="0x080482a1",line="65"},{pc="0x080482c0",line="68"},{pc="0x080482cc ",line="68"},{pc="0x080482de",line="69"},{pc="0x080482eb",line="70"},{ pc="0x08048310",line="73"},{pc="0x0804831c",line="73"},{pc="0x08048341 ",line="75"},{pc="0x08048398",line="76"},{pc="0x080483c6",line="77"},{ pc="0x080483df",line="77"},{pc="0x080483f0",line="84"},{pc="0x080483fe ",line="85"},{pc="0x0804841d",line="86"},{pc="0x08048436",line="87"},{ pc="0x08048440",line="88"},{pc="0x0804844a",line="89"}] (gdb) <-exec-continue> ^running (gdb) ---------------------------------------------------------------------- dotniet · 2009-10-14 16:31 Quote from: dotniet on October 14, 2009, 06:24:38 pm(gdb) <-symbol-list-lines /megx/home/me/my_data/programare/lazarus_maper3/maper3.lpr> ^done,lines=[{pc="0x08048080",line="30"},{pc="0x0804808c",line="30"}, This is line 30:   ErrorMsg:= CheckOptions('h','help'); ---------------------------------------------------------------------- Marc · 2009-10-14 17:41 Quote from: dotniet on October 14, 2009, 05:50:32 pmI will look there soon. Anyway, I think it cannot connect to the debugger because when I put a breakpoint into the source code, it is shown as invalid ('?' during desing and them during runtime an 'X'). Again: the (default) path to the debugger is valid. I just checked. I am running Lazarus without root permissions. According to the output you have set a breakpoint on tester.sh That doesn't look like a pascal source file to me. You don't have to be root to debug your app. From the output I see it should work. Is it a graphic app, or a console app ? ---------------------------------------------------------------------- dotniet · 2009-10-14 18:21 Console app. That is a test file, to test the resulted compiled application. It has absolutely nothing to do with my Lazarus project. I think I open it at a moment in Lazarus (just used Lazarus as editor). But I don't think Lazarus compiled the file into my project. I mean it can't compile a SH file. Right?