Some newbie questions

CodeLite installation/troubleshooting forum
S1ay
CodeLite Curious
Posts: 5
Joined: Tue Jun 01, 2010 8:42 pm
Genuine User: Yes
IDE Question: C++
Contact:

Some newbie questions

Post by S1ay »

Hi All! (Sorry about my english)
There are some questions with CodeLite version 2.5.2.4031 that was installed from a ports on OS FreeBSD 8.1:
1) "Breakpoint creation unsuccessful", wherever i try set it in code:

Code: Select all

#include <stdio.h>

int main(int argc, char **argv)
{
	int i=0;
	for(i=0; i<10; i++) {
	printf("hello world[%d]\n",i);
	}
		return 0;
}
(I try
playback example in "Hello world" video)

2) After click on "Start/Continue debugger" button the empty form created (without "hello world"), is it right? (If i open file that compiled with 'cc -g' options All is OK.)
3) Does CodeLite can understand emacs hotkeys?
Thanks.

Code: Select all

Using gdbinit file: /home/sly/.gdbinit
Current working dir: /mnt/s8/c/test/12
Launching gdb from : ./Debug
Starting debugger  : gdb --tty=/dev/pts/4 --interpreter=mi "./12"
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print pretty on
DEBUG>>set print elements 200
DEBUG>>00000032-break-insert "\"/mnt/s8/c/test/12/main.cpp:6\""
DEBUG>>00000033-break-insert "\"/mnt/s8/c/test/main.c:6\""
Debug session started successfully!
DEBUG>>00000034-exec-run 
DEBUG>>~"GNU gdb 6.1.1 [FreeBSD]\n"
GNU gdb 6.1.1 [FreeBSD]
DEBUG>>~"Copyright 2004 Free Software Foundation, Inc.\n"
Copyright 2004 Free Software Foundation, Inc.
DEBUG>>~"GDB is free software, covered by the GNU General Public License, and you are\n"
GDB is free software, covered by the GNU General Public License, and you are
DEBUG>>~"welcome to change it and/or distribute copies of it under certain conditions.\n"
welcome to change it and/or distribute copies of it under certain conditions.
DEBUG>>~"Type \"show copying\" to see the conditions.\n"
Type "show copying" to see the conditions.
DEBUG>>~"There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
There is absolutely no warranty for GDB.  Type "show warranty" for details.
DEBUG>>~"This GDB was configured as \"i386-marcel-freebsd\"..."
This GDB was configured as "i386-marcel-freebsd"...
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>^done
DEBUG>>&"set breakpoint pending on\n"
DEBUG>>^done
DEBUG>>&"set width 0\n"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>^done
DEBUG>>&"set print pretty on\n"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>&"No symbol table is loaded.  Use the \"file\" command.\n"
DEBUG>>00000032^error,msg="No symbol table is loaded.  Use the \"file\" command."
Breakpoint creation unsuccessful
ERROR: failed to place breakpoint: "^error,msg="No symbol table is loaded.  Use the \"file\" command.""
No symbol table is loaded.  Use the "file" command.
DEBUG>>&"No symbol table is loaded.  Use the \"file\" command.\n"
DEBUG>>00000033^error,msg="No symbol table is loaded.  Use the \"file\" command."
Breakpoint creation unsuccessful
ERROR: failed to place breakpoint: "^error,msg="No symbol table is loaded.  Use the \"file\" command.""
No symbol table is loaded.  Use the "file" command.
DEBUG>>00000034^running
Continuing...
DEBUG>>&"No executable file specified.\n"
DEBUG>>&"Use the \"file\" or \"exec-file\" command.\n"
DEBUG>>00000034^error,msg="No executable file specified.\nUse the \"file\" or \"exec-file\" command."
No executable file specified.\nUse the "file" or "exec-file" command.
Last edited by S1ay on Fri Jun 04, 2010 6:17 pm, edited 1 time in total.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some newbie questions

Post by eranif »

