Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Ok , i think i have found your problem. The wizard script for plugins is not really created for targets to be able to debug. I have created a updated script:
0) Close Codeblocks
1) Download the attached archive
1.1) Extract the archive
2) copy the extracted script to YOUR_CODEBLOCKS_INSTALLATION_DIRECTORY\share\CodeBlocks\templates\wizard\plugins\wizard.script
3) Open codeblocks by clicking on YOUR_CODEBLOCKS_INSTALLATION_DIRECTORY\codeblocks.exe
4) Create a new project: Codeblocks plugin
5) Go trough the wizard pages
6) This should create a project with two targets: "default" and "to_codeblocks"
   * "default"               will create the normal PLUGIN_NAME.cbplugin file for installation
   * "to_codeblocks"   will build and install the plugin in one step to your development version of codeblocks. With this target debugging should work out of the box

If this works i will try to talk to the devs to update the script
2
compiling current trunk of cb with current trunk of wx as of today failed because of missing wxTB_3DBUTTONS.
It seems, that does not exist within wx trunk any more.

Deleting the 2 only occurences solved this for us (see attached plain diff)

OS is Ubuntu 16.04 x86_64, g++-5.4.0,
cb built out of tree with:
Code: [Select]
../trunk/configure --prefix=/usr/local --with-contrib-plugins=all,-NassiShneiderman
wxwidgets was built with:

Code: [Select]
../trunk/configure -with-gtk=3 --enable-cxx11 --with-cxx=11 --enable-stl
corresponding change of wxwidgets see:
https://github.com/wxWidgets/wxWidgets/pull/223/commits/1a13f8e5b706afdcae9db58d1cb2c8b8a14dde07
3
There are (multiple) project files for every plugin. But there are also Makefiles so codeblocks can be build without codeblocks

Quote
So I doubt that In codeblocks people use to develop plugins through makefile rather than using the codeblocks plugin wizard available within codeblocks.
It is possible that the wizard is outdated or the project is not set up probably.
4
Please Enable full debug logging: Settings->Debugger->Common->Full (Debug) log. There you see exactly what is going on, and why the debugger fails.


Quote
Plugin question:
So do I need to copy my complete source code and put it inside plugin section in codeblocks_svn_code?
No. Simply open both projects in one workspace (by opening simply both projects). But the settings of the projects have to be ok, and i think there is your problem...

As Tim suggested you should try to build and debug a contrib plugin first.
1) For this open a contrib plugin project from /PATHTOCODEBLOCKS/src/plugins/contrib/ProjectOptionsManipulator/ProjectOptionsManipulator.cbp .
2) Then open /PATHTOCODEBLOCKS/src/CodeBlocks.cbp .
3) Activate again the ProjectOptionsManipulator.cbp by double click int the Management pane. This project should now be marked as active (The name is bold).
4) Check if the correct "default" target is selected in the toolbar near the build button
5) In the Management panel browse to Codeblocks/Source/src/app.cpp  (BUT DON'T ACTIVATE THE PROJECT) and go to line 610. Set a breakpoint there
6) Set a breakpoint of interest in the ProjectOptionsManipulator source
7) Now hit the debugger button
8) It should now halt first at src/app.cpp:610
9) Hit continue if the debugger stops until you hit the desired breakpoint

If this works you can look into the project settings, how the project is set up and compare it wit your settings. Then you should find the error why your plugin is not debugging correctly. If you have found the error can you please post it here?

[EDIT:] I am not sure but probably you have to build codeblocks with debugging symbols enabled. You do this by Settings->Global Variables->cb_release_type and add "-g" in the "base" field. Then you have to rebuild Codeblocks by hitting Build->Rebuild
5
CodeCompletion redesign / Re: Clang CC
« Last post by oBFusCATed on Today at 09:14:00 am »
I've not said that. Just said that in some configurations they are broken (hint no locking is happening)!
6
my plugin is present in "c:/user/documents/Menuplugin"
my codeblocks svn code is present in "c:/xyz/codeblocks_svn_code"

To install the plugin, I open codeblocks.exe, go to plugin->manage plugins->Install New and direct it to MenuPlugin.cbplugin file
At backend it copies the MenuPlugin.dll file and put it incside codeblocks_svn_code under plugin section.

Plugin question:
So do I need to copy my complete source code and put it inside plugin section in codeblocks_svn_code?

Quote
you can open your plugin and the codeblocks project file at the same time in codeblocks.
I try to do the same and got error - failed
Debugger log:
Code: [Select]
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
default
Adding source dir: C:\Users\zbcqcm\Documents\Codeblocks_SVN\try_MenuPlugin_wxSmith_Combined\
Adding source dir: C:\Users\zbcqcm\Documents\Codeblocks_SVN\try_MenuPlugin_wxSmith_Combined\
Adding file: C:\zbcqcm\codeblocks_svn_code\code\src\devel\codeblocks.exe
Changing directory to: C:/Users/zbcqcm/Documents/Codeblocks_SVN/try_MenuPlugin_wxSmith_Combined/.
Set variable: PATH=.;C:\zbcqcm\codeblocks_svn_code\code\src\devel;C:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll;C:\MinGW\bin;C:\MinGW;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\doxygen\bin;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\SEGGER\JLink_V610l;C:\GNU_Tools_ARM_Embedded\6.2_2016q4\bin;C:\arm-none-eabi-gcc-4.8.2_nl-1.19.0_bu-2.23.2-mingw32-netx.0\arm-none-eabi-gcc-4.8.2\arm-none-eabi\bin;C:\arm-none-eabi-gcc-4.8.2_nl-1.19.0_bu-2.23.2-mingw32-netx.0\arm-none-eabi-gcc-4.8.2\bin;C:\gcc-arm-none-eabi-6_2-2016q4-20161216-win32\arm-none-eabi\bin;C:\gcc-arm-none-eabi-6_2-2016q4-20161216-win32\bin;C:\SysGCC\arm-elf\bin;C:\SysGCC\arm-eabi\bin;C:\Program Files (x86)\AXSEM\AXSDB\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\TDM-GCC-32\bin;C:\Program Files (x86)\WinRAR;C:\Program Files (x86)\GNU Tools ARM Embedded\6.2 2016q4\bin;C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\bin;\\ C\CB_20161120_rev10922_win32\zip300xn-x64\zip300xn-x64;\\ C\boost\boost-jam-3.1.18-1-ntx86\boost-jam-3.1.18-1-ntx86;C:\Program Files\Git\bin;C:\cygwin64\bin;C:\codeblocks zip\zip300xn-x64\zip300xn-x64
Starting debugger: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args C:/zbcqcm/codeblocks_svn_code/code/src/devel/codeblocks.exe
failed

