Recent Posts

Pages: 1 [2] 3 4 5 6 7 ... 10
11
Help / Re: debugger_gdbmi
« Last post by Frank_CB on May 04, 2026, 03:37:26 am »
This attachment shows source code for C::B svn 14840 from SF.
12
Help / Re: debugger_gdbmi
« Last post by Frank_CB on May 04, 2026, 03:16:55 am »
Thanks for the detailed response. I'll give it a try tomorrow. I was under the impression that debugger_gdbmi needed to be built from a compiled version of C::B
13
Help / Re: debugger_gdbmi
« Last post by Pecan on May 04, 2026, 12:56:53 am »
Tree results in attachment
Whatever that is, it is not the source for codeblocks.
What you showed me is the binary output after compiling codeblocks. It does not contain the CodeBlocks source files.

If you want to compile a plugin, you need to compile it agains the CodeBlocks source code.
You can download the source from https://sourceforge.net/p/codeblocks/code/HEAD/tree/

Look at the upper right to see a button titled "Download Snapshot".
Click that button and it will generate the source code into a zip file. It'll take about two minutes.

Unzip that file into a new folder  named CBdevel.
Copy the downloaded .zip file into CBdevel folder.
Unzip the download .zip file. It'll create a directory named: codeblocks-code-r13840-trunk .
Rename that directory to "trunk" so you won't have to type long folder names.

Start your codeblocks, the one you usually use.
Open the .cbp from "CBdevel\trunk\src\CodeBlocks_wx33_64.cbp"
Click on MainMenu->Build->Rebuild Workspace and wait until it finishes building CodeBlocks.

When it finishes, close down CodeBlocks and open a console (cmd.exe).
In the console type "cd CBdevel\trunk\src\ ".
In the console type "update33_64" . That bat file will copy the .exe and .dll(s) to CBdevel\trunk\src\output33_64 .

Type into the console:
Code
    cd output33_64
    codeblocks.exe /d /p CBdevel

The newly build CodeBlocks should load and run.

From the CodeBlocks top menu, File/Open the following workspace:
"CBdevel\trunk\src\ContribPlugins_wx33_64.workspace". It may take about 5-10 seconds to load.

Once loaded, it will ask you where your wxWidgets 3.3 source resides. Use the three dots to navigate and select the folder containing wxWidgets source code. Click on save.

It will ask for a cb_release type. Enter "-g" into the slot named base  (without the quotes). Click save.
It will ask you for a cb_cpp_std. For me, I enter "-std=c++11" . I think you're using  "-std=c++23". Click save.

For each project in the workspace that you want to use, right click on the project name and select "Rebuild". I choose the following: BrowseTracker, CodeSnippets, DragScroll, KeyBinder, Clangd_client, and SmartIndent.

After all the plugin projects of your choosing have been Rebuilt, close down CodeBlocks.
In the console type "cd CBDevel\trunk\src" . And then "Update33_64.bat" so that CB copies the chosen (now binary plugins) into the correct folders.

Now "cd output33_64" in the console and restart CodeBlocks with "codeblocks.exe /d /p CBdevel" .

Now we're ready to install and compile debugger_gdbmi plugin with your new CodeBlocks.

Make a fresh copy of the debugger_gdbmi plugin frrom https://github.com/pecanh/debugger_gdbmi/releases/tag/%22Nightly_Releases%22 . Click on "Source code (zip)" near the bottom of the page.

In the console, "cd CBdevel\trunk\src\plugins\contribs " and make a new folder named "debugger_gdbmi".

Copy the downloaded zip file (debugger_gdbmi--Nightly_Releases.zip) into the newly create debugger_gdbmi folder. Unzip the .zip file which will have a name like "debugger_gdbmi--Nightly_Releases" with the source in a folder named "src". copy the src directory and all it contents so that the layout of the debugger_gdbmi folder looks like"this:
Code
|───CBdevel
|   |---trunk
|       |---src
|           |---plugins
|               |---contribs                  <-a lot of projects here
|                   |---debugger_gdbmi <-the new folder you create
|                       |───InstallDebuggerMI
|                       |--- .cbp build files
|                       |--- src                <-This folder must be a child of the debugger_gdbmi folder.
|                           |---resources
|                           | ---source files (cpp,h,etc)  <- the actual source files must be in the "src" folder.


