Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Help / Debugger lldb.exe exits without running target executable
« Last post by MadDavid on Yesterday at 10:41:33 pm »
I'm trying to get LLVM CLANG working with Code::Blocks.

I've got basic compilation working, now I'm trying to get debugging working.

So I set up a test project called "TestConsoleDebugger", which has the following code
Quote
#include <iostream>
#include <cstdio>

int main()
{
    int iterations = 0;
    FILE* fp;

    while (iterations < 1000000)
    {
      iterations++;
    }

    fp = fopen("Debug.txt", "a+");
    fprintf(fp, "Iterations = %i\n", iterations);
    fflush(fp);
    fclose(fp);
    return 0;
}

and breakpoints on "iteration++;" and "fp = fopen("Debug.txt", "a+");

When I click the red "Debug / Continue" arrow, I get

Quote
Active debugger config: GDB/CDB debugger:LLVM 64
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: E:\Development\TestConsoleDebugger\
Adding source dir: E:\Development\TestConsoleDebugger\
Adding file: E:\Development\TestConsoleDebugger\bin\Debug\TestConsoleDebugger.exe
Changing directory to: E:/Development/TestConsoleDebugger/.
Set variable: PATH=.;E:\Compilers\LLVM\bin;E:\Compilers\LLVM;[bunch of irrelevant paths]E:\Compilers\CodeBlocks;\;E:\Compilers\TDM-GCC-64\bin;E:\Compilers\WinSDK\Windows Performance Toolkit;E:\Compilers\Python310\Scripts;E:\Compilers\Python310;E:\Compilers\CodeBlocks\MinGW\bin;E:\Compilers\VisualStudio\VC\Tools\MSVC\14.31.31103\bin\Hostx64\x64;E:\Compilers\Zip
Starting debugger: E:\Compilers\LLVM\bin\lldb.exe -G -lines -2 -y E:/Development/TestConsoleDebugger/; -srcpath E:/Development/TestConsoleDebugger/; E:/Development/TestConsoleDebugger/bin/Debug/TestConsoleDebugger.exe
done
Debugger finished with status 1
Selecting target:
Debug
Adding source dir: E:\Development\TestConsoleDebugger\
Adding source dir: E:\Development\TestConsoleDebugger\
Adding file: E:\Development\TestConsoleDebugger\bin\Debug\TestConsoleDebugger.exe
Changing directory to: E:/Development/TestConsoleDebugger/.
Set variable: PATH=.;E:\Compilers\LLVM\bin;E:\Compilers\LLVM;[bunch of irrelevant paths]E:\Compilers\CodeBlocks;\;E:\Compilers\TDM-GCC-64\bin;E:\Compilers\WinSDK\Windows Performance Toolkit;E:\Compilers\Python310\Scripts;E:\Compilers\Python310;E:\Compilers\CodeBlocks\MinGW\bin;E:\Compilers\VisualStudio\VC\Tools\MSVC\14.31.31103\bin\Hostx64\x64;E:\Compilers\Zip
Starting debugger: E:\Compilers\LLVM\bin\lldb.exe -G -lines -2 -y E:/Development/TestConsoleDebugger/; -srcpath E:/Development/TestConsoleDebugger/; E:/Development/TestConsoleDebugger/bin/Debug/TestConsoleDebugger.exe
done
Debugger finished with status 1

Code::Blocks does not stop at any breakpoints, the console does not appear, and notably, "Debug.txt" does not appear.  When I click the green "Run" arrow, in contrast, it pops up the console and "Debug.txt" appears in the project directory.

Is there any advice for how to get lldb to actually debug from Code::Blocks?  E.g., do I need to put anything in for "Debugger initialization commands" in the debugger setting?
2
At least for debugger_gdbmi_wx32_64.cbp and debugger_gdbmi_wx33_64.cbp, it might be better to pluralize the object_output reference as all other wx32_64.cbp and wx33_64.cbp files do.  For instance, change
Code
<Option object_output="../../../.obj33_64/plugins/contrib/debugger_gdbmi" />
to
Code
<Option object_output="../../../.objs33_64/plugins/contrib/debugger_gdbmi" />
in the file debugger_gdbmi_wx33_64.cbp

Done. Thanks.
3
Nightly builds / Re: The 27 July 2026 build (13924) is out.
« Last post by Xaviou on Yesterday at 05:30:59 pm »
Hi.

@Xaviou, I could not reproduce the compilation error in clangd_client when compiled against wxWidgets-3.2.11. May be due to difference in configurations. Missing header include is added in svn rev 13925, hope it will fix the issue.
It does : thank you. I've replaced the rev13924 archives by rev13925 ones for download

Could you please provide steps to reproduce error on building for Ubuntu-26.04 on launchpad? Is this something we can replicate locally?
I just use an updated old made script : here is its content:
Code: sh
#!/bin/sh
cd ~/codeblocks/sources

if [ "x$1" != "xcurrent" ]; then
  rm debian/changelog
  if [ "x$1" != "x" ]; then
    svn update --revision $1 .
  else
    svn update .
  fi;
fi;

if [ -f ./.last_revision ]; then
rm ./.last_revision
fi
../00_update_revision.sh 26.04.1

sed -i 's/UNRELEASED/resolute/' ./debian/changelog

echo 10 > debian/compat
echo Running Bootstrap...
./bootstrap

echo Running debian/setup_control.sh
./debian/setup_control.sh resolute

echo Running Debuild...
debuild -S -sa -d -us -uc
cd ..
The "00_update_revision.sh" script is just a copy of the one include in codeblocks sources witch changes the final name of the archives (line 59)
Code
dch -v 25.03+svn$REV~ubuntu$1 "New svn revision"