S1ay wrote:1) "Breakpoint creation unsuccessful", wherever i try set it in code:
Please enable debugger logging and paste here the entire content of the debugger log
S1ay wrote:2) After click on "Start/Continue debugger" button the empty form created (without "hello world"), is it right? (If i open file that compiled with 'cc -g' options All is OK.)
No, you should see it as if it is running under shell.
S1ay wrote:DEBUG>>&"No symbol table is loaded. Use the \"file\" command.\n"
DEBUG>>00000032^error,msg="No symbol table is loaded. Use the \"file\" command."
Breakpoint creation unsuccessful
Did you built your program in debug mode? Please post the entire workspace / project here (including the source file)

Eran
Make sure you have read the HOW TO POST thread
S1ay
CodeLite Curious
Posts: 5
Joined: Tue Jun 01, 2010 8:42 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some newbie questions

Post by S1ay »

Did you built your program in debug mode? Please post the entire workspace / project here (including the source file)
"Workspace configuration: Debug", "Available project configurations: test01: Debug". But i am not sure that debugger configuration is well. (I try change Settings->Debugger Settings-> Debugger patch: /usr/bin/gdb)
How i can see entire workspace?
There is log with "Enable debugger for loging": (But the same was in my previous post)

Code: Select all

Using gdbinit file: /home/sly/.gdbinit
Current working dir: /mnt/s8/c/test/CodeLite/1
Launching gdb from : ./Debug
Starting debugger  : /usr/bin/gdb --tty=/dev/pts/1 --interpreter=mi "./test01"
DEBUG>>set unwindonsignal on
DEBUG>>set breakpoint pending on
DEBUG>>set width 0
DEBUG>>set height 0
DEBUG>>set print pretty on
DEBUG>>set print elements 200
DEBUG>>00000013-break-insert "\"/mnt/s8/c/test/CodeLite/1/main.c:6\""
Debug session started successfully!
DEBUG>>00000014-exec-run 
DEBUG>>~"GNU gdb 6.1.1 [FreeBSD]\n"
GNU gdb 6.1.1 [FreeBSD]
DEBUG>>~"Copyright 2004 Free Software Foundation, Inc.\n"
Copyright 2004 Free Software Foundation, Inc.
DEBUG>>~"GDB is free software, covered by the GNU General Public License, and you are\n"
GDB is free software, covered by the GNU General Public License, and you are
DEBUG>>~"welcome to change it and/or distribute copies of it under certain conditions.\n"
welcome to change it and/or distribute copies of it under certain conditions.
DEBUG>>~"Type \"show copying\" to see the conditions.\n"
Type "show copying" to see the conditions.
DEBUG>>~"There is absolutely no warranty for GDB.  Type \"show warranty\" for details.\n"
There is absolutely no warranty for GDB.  Type "show warranty" for details.
DEBUG>>~"This GDB was configured as \"i386-marcel-freebsd\"..."
This GDB was configured as "i386-marcel-freebsd"...
DEBUG>>&"/home/sly/.gdbinit:1: Error in sourced command file:\n"
DEBUG>>&"Undefined command: \"gdb\".  Try \"help\".\n"
DEBUG>>&"set unwindonsignal on\n"
DEBUG>>^done
DEBUG>>&"set breakpoint pending on\n"
DEBUG>>^done
DEBUG>>&"set width 0\n"
DEBUG>>^done
DEBUG>>&"set height 0\n"
DEBUG>>^done
DEBUG>>&"set print pretty on\n"
DEBUG>>^done
DEBUG>>&"set print elements 200\n"
DEBUG>>^done
DEBUG>>&"No symbol table is loaded.  Use the \"file\" command.\n"
DEBUG>>00000013^error,msg="No symbol table is loaded.  Use the \"file\" command."
Breakpoint creation unsuccessful
ERROR: failed to place breakpoint: "^error,msg="No symbol table is loaded.  Use the \"file\" command.""
No symbol table is loaded.  Use the "file" command.
DEBUG>>00000014^running
Continuing...
DEBUG>>&"No executable file specified.\n"
DEBUG>>&"Use the \"file\" or \"exec-file\" command.\n"
DEBUG>>00000014^error,msg="No executable file specified.\nUse the \"file\" or \"exec-file\" command."
No executable file specified.\nUse the "file" or "exec-file" command.
If i try "Run Active Project":