Start CodeBlocks if it's not already running.
Check that Setting/compiler/ToolChainExecutables use the same compiler that built CodeBlocks.

With CodeBlocks running, from the main menu File/Open file named:

CBdevel\trunk\src\plugins\contribs\debugger_gdbmi\debugger_gdbmi_wx33_64.cbp
and  Build/rebuild.

Close CodeBlocks.
When the build is successful, go back to the console and from CBdevel\trunk\src run update33_64.bat debugger_gdbmi should now show in plugins when CodeBlocks is restarted.

To run clangd_client you will have to disable the CodeCompletion plugin, enable clangd_client and update its settings.

 
14
Help / Re: debugger_gdbmi
« Last post by Frank_CB on May 03, 2026, 10:02:55 pm »
Tree results in attachment
15
Help / Re: debugger_gdbmi
« Last post by Pecan on May 03, 2026, 09:33:13 pm »
Setting cb_plugin to '.' (without quotes) also fails. Codeblocks issues a warning about not being able to locate the variable. Build log follows:

Code
-------------- Build: default in debugger_gdbmi wx3.3.x (64 bit) (compiler: GNU GCC Compiler)---------------

g++.exe -Wextra -Wall -m64 -g -g -pipe -mthreads -fmessage-length=0 -fexceptions -std=gnu++23 -DHAVE_W32API_H -DBUILDING_PLUGIN -D__WXMSW__ -DWXUSINGDLL -DNOPCH -DwxUSE_UNICODE -D_WIN64 -DCC_NO_COLLAPSE_ITEM -DcbDEBUG -DDOLOGSNIP -g -std=gnu++23 -Ic:\CB13840\..\include -Ic:\CB13840\..\include\tinyxml -Ic:\CB13840\..\sdk\wxscintilla\include -Isrc -IC:\wxWidgets-3.3.2\include -IC:\wxWidgets-3.3.2\lib\gcc_dll\mswu -c C:\Temp\newdir\debugger_gdbmi\src\actions.cpp -o c:\CB13840\..\.obj33_64\plugins\contrib\debugger_gdbmi\src\actions.o
g++.exe -Wextra -Wall -m64 -g -g -pipe -mthreads -fmessage-length=0 -fexceptions -std=gnu++23 -DHAVE_W32API_H -DBUILDING_PLUGIN -D__WXMSW__ -DWXUSINGDLL -DNOPCH -DwxUSE_UNICODE -D_WIN64 -DCC_NO_COLLAPSE_ITEM -DcbDEBUG -DDOLOGSNIP -g -std=gnu++23 -Ic:\CB13840\..\include -Ic:\CB13840\..\include\tinyxml -Ic:\CB13840\..\sdk\wxscintilla\include -Isrc -IC:\wxWidgets-3.3.2\include -IC:\wxWidgets-3.3.2\lib\gcc_dll\mswu -c C:\Temp\newdir\debugger_gdbmi\src\cJSON.cpp -o c:\CB13840\..\.obj33_64\plugins\contrib\debugger_gdbmi\src\cJSON.o
g++.exe -Wextra -Wall -m64 -g -g -pipe -mthreads -fmessage-length=0 -fexceptions -std=gnu++23 -DHAVE_W32API_H -DBUILDING_PLUGIN -D__WXMSW__ -DWXUSINGDLL -DNOPCH -DwxUSE_UNICODE -D_WIN64 -DCC_NO_COLLAPSE_ITEM -DcbDEBUG -DDOLOGSNIP -g -std=gnu++23 -Ic:\CB13840\..\include -Ic:\CB13840\..\include\tinyxml -Ic:\CB13840\..\sdk\wxscintilla\include -Isrc -IC:\wxWidgets-3.3.2\include -IC:\wxWidgets-3.3.2\lib\gcc_dll\mswu -c C:\Temp\newdir\debugger_gdbmi\src\cmd_queue.cpp -o c:\CB13840\..\.obj33_64\plugins\contrib\debugger_gdbmi\src\cmd_queue.o
g++.exe -Wextra -Wall -m64 -g -g -pipe -mthreads -fmessage-length=0 -fexceptions -std=gnu++23 -DHAVE_W32API_H -DBUILDING_PLUGIN -D__WXMSW__ -DWXUSINGDLL -DNOPCH -DwxUSE_UNICODE -D_WIN64 -DCC_NO_COLLAPSE_ITEM -DcbDEBUG -DDOLOGSNIP -g -std=gnu++23 -Ic:\CB13840\..\include -Ic:\CB13840\..\include\tinyxml -Ic:\CB13840\..\sdk\wxscintilla\include -Isrc -IC:\wxWidgets-3.3.2\include -IC:\wxWidgets-3.3.2\lib\gcc_dll\mswu -c C:\Temp\newdir\debugger_gdbmi\src\cmd_result_parser.cpp -o c:\CB13840\..\.obj33_64\plugins\contrib\debugger_gdbmi\src\cmd_result_parser.o
In file included from C:\Temp\newdir\debugger_gdbmi\src\cmd_queue.cpp:1:
C:\Temp\newdir\debugger_gdbmi\src\cmd_queue.h:11:10: fatal error: globals.h: No such file or directory
   11 | #include "globals.h"
      |          ^~~~~~~~~~~