One more question, something deviating from topic
- I build codeblocks sdk code and as a result 2 additional folders were formed namely "devel", "output". Each containing codeblock.exe. I need to ask, which codeblock.exe I should work on?

For running use the one in "output"; for debugging use the one in "devel".

You really NEED to learn how to build a contrib plugin for Code::Blocks; it will show you a lot!!
Before trying to build your own core CB plugin; you need to be able to build an contrib CB plugin.

Tim S.
7
my plugin is present in "c:/user/documents/Menuplugin"
my codeblocks svn code is present in "c:/xyz/codeblocks_svn_code"

To install the plugin, I open codeblocks.exe, go to plugin->manage plugins->Install New and direct it to MenuPlugin.cbplugin file
At backend it copies the MenuPlugin.dll file and put it incside codeblocks_svn_code under plugin section.

Plugin question:
So do I need to copy my complete source code and put it inside plugin section in codeblocks_svn_code?

Quote
you can open your plugin and the codeblocks project file at the same time in codeblocks.
I try to do the same and got error - failed
Debugger log:
Code: [Select]
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
default
Adding source dir: C:\Users\zbcqcm\Documents\Codeblocks_SVN\try_MenuPlugin_wxSmith_Combined\
Adding source dir: C:\Users\zbcqcm\Documents\Codeblocks_SVN\try_MenuPlugin_wxSmith_Combined\
Adding file: C:\zbcqcm\codeblocks_svn_code\code\src\devel\codeblocks.exe
Changing directory to: C:/Users/zbcqcm/Documents/Codeblocks_SVN/try_MenuPlugin_wxSmith_Combined/.
Set variable: PATH=.;C:\zbcqcm\codeblocks_svn_code\code\src\devel;C:\wxMSW-2.8.12\wxMSW-2.8.12\lib\gcc_dll;C:\MinGW\bin;C:\MinGW;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\doxygen\bin;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\SEGGER\JLink_V610l;C:\GNU_Tools_ARM_Embedded\6.2_2016q4\bin;C:\arm-none-eabi-gcc-4.8.2_nl-1.19.0_bu-2.23.2-mingw32-netx.0\arm-none-eabi-gcc-4.8.2\arm-none-eabi\bin;C:\arm-none-eabi-gcc-4.8.2_nl-1.19.0_bu-2.23.2-mingw32-netx.0\arm-none-eabi-gcc-4.8.2\bin;C:\gcc-arm-none-eabi-6_2-2016q4-20161216-win32\arm-none-eabi\bin;C:\gcc-arm-none-eabi-6_2-2016q4-20161216-win32\bin;C:\SysGCC\arm-elf\bin;C:\SysGCC\arm-eabi\bin;C:\Program Files (x86)\AXSEM\AXSDB\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\Git\cmd;C:\TDM-GCC-32\bin;C:\Program Files (x86)\WinRAR;C:\Program Files (x86)\GNU Tools ARM Embedded\6.2 2016q4\bin;C:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\bin;\\ C\CB_20161120_rev10922_win32\zip300xn-x64\zip300xn-x64;\\ C\boost\boost-jam-3.1.18-1-ntx86\boost-jam-3.1.18-1-ntx86;C:\Program Files\Git\bin;C:\cygwin64\bin;C:\codeblocks zip\zip300xn-x64\zip300xn-x64
Starting debugger: C:\Program Files (x86)\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname -quiet  -args C:/zbcqcm/codeblocks_svn_code/code/src/devel/codeblocks.exe
failed

One more question, something deviating from topic
- I build codeblocks sdk code and as a result 2 additional folders were formed namely "devel", "output". Each containing codeblock.exe. I need to ask, which codeblock.exe I should work on?
8
I am new to codeblocks. I want to create my own project through makefile. How can I do so, any help?

My main purpose is to create a plugin. I look through the codeblocks svn code and check the plugin section. There i found that none of the plugins have any project (.cbp) file but only makefile.am. So I doubt that In codeblocks people use to develop plugins through makefile rather than using the codeblocks plugin wizard available within codeblocks.
9
CodeCompletion redesign / Re: Clang CC
« Last post by ollydbg on Today at 02:33:30 am »
Another note: if you're using CC_LOCKER_TRACK_TT_MTX_LOCK I guess you'll have to fix its implementation ;)
We should totally remove those lockers.  :)
10
I am new here. After decades of quit programming, i'll try to learn again.
Wish you all errorless coding !


Sent from my iPhone using Tapatalk

That is impossible the best that is possible is easy to find errors instead of hard to find errors.

Tim S.
Pages: [1] 2 3 4 5 6 ... 10