Recent

Author Topic: "unknown stabs type" error  (Read 11080 times)

obijohn

  • New member
  • *
  • Posts: 9
"unknown stabs type" error
« on: April 30, 2010, 12:23:40 am »
Well, I am stuck. At this point I believe it may be because of the recent XCode 3.2.2 update. I've tried reverting to previous versions of both FPC and Lazarus, but I still get that "unknown stabs type" when compiling Lazarus or a Lazarus project (and an access violation when I attempt to run one of my compiled projects, but not Lazarus).

Has anybody else upgraded XCode to 3.2.2 and experienced this problem (or not)?

obijohn

  • New member
  • *
  • Posts: 9
Re: "unknown stabs type" error
« Reply #1 on: April 30, 2010, 01:05:55 am »
Ok, I think I've found the problem. It is indeed an XCode issue. Passing -gw2 to make when building Lazarus eliminates the "unknown stabs type" errors and the linking errors when building projects. To build Lazarus, I did "make all OPT="-gw2 -godwarfsets" and it compiled fine.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: "unknown stabs type" error
« Reply #2 on: April 30, 2010, 07:27:05 am »
FWIW, it's not Xcode 3.2.2-specific. It already started with Xcode 3.0. It is indeed a bug in the Xcode linker.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: "unknown stabs type" error
« Reply #3 on: April 30, 2010, 07:52:57 am »
FWIW, it's not Xcode 3.2.2-specific. It already started with Xcode 3.0. It is indeed a bug in the Xcode linker.

And for the record: this problem does not cause access violations. It only makes stepping into functions/procedures with locally defined symbolic constants impossible. Your crashing problems were caused by something else.

obijohn

  • New member
  • *
  • Posts: 9
Re: "unknown stabs type" error
« Reply #4 on: April 30, 2010, 02:01:12 pm »
Well, yes and no. Yes, I did in fact have an issue in one of my projects that was causing a crash. However, Lazarus itself crashes when trying to debug anything now, even a bare-bones "Form1"-default project. At first I assumed it was because I didn't have the project being compiled with the same options as Lazarus. But then I made sure it was being compiled with the "-gw2 -godwarfsets" options, and it's still a no-go. Sometimes the app won't even load in the debugger. If it does, trying to stop the debugger crashes Lazarus, giving the "Access violation" message. Always. And simply exiting the running project app crashes Lazarus every time, too, which I'm assuming is because doing so exits the debugger.

I'm not sure if this is because of the new gdb in XCode 3.2.2 or what. This version say "Apple version gdb-1461.2" and doing a search on that version reveals all of 6 results, so it is pretty new.

Anyway, something is going on here, and I can't figure out how to get around this debugging issue.

skalogryz

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2770
    • havefunsoft.com
Re: "unknown stabs type" error
« Reply #5 on: April 30, 2010, 03:13:58 pm »
Well, yes and no. Yes, I did in fact have an issue in one of my projects that was causing a crash. However, Lazarus itself crashes when trying to debug anything now, even a bare-bones "Form1"-default project.
That's probably caused by debugger.
Please attach the content of Debug Output window.

Also, please launch Lazarus from Terminal to see the IDE's output, it might also give some clue.

obijohn

  • New member
  • *
  • Posts: 9