compilation terminated.
Process terminated with status 1 (0 minute(s), 6 second(s))
 
In file included from C:\Temp\newdir\debugger_gdbmi\src\actions.h:6,
                 from C:\Temp\newdir\debugger_gdbmi\src\actions.cpp:1:
C:\Temp\newdir\debugger_gdbmi\src\cmd_queue.h:11:10: fatal error: globals.h: No such file or directory
   11 | #include "globals.h"
      |          ^~~~~~~~~~~
compilation terminated.
Process terminated with status 1 (0 minute(s), 7 second(s))
 
Process terminated with status 0 (0 minute(s), 12 second(s))
2 error(s), 0 warning(s) (0 minute(s), 12 second(s))
 
The problem is not the cb_plugin variable.
The problem is that the .cbp is are not correctly pointing to the CodeBlocks source in your project .cbp.

Do the following:
In a console (cmd.exe) issue the following commands:
Code
cd  c:\CB13840
tree

copy and paste the results here.

16
Help / Re: debugger_gdbmi
« Last post by Frank_CB on May 03, 2026, 08:42:30 pm »
Setting cb_plugin to '.' (without quotes) also fails. Codeblocks issues a warning about not being able to locate the variable. Build log follows:

Code
-------------- Build: default in debugger_gdbmi wx3.3.x (64 bit) (compiler: GNU GCC Compiler)---------------