I then obtain the sources packages only : I then sign them and upload them to launchpad and the build starts automatically.

Regarding the 26.04 failure, Gemini says:

Quote
The reason it fails on Ubuntu 26.04 is that the Common Debian Build System (cdbs) package officially dropped and deleted the deprecated autotools.mk and makefile.mk files.
If you control the source code of the project or package, the best fix is to stop using cdbs with the old autotools.mk include. Instead, rewrite your debian/rules file to use modern, clean dh (Debhelper) syntax, which handles autotools automatically.

I'll try to have a look at this ASAP : thank you.

Regards
Xav'
4
Related to this, r13922 included the new debugger_gdbmi* projects in the ContribPlugin* workspaces, but not in the main ones.
5
Nightly builds / Re: The 27 July 2026 build (13924) is out.
« Last post by Miguel Gimenez on Yesterday at 12:46:46 pm »
Regarding the 26.04 failure, Gemini says:

Quote
The reason it fails on Ubuntu 26.04 is that the Common Debian Build System (cdbs) package officially dropped and deleted the deprecated autotools.mk and makefile.mk files.
If you control the source code of the project or package, the best fix is to stop using cdbs with the old autotools.mk include. Instead, rewrite your debian/rules file to use modern, clean dh (Debhelper) syntax, which handles autotools automatically.
6
Spam reported to moderator.
7
Nightly builds / Re: The 27 July 2026 build (13924) is out.
« Last post by christo on Yesterday at 05:01:55 am »
@Xaviou, I could not reproduce the compilation error in clangd_client when compiled against wxWidgets-3.2.11. May be due to difference in configurations. Missing header include is added in svn rev 13925, hope it will fix the issue.

Could you please provide steps to reproduce error on building for Ubuntu-26.04 on launchpad? Is this something we can replicate locally?
8
Thanks for sharing! I also encountered the exact same error on macOS Sequoia, and after opening Code::Blocks in Safe Mode and uninstalling the Code Completion plugin, it worked immediately. Basketball Stars
9
Nightly builds / Re: The 27 July 2026 build (13924) is out.
« Last post by Xaviou on July 27, 2026, 06:19:49 pm »
Hi.

32 bits version for Windows (and also 64 bits version) can be downloaded from my website.
I made both a wxWidgets-3.2.11 and wxWidgets-3.3.3 linked versions

Debian Trixie (64 bits) and Bookworm (32 and 64 bits) can be installed from my repo
The corresponding unsigned deb files can also be downloaded from the website page linked above.

Ubuntu-22.04 and 24.04 versions can be installed from my ppa (they are available for both amd64 and arm64 architectures).

There was a problem building for Ubuntu-26.04 on launchpad:
Quote from: Build log
Code
Command: dpkg-buildpackage --sanitize-env -us -uc -mLaunchpad Build Daemon <buildd@lcy02-amd64-022.buildd> -b -rfakeroot
dpkg-buildpackage: info: source package codeblocks
dpkg-buildpackage: info: source version 25.03+svn13924~ubuntu26.04.1
dpkg-buildpackage: info: source distribution resolute
 dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
 debian/rules clean
debian/rules:2: /usr/share/cdbs/1/class/autotools.mk: No such file or directory
make: *** No rule to make target '/usr/share/cdbs/1/class/autotools.mk'.  Stop.
dpkg-buildpackage: error: debian/rules clean subprocess failed with exit status 2
Full log Here

There was also a problem on Windows with the Clangd_Client plugin (linked with wxWidgets-3.2.11 only)
Quote
Code
...\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp: In member function 'void Parser::OnLSP_WorkspaceApplyEdit(wxCommandEvent&)':
...\src\plugins\contrib\clangd_client\src\codecompletion\parser\parser.cpp:3642:23: error: aggregate 'std::stringstream message' has incomplete type and cannot be defined
 3642 |     std::stringstream message;
      |                       ^~~~~~~
The compiler used is Gcc-16.1.0 from MSys2.
This error did not appeared while building for wxWidget-3.3.3

Regards
Xav'
10
Nightly builds / The 27 July 2026 build (13924) is out.
« Last post by killerbot on July 27, 2026, 05:28:10 pm »
We switched to gcc 15.2.0 (on 09 April 2026) --> download the new wx/mingw dll's see link below

Get the compiler we use here : https://github.com/brechtsanders/winlibs_mingw/releases/download/15.2.0posix-14.0.0-ucrt-r7/winlibs-x86_64-posix-seh-gcc-15.2.0-mingw-w64ucrt-14.0.0-r7.7z

Get quick announcements through the RSS feed http://www.codeblocks.org/nightly/CodeBlock_RSS.xml

Before you use a nightly make sure you understand how it works.

A link to the unicode windows wxWidget dll(s) for Code::Blocks : https://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/Prerequisites/wxmsw33u_gcc_cb_wx333_2D_gcc1520-mingw64.7z
A link to Mingw64 dll's needed by Code::Blocks : http://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/Prerequisites/Mingw64dlls15.2.0.7z


The 27 July 2026 build is out.
  - Windows :
   http://sourceforge.net/projects/codeblocks/files/Binaries/Nightlies/2026/CB_20260727_rev13924_win64.7z
  - Linux :
   none

The current SDK version is : 2.25.0

Resolved Fixed:

  • main.cpp: Fix Linux app close (AUI) crashes (thanks Gemini)

Regressions/Confirmed/Annoying/Common bugs:


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