Recent

Author Topic: Ooops Debugger Error under Mac OS using gdb  (Read 14336 times)

freq

  • New Member
  • *
  • Posts: 22
Ooops Debugger Error under Mac OS using gdb
« on: April 14, 2005, 10:20:29 am »
Hi,

got the Ooops Debugger Error under Mac OS using gdb with the following output in the x11terminal. What the hell means that? I using the gdb version that comes with the 10.3.8. OS.

Please help!
---------------------



Free Pascal Compiler version 1.9.8 [2005/02/20] for powerpc
Copyright (c) 1993-2005 by Florian Klaempfl
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Target OS: Darwin for PowerPC
Compiling /Users/jst/Development/source/test/project1.lpr
Assembling project1
Linking /Users/jst/Development/source/test/project1
15 Lines compiled, 2.9 sec
[TCompiler.Compile] end
[TDebugManager.DoInitDebugger] A
[TCmdLineDebugger] Debug PID: 1365
TGDBMIDebugger.ProcessResult Error: error
[Debugger] Running GDB version: Apple version gdb-330.1
[TDebugManager.OnDebuggerChangeState] state: dsIdle
[TDebugger.SetFileName] "/Users/jst/Development/source/test/project1"
[WARNING] Debugger: Unexpected async-record: =shlibs-updated
[TDebugManager.OnDebuggerChangeState] state: dsStop
[TDebugManager.DoInitDebugger] END
[TMainIDE.DoRunProject] B TGDBMIDebugger
TDebugManager.RunDebugger B TGDBMIDebugger
TGDBMIDebugger.ProcessResult Error: error
[Debugger] Log output: &"info functions FPC_CPUINIT\n"
[Debugger] Log output: &"info functions $$_RUNERROR$\n"
[Debugger] Log output: &"info file\n"
[Debugger] File type:
[Debugger] Entry point:
[Debugger] Console output: ~"[Switching to process 1369 local thread 0xd03]\n"
[WARNING] Debugger: Unexpected async-record: =shlibs-updated
[TDebugManager.OnDebuggerChangeState] state: dsRun
[Debugger] Console output: ~"Re-enabling shared library breakpoints: 1 2 3 4\n"
[Debugger] Notify output: =shlibs-updated
[Debugger] Log output: &"info program\n"
[WARNING] Debugger: Unknown record: macosx_debug_inferior_status: current status
:
[WARNING] Debugger: Unknown record:               inferior task: 0x10f
[WARNING] Debugger: Unknown record:                 [SIGNAL THREAD]
[WARNING] Debugger: Unknown record: macosx_debug_inferior_status: information on
 debugger task:
[WARNING] Debugger: Unknown record: macosx_debug_inferior_status: information on
 inferior task:
[WARNING] Debugger: Unknown record: macosx_debug_inferior_status: information on
 debugger threads:
[WARNING] Debugger: Unknown record:   thread: 0x50f
[WARNING] Debugger: Unknown record:   thread: 0xe03
[WARNING] Debugger: Unknown record:   thread: 0x1103
[WARNING] Debugger: Unknown record: macosx_debug_inferior_status: information on
 inferior threads:
[WARNING] Debugger: Unknown record:   thread: 0xd03
[Debugger] Target PID: 0
[TDebugManager.OnDebuggerChangeState] state: dsError
Ooops, the debugger entered the error state
TDebugger.ReqCmd failed: Run
[TMainIDE.DoRunProject] END

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Re: Ooops Debugger Error under Mac OS using gdb
« Reply #1 on: April 14, 2005, 11:22:24 am »
Since I have no mac yet, the debugger is only tested on i386.

Quote from: "freq"

got the Ooops Debugger Error under Mac OS using gdb with the following output in the x11terminal. What the hell means that?

For debugging, Lazarus uses gdb. It sends commands to gdb through stdin and it gets responses through stdout. THe Ooops error you get when Lazarus receives a response from gdb which it didn't expect to get.

Quote

I using the gdb version that comes with the 10.3.8. OS.

no clue what comes with 10.3
Quote

[Debugger] Running GDB version: Apple version gdb-330.1

Great.... Apple uses its own version numbering.
Quote

[WARNING] Debugger: Unexpected async-record: =shlibs-updated

hmm... not fatal, but probably not good.
Quote