g++.exe -Wextra -Wall -m64 -g -g -pipe -mthreads -fmessage-length=0 -fexceptions -std=gnu++23 -DHAVE_W32API_H -DBUILDING_PLUGIN -D__WXMSW__ -DWXUSINGDLL -DNOPCH -DwxUSE_UNICODE -D_WIN64 -DCC_NO_COLLAPSE_ITEM -DcbDEBUG -DDOLOGSNIP -g -std=gnu++23 -Ic:\CB13840\..\include -Ic:\CB13840\..\include\tinyxml -Ic:\CB13840\..\sdk\wxscintilla\include -Isrc -IC:\wxWidgets-3.3.2\include -IC:\wxWidgets-3.3.2\lib\gcc_dll\mswu -c C:\Temp\newdir\debugger_gdbmi\src\actions.cpp -o c:\CB13840\..\.obj33_64\plugins\contrib\debugger_gdbmi\src\actions.o
g++.exe -Wextra -Wall -m64 -g -g -pipe -mthreads -fmessage-length=0 -fexceptions -std=gnu++23 -DHAVE_W32API_H -DBUILDING_PLUGIN -D__WXMSW__ -DWXUSINGDLL -DNOPCH -DwxUSE_UNICODE -D_WIN64 -DCC_NO_COLLAPSE_ITEM -DcbDEBUG -DDOLOGSNIP -g -std=gnu++23 -Ic:\CB13840\..\include -Ic:\CB13840\..\include\tinyxml -Ic:\CB13840\..\sdk\wxscintilla\include -Isrc -IC:\wxWidgets-3.3.2\include -IC:\wxWidgets-3.3.2\lib\gcc_dll\mswu -c C:\Temp\newdir\debugger_gdbmi\src\cJSON.cpp -o c:\CB13840\..\.obj33_64\plugins\contrib\debugger_gdbmi\src\cJSON.o
g++.exe -Wextra -Wall -m64 -g -g -pipe -mthreads -fmessage-length=0 -fexceptions -std=gnu++23 -DHAVE_W32API_H -DBUILDING_PLUGIN -D__WXMSW__ -DWXUSINGDLL -DNOPCH -DwxUSE_UNICODE -D_WIN64 -DCC_NO_COLLAPSE_ITEM -DcbDEBUG -DDOLOGSNIP -g -std=gnu++23 -Ic:\CB13840\..\include -Ic:\CB13840\..\include\tinyxml -Ic:\CB13840\..\sdk\wxscintilla\include -Isrc -IC:\wxWidgets-3.3.2\include -IC:\wxWidgets-3.3.2\lib\gcc_dll\mswu -c C:\Temp\newdir\debugger_gdbmi\src\cmd_queue.cpp -o c:\CB13840\..\.obj33_64\plugins\contrib\debugger_gdbmi\src\cmd_queue.o
g++.exe -Wextra -Wall -m64 -g -g -pipe -mthreads -fmessage-length=0 -fexceptions -std=gnu++23 -DHAVE_W32API_H -DBUILDING_PLUGIN -D__WXMSW__ -DWXUSINGDLL -DNOPCH -DwxUSE_UNICODE -D_WIN64 -DCC_NO_COLLAPSE_ITEM -DcbDEBUG -DDOLOGSNIP -g -std=gnu++23 -Ic:\CB13840\..\include -Ic:\CB13840\..\include\tinyxml -Ic:\CB13840\..\sdk\wxscintilla\include -Isrc -IC:\wxWidgets-3.3.2\include -IC:\wxWidgets-3.3.2\lib\gcc_dll\mswu -c C:\Temp\newdir\debugger_gdbmi\src\cmd_result_parser.cpp -o c:\CB13840\..\.obj33_64\plugins\contrib\debugger_gdbmi\src\cmd_result_parser.o
In file included from C:\Temp\newdir\debugger_gdbmi\src\cmd_queue.cpp:1:
C:\Temp\newdir\debugger_gdbmi\src\cmd_queue.h:11:10: fatal error: globals.h: No such file or directory
   11 | #include "globals.h"
      |          ^~~~~~~~~~~
compilation terminated.
Process terminated with status 1 (0 minute(s), 6 second(s))
 
In file included from C:\Temp\newdir\debugger_gdbmi\src\actions.h:6,
                 from C:\Temp\newdir\debugger_gdbmi\src\actions.cpp:1:
C:\Temp\newdir\debugger_gdbmi\src\cmd_queue.h:11:10: fatal error: globals.h: No such file or directory
   11 | #include "globals.h"
      |          ^~~~~~~~~~~
compilation terminated.
Process terminated with status 1 (0 minute(s), 7 second(s))
 
