Hi, I did some test on separating the debug information from the plugin dlls, and it works fine, with the help of LLM AI model, I create a Windows batch file named separate-debug-info.cmd file, it contents are below:
@echo off
REM Use the directory of this batch file as the target directory.
set "TARGET_DIR=%~dp0"
REM Process all EXE files in the target directory.
for %%F in ("%TARGET_DIR%\*.exe") do (
echo Processing %%F...
objcopy --only-keep-debug "%%F" "%%~dpnF.debug"
strip --strip-debug --strip-unneeded "%%F"
objcopy --add-gnu-debuglink="%%~dpnF.debug" "%%F"
)
REM Process all DLL files in the target directory.
for %%F in ("%TARGET_DIR%\*.dll") do (
echo Processing %%F...
objcopy --only-keep-debug "%%F" "%%~dpnF.debug"
strip --strip-debug --strip-unneeded "%%F"
objcopy --add-gnu-debuglink="%%~dpnF.debug" "%%F"
)
echo Done.
pause
Now, put this .cmd file in the folder: <root>\src\devel32_64\share\CodeBlocks\plugins
And suppose you have the command line tools installed, for me, I have msys2's mingw64, and those tools were already installed.
After running this cmd file, you get such contents:
# du -b --block-size=1K *
2056 abbreviations.debug
211 abbreviations.dll
4870 astyle.debug
547 astyle.dll
1097 autosave.debug
124 autosave.dll
1822 classwizard.debug
179 classwizard.dll
23896 codecompletion.debug
1619 codecompletion.dll
17193 compiler.debug
1092 compiler.dll
10200 debugger.debug
763 debugger.dll
2171 defaultmimehandler.debug
184 defaultmimehandler.dll
2931 OccurrencesHighlighting.debug
207 OccurrencesHighlighting.dll
1584 openfileslist.debug
133 openfileslist.dll
90669 org
5214 projectsimporter.debug
278 projectsimporter.dll
6434 scriptedwizard.debug
482 scriptedwizard.dll
1 separate-debug-info.cmd
4776 todo.debug
305 todo.dll
770 xpmanifest.debug
51 xpmanifest.dll
Note the fist column is the filesize in kilobyte unit.
When you run gdb on the debugee C::B, setting breakpoints on the dll source file still works, which means the separating of the debug information work.