Code: Select all

Current working directory: /mnt/s8/c/test/CodeLite/1
Running program: /usr/local/bin/codelite_xterm './test01 ' '/bin/sh -f /usr/local/bin/codelite_exec ./test01 '
and text in form:

Code: Select all

/usr/local/bin/codelite_exec: ./test01: not found
Press ENTER to continue...
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some newbie questions

Post by eranif »

Can you rebuild the project and paste here the output of the 'Build' window?

Eran
Make sure you have read the HOW TO POST thread
S1ay
CodeLite Curious
Posts: 5
Joined: Tue Jun 01, 2010 8:42 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some newbie questions

Post by S1ay »

Code: Select all

---------Build Started--------
/bin/sh -c '"make"  -j 4 -f "workspace_test01_wsp.mk"'
----------Building project:[ test01_project - Debug ]----------
"test01_project.mk", line 80: Need an operator
make: fatal errors encountered -- cannot continue
*** Error code 1
1 error
----------Build Ended----------
0 errors, 0 warnings
And "test01_project.mk":

Code: Select all

cat test01_project.mk  | grep -n '' 
1:##
2:## Auto Generated makefile by CodeLite IDE
3:## any manual changes will be erased      
4:##
5:## Debug
6:ProjectName            :=test01_project
7:ConfigurationName      :=Debug
8:IntermediateDirectory  :=./Debug
9:OutDir                 := $(IntermediateDirectory)
10:WorkspacePath          := "/mnt/s8/c/test/CodeLite/workspace_test01"
11:ProjectPath            := "/mnt/s8/c/test/CodeLite/workspace_test01"
12:CurrentFileName        :=
13:CurrentFilePath        :=
14:CurrentFileFullPath    :=
15:User                   :=User &
16:Date                   :=04.06.2010
17:CodeLitePath           :="/usr/home/sly/.codelite"
18:LinkerName             :=gcc
19:ArchiveTool            :=ar rcus
20:SharedObjectLinkerName :=gcc -shared -fPIC
21:ObjectSuffix           :=.o
22:DependSuffix           :=.o.d
23:PreprocessSuffix       :=.o.i
24:DebugSwitch            :=-g 
25:IncludeSwitch          :=-I
26:LibrarySwitch          :=-l
27:OutputSwitch           :=-o 
28:LibraryPathSwitch      :=-L
29:PreprocessorSwitch     :=-D
30:SourceSwitch           :=-c 
31:CompilerName           :=gcc
32:C_CompilerName         :=gcc
33:OutputFile             :=$(IntermediateDirectory)/$(ProjectName)
34:Preprocessors          :=
35:ObjectSwitch           :=-o 
36:ArchiveOutputSwitch    := 
37:PreprocessOnlySwitch   :=-E 
38:MakeDirCommand         :=mkdir -p
39:CmpOptions             := -g $(Preprocessors)
40:LinkOptions            :=  
41:IncludePath            :=  "$(IncludeSwitch)." "$(IncludeSwitch)." 
42:RcIncludePath          :=
43:Libs                   :=
44:LibPath                := "$(LibraryPathSwitch)." 
45:
46:
47:##
48:## User defined environment variables
49:##
50:CodeLiteDir:=/usr/local/share/codelite
51:Objects=$(IntermediateDirectory)/main$(ObjectSuffix) 
52:
53:##
54:## Main Build Targets 
55:##
56:all: $(OutputFile)
57:
58:$(OutputFile): makeDirStep $(Objects)
59:     @$(MakeDirCommand) $(@D)
60:     $(LinkerName) $(OutputSwitch)$(OutputFile) $(Objects) $(LibPath) $(Libs) $(LinkOptions)
61:
62:makeDirStep:
63:     @test -d ./Debug || $(MakeDirCommand) ./Debug
64:
65:PreBuild:
66:
67:
68:##
69:## Objects
70:##
71:$(IntermediateDirectory)/main$(ObjectSuffix): main.c $(IntermediateDirectory)/main$(DependSuffix)
72:     $(C_CompilerName) $(SourceSwitch) "/mnt/s8/c/test/CodeLite/workspace_test01/main.c" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/main$(ObjectSuffix) $(IncludePath)
73:$(IntermediateDirectory)/main$(DependSuffix): main.c
74:     @$(C_CompilerName) $(CmpOptions) $(IncludePath) -MT$(IntermediateDirectory)/main$(ObjectSuffix) -MF$(IntermediateDirectory)/main$(DependSuffix) -MM "/mnt/s8/c/test/CodeLite/workspace_test01/main.c"
75:
76:$(IntermediateDirectory)/main$(PreprocessSuffix): main.c
77:     @$(C_CompilerName) $(CmpOptions) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/main$(PreprocessSuffix) "/mnt/s8/c/test/CodeLite/workspace_test01/main.c"
78:
79:
80:-include $(IntermediateDirectory)/*$(DependSuffix)
81:##
82:## Clean
83:##
84:clean:
85:     $(RM) $(IntermediateDirectory)/main$(ObjectSuffix)
86:     $(RM) $(IntermediateDirectory)/main$(DependSuffix)
87:     $(RM) $(IntermediateDirectory)/main$(PreprocessSuffix)
88:     $(RM) $(OutputFile)
89:
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some newbie questions

Post by eranif »

Which version of Make are you using?
What OS are you using?

Go to 'Settings -> Build Settings -> Compilers' tab, and select your compiler (gnu gcc)

Under the gcc tree, select the 'Advanced' options, and then un-check the option 'Use compiler -MT switch to generate source dependencies files (.o.d)"

Try to build again, does it help?
Eran
Make sure you have read the HOW TO POST thread
S1ay
CodeLite Curious
Posts: 5
Joined: Tue Jun 01, 2010 8:42 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some newbie questions

Post by S1ay »

Yes it does! Thank you so much!
I am using "FreeBSD 8.1-PRERELEASE".
And there are many make 8) :

Code: Select all

 
automake-1.10.1             =  up-to-date with port 
automake-1.4.6_5            =  up-to-date with port 
automake-1.5_5,1            =  up-to-date with port 
automake-1.6.3_1            =  up-to-date with port 
automake-1.7.9_2            =  up-to-date with port 
automake-1.8.5_3            =  up-to-date with port 
automake-1.9.6_3            =  up-to-date with port 
automake-wrapper-20071109   =  up-to-date with port 
cmake-2.8.1_1               =  up-to-date with port 
gccmakedep-1.0.2            =  up-to-date with port 
gmake-3.81_4                =  up-to-date with port 
imake-1.0.3,1               =  up-to-date with port 
makedepend-1.0.2,1          =  up-to-date with port 
qmake-3.3.8_1               =  up-to-date with port 
qt4-makeqpf-4.6.2           =  up-to-date with port 
qt4-qmake-4.6.2             =  up-to-date with port 
tmake-1.7_5                 =  up-to-date with port
And how about emac's hotkeys in CodeLite?
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some newbie questions

Post by eranif »

S1ay wrote:Yes it does! Thank you so much!
I am using "FreeBSD 8.1-PRERELEASE".
So you are using an old or maybe a too new version which has no backward compatibility to the "-include" command in makefiles

Removing the dependencies, has an impact:
Changing a header file which is included in a CPP file, using the default settings of codeite will trigger a re-compilation of all CPP files including that header file.
By removing the dependencies, you will need to take care of it yourself.

I strongly suggest that you try different versions of 'make' and see if it works for you with the 'dependencies' flag enabled
S1ay wrote:And how about emac's hotkeys in CodeLite?
I am not sure what you are after here.. but you can re-configure most of codelite's keyboard shortcuts through the menu "settings -> keyboard shortcuts"

Eran
Make sure you have read the HOW TO POST thread
S1ay
CodeLite Curious
Posts: 5
Joined: Tue Jun 01, 2010 8:42 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Some newbie questions

Post by S1ay »

"settings -> keyboard shortcuts"
There is a big choice, but a can't see another way to movement through text 8(.
(Next symbol/line/paragraph, previous symbol/line/paragraph, delete next/previous symbol...) Text movement without UP,DOWN,LEFT,RIGHT key (without right part of keyboard) Is very nice, is not it?
Post Reply