Process terminated with status 0 (0 minute(s), 12 second(s))
2 error(s), 0 warning(s) (0 minute(s), 12 second(s))
 
17
Help / Re: debugger_gdbmi
« Last post by Frank_CB on May 03, 2026, 08:07:23 pm »
debugger_gdbmi_wx33_64.cbp
18
Help / Re: debugger_gdbmi
« Last post by Pecan on May 03, 2026, 07:52:51 pm »
@Pecan:
What value would you assign to cb_plugin ?

CodeBlocks should not be asking you for that variable. It's left over from when AndrewCott used to create a .plugin file.

If it's asking you for a value, just give it a '.' (period without the quotes).

Tell me which .cbp file you're using to build the project so I can correct this.
19
Plugins development / Re: Debugger_gdbmi plugin
« Last post by Pecan on May 03, 2026, 06:57:38 pm »
Code
[debug]ActionsMap::Run -> starting action: 0000000011aa5f50 id: 21
[debug]cmd==>210000000000-var-update 1 *
[debug]output==>210000000000^done,changelist=[{name="var5",value="std::vector of length 5, capacity 5",in_scope="true",type_changed="false",new_num_children="5",displayhint="array",dynamic="1",has_more="0"}]
[debug]cmd==>210000000001-var-list-children 2 "var5"
[debug]unparsable_output==>(gdb)
[debug]output==>210000000001^done,numchild="5",displayhint="array",children=[child={name="var5.[0]",exp="[0]",numchild="0",value="1",type="int"},child={name="var5.[1]",exp="[1]",numchild="0",value="2",type="int"},child={name="var5.[2]",exp="[2]",numchild="0",value="3",type="int"},child={name="var5.[3]",exp="[3]",numchild="0",value="4",type="int"},child={name="var5.[4]",exp="[4]",numchild="0",value="5",type="int"}],has_more="0"
[debug]unparsable_output==>(gdb)


question:

Is the "unparsable_output" correct? See the above log.

Yes. It's ok. It's left over from code inherited from the original CodeBlocks debugger plugin.
I seem to remember that I tried to eliminate it, but removing it just caused a whole bunch of problems.

The original debugger code set that line as the prompt to be sent back from from gdb.
On some commands to gdb, there is original plugin code that waits for multiple responses to be returned to CodeBlocks; debugger plugin goes idle before sending any more commands. The idle condition is keyed to that prompt to indicate the end of any more responses and clears the idle condition.

Since the original debugger code and prompt mechanism worked with debugger_gdbmi (and caused problems without it), I got lazy and just left it for now.

I'll put this in the "revisit latter" ToDo queue. I'd also like to eliminate it if I can.

20
Plugins development / Re: Debugger_gdbmi plugin
« Last post by ollydbg on May 03, 2026, 05:09:52 pm »
Code
[debug]ActionsMap::Run -> starting action: 0000000011aa5f50 id: 21
[debug]cmd==>210000000000-var-update 1 *
[debug]output==>210000000000^done,changelist=[{name="var5",value="std::vector of length 5, capacity 5",in_scope="true",type_changed="false",new_num_children="5",displayhint="array",dynamic="1",has_more="0"}]
[debug]cmd==>210000000001-var-list-children 2 "var5"
[debug]unparsable_output==>(gdb)
[debug]output==>210000000001^done,numchild="5",displayhint="array",children=[child={name="var5.[0]",exp="[0]",numchild="0",value="1",type="int"},child={name="var5.[1]",exp="[1]",numchild="0",value="2",type="int"},child={name="var5.[2]",exp="[2]",numchild="0",value="3",type="int"},child={name="var5.[3]",exp="[3]",numchild="0",value="4",type="int"},child={name="var5.[4]",exp="[4]",numchild="0",value="5",type="int"}],has_more="0"
[debug]unparsable_output==>(gdb)


question:

Is the "unparsable_output" correct? See the above log.
Pages: 1 [2] 3 4 5 6 7 ... 10