Debugger Error state lazarus / 12-Debugger ---------------------------------------------------------------------- BLL · 2016-06-15 09:19 Hi, I am using fpc 3.0.0 and lazarus 1.7 on a Raspberry Pi, model 3. I normally use lazarus via vnc from my laptop. Here I can run my program after building it fine. However, if I use lazarus on the Pi itself, then when I try and run a program, the debugger says it has entered an error state and says: The GDB command "-gdb-set confirm off" did not return any result. How do I put this right? Brian ---------------------------------------------------------------------- Thaddy · 2016-06-15 10:33 Did you compile FPC itself on the Pi? In that case recompile with the make option GDBMI=1 There are some known GDB issues. Not FPC issues. This works for me. ---------------------------------------------------------------------- BLL · 2016-06-15 13:38 Hi, Thanks for the reply. Yes, I did recompile as I had to add some components. I will try your suggestion. Thanks Brian ---------------------------------------------------------------------- wp · 2016-06-15 14:23 Quote from: BLL on June 15, 2016, 03:38:47 pmI did recompile as I had to add some components.I think you don't understand: when you add components you compile Lazarus, but Thaddy's suggestion was about recompiling FPC. This is something different - and more difficult for a beginner. ---------------------------------------------------------------------- Thaddy · 2016-06-15 16:53 Yes, my suggestion was recompiling just fpc. There is another option however: download and install a more recent GDB than the one that is provided by RaspBian Jessie as default (although that should work perfectly ok). I am sorry if this was not clear. My Raspbian Lazarus installs are always compiled from trunk and I do not have a bog standard install available right now. ---------------------------------------------------------------------- BLL · 2016-06-15 17:08 Hi Thanks for that. I have no idea how to recompile fpc! It all worked fine after installation and this message has only recently appeared. Brian ---------------------------------------------------------------------- Martin_fr · 2016-06-15 22:36 QuoteThe GDB command "-gdb-set confirm off" This error comes from Lazarus (well passed on from gdb). It has nothing to do with the way fpc was compiled. (unless you add debug info maybe...) It is always good to try stabs or dwarf. Definitely try other gdb versions (older or newer / newer is not always better) ---------------------------------------------------------------------- BLL · 2016-06-16 08:45 Oh dear, I am getting conflicting advice! I have done some further tests. I had a backup SD card of lazarus/fpc as installed, before doing anything. I ran that up and the debugger is fine, so it's something that has happened since. I had problems installing TAChart as it reported problems with numlib. On advice, I downloaded certain .pas files and compiled them. This then allowed the chart utilities to install. Perhaps this upset something. Since lazarus recompiled on the chart installation, surely this would have put matters right? I am confused! Brian ---------------------------------------------------------------------- Martin_fr · 2016-06-16 10:12 I did a quick check. "set confirm off" is the very first command the IDE sends to gdb (way before debug info comes into play). If there is no response then either: - gdb did not get started (check the processlist) - the command or response got lost (stdin/stdout pipes not working) Both of them I would suspect to be a problem with FPC TProcess. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function TCmdLineDebugger.CreateDebugProcess(const AOptions: String): Boolean;begin  Result := False;  if FDbgProcess = nil  then begin    FDbgProcess := TProcessUTF8.Create(nil);    try      FDbgProcess.CommandLine := ExternalDebugger + ' ' + AOptions;      FDbgProcess.Options:= [poUsePipes, poNoConsole, poStdErrToOutPut, poNewProcessGroup];      {$if defined(windows) and not defined(wince)}// ...      {$endif windows}      FDbgProcess.ShowWindow := swoNone;      FDbgProcess.Environment:=DebuggerEnvironment;    except      FreeAndNil(FDbgProcess);    end;  end;  This is how TProcess is configured. You need to test, if that works (and if stdin/stdout get connected) on RPi, and if not report with FPC