Re: "unknown stabs type" error
« Reply #6 on: April 30, 2010, 10:17:39 pm »
Running gdb from the command-line and loading the compiled project runs fine. Here's the output:
Code: [Select]
obijohn:~/projects/fpc/testprojects/project1$ gdb project1.app
GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2) (Fri Mar  5 04:43:10 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ............ done

(gdb) run
Starting program: /Users/obijohn/projects/fpc/testprojects/project1/project1.app/Contents/MacOS/project1
Reading symbols for shared libraries .+++++++++++......................................................................................... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done

[ here I just quit the program ]

Program exited normally.
(gdb) quit
obijohn:~/projects/fpc/testprojects/project1$

And below is the Debug Output window contents after trying to debug it in Lazarus. The project did not successfully display and I had to use Activity Monitor to fore-quit gdb.

Code: [Select]
(gdb)
<-gdb-set confirm off>
^done,time={wallclock="0.00006",user="0.00002",system="0.00003",start="1272660731.894504",end="1272660731.894561"}
(gdb)
<-gdb-set new-console off>
^error,msg="No symbol table is loaded.  Use the \"file\" command."
(gdb)
<-gdb-version>
~"GNU gdb 6.3.50-20050815 (Apple version gdb-1461.2) (Fri Mar  5 04:43:10 UTC 2010)\n"
~"Copyright 2004 Free Software Foundation, Inc.\n"
~"GDB is free software, covered by the GNU General Public License, and you are\nwelcome to change it and/or distribute copies of it under certain conditions.\nType \"show copying\" to see the conditions.\nThere is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-apple-darwin\"."
^done,version="6.3.50-20050815 (Apple version gdb-1461.2)",rc_version="1461.2",target="x86_64-apple-darwin",build-date="Fri Mar  5 04:43:10 UTC 2010",time={wallclock="0.00083",user="0.00031",system="0.00002",start="1272660731.905626",end="1272660731.906459"}
(gdb)
<-gdb-set env Apple_PubSub_Socket_Render=/tmp/launch-EHgJpp/Render>
^done,time={wallclock="0.00010",user="0.00006",system="0.00004",start="1272660731.913567",end="1272660731.913668"}
(gdb)
<-gdb-set env COMMAND_MODE=unix2003>
^done,time={wallclock="0.00003",user="0.00003",system="0.00000",start="1272660731.917756",end="1272660731.917784"}
(gdb)
<-gdb-set env DISPLAY=/tmp/launch-3gZz9f/org.x:0>
^done,time={wallclock="0.00002",user="0.00002",system="0.00000",start="1272660731.921206",end="1272660731.921229"}
(gdb)
<-gdb-set env HOME=/Users/obijohn>
^done,time={wallclock="0.00003",user="0.00003",system="0.00000",start="1272660731.924519",end="1272660731.924549"}
(gdb)
<-gdb-set env LOGNAME=obijohn>
^done,time={wallclock="0.00003",user="0.00002",system="0.00000",start="1272660731.927624",end="1272660731.927650"}
(gdb)
<-gdb-set env PATH=/usr/bin:/bin:/usr/sbin:/sbin>
^done,time={wallclock="0.00006",user="0.00006",system="0.00001",start="1272660731.935884",end="1272660731.935943"}
(gdb)
<-gdb-set env SHELL=/bin/bash>
^done,time={wallclock="0.00003",user="0.00002",system="0.00000",start="1272660731.939431",end="1272660731.939456"}
(gdb)
<-gdb-set env SSH_AUTH_SOCK=/tmp/launch-jggwxM/Listeners>
^done,time={wallclock="0.00002",user="0.00002",system="0.00000",start="1272660731.942555",end="1272660731.942572"}
(gdb)
<-gdb-set env TMPDIR=/var/folders/wq/wq3ehK6WFCWBnVQhT-CZqE+++TI/-Tmp-/>
^done,time={wallclock="0.00002",user="0.00002",system="0.00000",start="1272660731.946128",end="1272660731.946147"}
(gdb)
<-gdb-set env USER=obijohn>
^done,time={wallclock="0.00002",user="0.00001",system="0.00000",start="1272660731.949434",end="1272660731.949451"}
(gdb)
<-gdb-set env __CF_USER_TEXT_ENCODING=0x1F5:0:0>
^done,time={wallclock="0.00002",user="0.00002",system="0.00000",start="1272660731.952694",end="1272660731.952711"}
(gdb)
<-file-exec-and-symbols "/Users/obijohn/projects/fpc/testprojects/project1/project1.app">
^done,time={wallclock="0.34025",user="0.25639",system="0.07742",start="1272660731.956120",end="1272660732.296369"}
(gdb)
<-environment-cd .>
^done,time={wallclock="0.00008",user="0.00006",system="0.00002",start="1272660732.302764",end="1272660732.302846"}
(gdb)
<-environment-cd "/Users/obijohn/projects/fpc/testprojects/project1/">
^done,time={wallclock="0.00004",user="0.00003",system="0.00001",start="1272660732.306046",end="1272660732.306085"}
(gdb)
<-data-evaluate-expression FPC_THREADVAR_RELOCATE_PROC>
^error,msg="No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context."
(gdb)
<info functions FPC_CPUINIT>
&"info functions FPC_CPUINIT\n"
~"All functions matching regular expression \"FPC_CPUINIT\":\n"
~"\nNon-debugging symbols:\n"
~"0x00011c00  SYSTEM_FPC_CPUINIT\n"
^done
(gdb)
<-exec-arguments >
^done,time={wallclock="0.00003",user="0.00003",system="0.00001",start="1272660732.346016",end="1272660732.346051"}
(gdb)
<set width 50000>
&"set width 50000\n"
^done
(gdb)
<-gdb-set language pascal>
^done,time={wallclock="0.00003",user="0.00002",system="0.00000",start="1272660732.352609",end="1272660732.352635"}
(gdb)
<info address main>
&"info address main\n"
~"Symbol \"main\" is at 0x1140c in a file compiled without debugging.\n"
^done
(gdb)
<-break-insert -t *70668>
^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x0001140c",file="project1.lpr",line="19",shlib="/Users/obijohn/projects/fpc/testprojects/project1/project1.app/Contents/MacOS/project1",times="0"},time={wallclock="0.00049",user="0.00019",system="0.00031",start="1272660732.361100",end="1272660732.361595"}
(gdb)
<ptype TObject>
&"ptype TObject\n"

[ here I had to force-quit gdb from Activity Monitor ]

Ok, and here is the command-line output of Lazarus:

Code: [Select]
obijohn:~/projects/src/lazarus$ ./startlazarus
TLazarusManager.Run starting /Users/obijohn/projects/src/lazarus/lazarus.app/Contents/MacOS/lazarus ...
TMainIDE.ParseCmdLineOptions:
  PrimaryConfigPath="/Users/obijohn/.lazarus"
  SecondaryConfigPath="/etc/lazarus"
TCarbonTabsControl.SetFocus Error: SetKeyboardFocus  failed with result -30585
TCarbonTabsControl.SetFocus Error: SetKeyboardFocus  failed with result -30585
[TMainIDE.DoRunProject] A
TMainIDE.DoInitProjectRun A True 0
TMainIDE.DoInitProjectRun B
TCompiler.Compile WorkingDir="/Users/obijohn/projects/fpc/testprojects/project1/" CompilerFilename="/usr/local/bin/ppc386" CompilerParams=" -MObjFPC -Scghi -O1 -g -gl  -k-framework -kCarbon -k-framework -kOpenGL -k'-dylib_file' -k'/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' -vewnhi -l -Fi/Users/obijohn/projects/fpc/testprojects/project1/lib/i386-darwin/ -Fu/Users/obijohn/projects/src/lazarus/lcl/units/i386-darwin/ -Fu/Users/obijohn/projects/src/lazarus/lcl/units/i386-darwin/carbon/ -Fu/Users/obijohn/projects/src/lazarus/packager/units/i386-darwin/ -Fu/Users/obijohn/projects/fpc/testprojects/project1/ -Fu. -FU/Users/obijohn/projects/fpc/testprojects/project1/lib/i386-darwin/ -oproject1 -gw2 -godwarfsets -dLCL -dLCLcarbon project1.lpr"
[TCompiler.Compile] CmdLine="/usr/local/bin/ppc386  -MObjFPC -Scghi -O1 -g -gl  -k-framework -kCarbon -k-framework -kOpenGL -k'-dylib_file' -k'/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib' -vewnhi -l -Fi/Users/obijohn/projects/fpc/testprojects/project1/lib/i386-darwin/ -Fu/Users/obijohn/projects/src/lazarus/lcl/units/i386-darwin/ -Fu/Users/obijohn/projects/src/lazarus/lcl/units/i386-darwin/carbon/ -Fu/Users/obijohn/projects/src/lazarus/packager/units/i386-darwin/ -Fu/Users/obijohn/projects/fpc/testprojects/project1/ -Fu. -FU/Users/obijohn/projects/fpc/testprojects/project1/lib/i386-darwin/ -oproject1 -gw2 -godwarfsets -dLCL -dLCLcarbon project1.lpr"
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.5.1 [2010/04/29] for i386
Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Darwin for i386
Compiling project1.lpr
Assembling project1
Compiling resource /Users/obijohn/projects/fpc/testprojects/project1/lib/i386-darwin/project1.or
Linking project1
20 lines compiled, 2.6 sec
2 hint(s) issued
[TCompiler.Compile] end
TMainIDE.DoInitProjectRun ProgramFilename=/Users/obijohn/projects/fpc/testprojects/project1/project1
[TCmdLineDebugger] Debug PID: 43044
TGDBMIDebugger.ProcessResult Error: ,msg="No symbol table is loaded.  Use the \"file\" command."
[Debugger] Running GDB version: 6.3.50-20050815 (Apple version gdb-1461.2)
[TDebugger.SetFileName] "/Users/obijohn/projects/fpc/testprojects/project1/project1.app"
[TMainIDE.DoRunProject] B TGDBMIDebugger
[TMainIDE.DoRunProject] END
TGDBMIDebugger.StartDebugging WorkingDir="/Users/obijohn/projects/fpc/testprojects/project1/"
TGDBMIDebugger.ProcessResult Error: ,msg="No symbol \"FPC_THREADVAR_RELOCATE_PROC\" in current context."
[Debugger] Log output: &"info functions FPC_CPUINIT\n"
[Debugger] Log output: &"set width 50000\n"
[Debugger] Log output: &"info address main\n"
[Debugger] Log output: &"ptype TObject\n"
[WARNING] Debugger: Execution of external command "-data-evaluate-expression %s" while queue exists
TDebugger.ReqCmd failed: Evaluate
TDebugger.ReqCmd Command not supported: Stop ClassName=TGDBMIDebugger
TDebugger.Stop Class=TGDBMIDebugger failed.

[ the project program did not display and I tried a "Stop" command, which obviously didn't work ]

^C
obijohn:~/projects/src/lazarus$

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2582
Re: "unknown stabs type" error
« Reply #7 on: May 02, 2010, 12:16:59 am »
See mailinglist for followups
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

kamischi

  • Full Member
  • ***
  • Posts: 177
Re: "unknown stabs type" error
« Reply #8 on: September 03, 2010, 02:13:05 pm »
The installation of lazarus (0.9.28.2) using fink is patched now with -gw to prevent the warning. As stated above the warnings were annoying, but not that harmful.
fpc 2.6.4, lazarus 1.4.0, Mac OS X, fink

 

TinyPortal © 2005-2018