[TDebugManager.OnDebuggerChangeState] state: dsStop
[TDebugManager.DoInitDebugger] END
[TMainIDE.DoRunProject] B TGDBMIDebugger
TDebugManager.RunDebugger B TGDBMIDebugger
TGDBMIDebugger.ProcessResult Error: error
[Debugger] Log output: &"info functions FPC_CPUINIT\n"
[Debugger] Log output: &"info functions $$_RUNERROR$\n"
[Debugger] Log output: &"info file\n"
[Debugger] File type:
[Debugger] Entry point:

Empty ????
Did you enable debug info ?
Quote

[Debugger] Console output: ~"[Switching to process 1369 local thread 0xd03]\n"
[WARNING] Debugger: Unexpected async-record: =shlibs-updated
[TDebugManager.OnDebuggerChangeState] state: dsRun
[Debugger] Console output: ~"Re-enabling shared library breakpoints: 1 2 3 4\n"
[Debugger] Notify output: =shlibs-updated
[Debugger] Log output: &"info program\n"
[WARNING] Debugger: Unknown record: macosx_debug_inferior_status: current status
:
[WARNING] Debugger: Unknown record:               inferior task: 0x10f
[WARNING] Debugger: Unknown record:                 [SIGNAL THREAD]
[WARNING] Debugger: Unknown record: macosx_debug_inferior_status: information on
 debugger task:
[WARNING] Debugger: Unknown record: macosx_debug_inferior_status: information on
 inferior task:
[WARNING] Debugger: Unknown record: macosx_debug_inferior_status: information on
 debugger threads:
[WARNING] Debugger: Unknown record:   thread: 0x50f
[WARNING] Debugger: Unknown record:   thread: 0xe03
[WARNING] Debugger: Unknown record:   thread: 0x1103
[WARNING] Debugger: Unknown record: macosx_debug_inferior_status: information on
 inferior threads:
[WARNING] Debugger: Unknown record:   thread: 0xd03

Now complete guessing starts
Quote

[Debugger] Target PID: 0

This is not good. The debugger failed to retrieve the PID of your app
Quote

[TDebugManager.OnDebuggerChangeState] state: dsError
Ooops, the debugger entered the error state
TDebugger.ReqCmd failed: Run
[TMainIDE.DoRunProject] END

Without PID there is nothing we can do.

If you have enabled debuginfo when compiling your app, then
I guess the output of mac-gdb is somehow different than the normal gdb.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

freq

  • New Member
  • *
  • Posts: 22
Ooops Debugger Error under Mac OS using gdb
« Reply #2 on: April 14, 2005, 11:42:08 am »
Quote

Did you enable debug info ?

 
Yes is checked under Compiler Options \ Generatore Debugging Info for GDB.

freq

  • New Member
  • *
  • Posts: 22
Ooops Debugger Error under Mac OS using gdb
« Reply #3 on: April 14, 2005, 11:52:55 am »
I'm a boody new Mac OS and Unix beginner.... But could it be that gdb is not starting under x11 and then the program starts also fails? Starting an lazarus compiled program under the normal bash terminal will raise the error "Gtk-WARNING **: cannot open display.... In the x11 terminal it starts.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Ooops Debugger Error under Mac OS using gdb
« Reply #4 on: April 14, 2005, 02:25:05 pm »
That is a possible cause (there is no detection yet for X errors)

Can you check if in the Run Parameters - Environment there is a DISPLAY variable and that is has a value ?

If not, then you can either add a DISPLAY variable with the value :0
or (on the local tab) check Use Display with the value :0
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Ooops Debugger Error under Mac OS using gdb
« Reply #5 on: April 18, 2005, 02:39:36 pm »
OK, since I'm now a proud owner of a minimac, I could check it myself.
The installed gdb is version 5.3. And I wonder what gdb 5.3 sources they used since some output differs from the gdb 5.3 versions I've seen before.

A short intro to debugger internals.
GDB has 2 modi, one for user interaction and one for machine interaction (MI). Lazarus uses the MI since the output of MI is well defined and formatted. Unfortunately the MI interface is not complete, so for some functions you need to use non MI commands. Most gdb versions I've seen so far have for non MI commands a non MI output.
To get information about the image loaded, I use "info file" (which is a non MI command) to get the info. And what is the problem here, the MacOSX version of gdb returns the info as a MI output. Even on GDB 6.3 is that not the case (so I wonder what this versoin 5.3 really is)
I've been looking for other GDB veresions for OSX, but haven't found any. I'm thinking of building a 6.3 myself.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Ooops Debugger Error under Mac OS using gdb
« Reply #6 on: May 17, 2005, 10:47:38 am »
Last night I committed some fixes for this. AFAIK Lazarus should debug fine on mac OSX
Check CVS.
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018