diff -Nru codeblocks-20.03svn12487~ubuntu16.04/codeblocks.plist codeblocks-20.03svn12516~ubuntu16.04/codeblocks.plist
--- codeblocks-20.03svn12487~ubuntu16.04/codeblocks.plist 2021-07-09 23:19:29.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/codeblocks.plist 2021-08-28 20:59:29.000000000 +0000
@@ -25,7 +25,7 @@
CFBundleGetInfoString
CodeBlocks version 20.03, (c) 2004-2020 Code::Blocks
CFBundleLongVersionString
- CodeBlocks version 20.03 SVN revision 12487, (c) 2004-2020 Code::Blocks
+ CodeBlocks version 20.03 SVN revision 12516, (c) 2004-2020 Code::Blocks
NSHumanReadableCopyright
Copyright 2004-2020, The Code::Blocks Team
CFBundleIdentifier
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/codeblocks.spec codeblocks-20.03svn12516~ubuntu16.04/codeblocks.spec
--- codeblocks-20.03svn12487~ubuntu16.04/codeblocks.spec 2021-07-09 23:19:29.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/codeblocks.spec 2021-08-28 20:59:29.000000000 +0000
@@ -1,4 +1,4 @@
-%define _svnrev 12487
+%define _svnrev 12516
%define req_wxgtk 2.8.0
%define _redhat %(if [ -f /etc/redhat-release ]; then echo 1; else echo 0; fi)
%define _mandrake %(if [ -f /etc/mandrake-release ]; then echo 1; else echo 0; fi)
@@ -61,7 +61,7 @@
Group: Development/Tools
License: GPLv3+
URL: http://www.codeblocks.org/
-Source: %{name}-20.03svn12487.tar.bz2
+Source: %{name}-20.03svn12516.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Requires: %{name}-libs%{?_isa} = %{version}
Requires: xterm
@@ -221,7 +221,7 @@
%prep
-%setup -q -n codeblocks-20.03svn12487
+%setup -q -n codeblocks-20.03svn12516
%{?suse_update_libdir:%{suse_update_libdir}}
%{?suse_update_config:%{suse_update_config -f}}
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/codeblocks.spec.fedora codeblocks-20.03svn12516~ubuntu16.04/codeblocks.spec.fedora
--- codeblocks-20.03svn12487~ubuntu16.04/codeblocks.spec.fedora 2021-07-09 23:19:29.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/codeblocks.spec.fedora 2021-08-28 20:59:29.000000000 +0000
@@ -1,4 +1,4 @@
-%global svnrev 12487
+%global svnrev 12516
Name: codeblocks
Version: 20.03.svn.%{svnrev}
@@ -6,7 +6,7 @@
Summary: An open source, cross platform, free C++ IDE
License: GPLv3+
URL: http://www.codeblocks.org/
-Source0: %{name}-20.03svn12487.tar.bz2
+Source0: %{name}-20.03svn12516.tar.bz2
BuildRequires: libtool
BuildRequires: wxGTK-devel
@@ -90,7 +90,7 @@
%prep
-%setup -q -n %{name}-20.03svn12487
+%setup -q -n %{name}-20.03svn12516
./bootstrap
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/configure codeblocks-20.03svn12516~ubuntu16.04/configure
--- codeblocks-20.03svn12487~ubuntu16.04/configure 2021-07-09 23:19:29.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/configure 2021-08-28 20:59:29.000000000 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for codeblocks 20.03svn12487.
+# Generated by GNU Autoconf 2.69 for codeblocks 20.03svn12516.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@
# Identity of this package.
PACKAGE_NAME='codeblocks'
PACKAGE_TARNAME='codeblocks'
-PACKAGE_VERSION='20.03svn12487'
-PACKAGE_STRING='codeblocks 20.03svn12487'
+PACKAGE_VERSION='20.03svn12516'
+PACKAGE_STRING='codeblocks 20.03svn12516'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1636,7 +1636,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures codeblocks 20.03svn12487 to adapt to many kinds of systems.
+\`configure' configures codeblocks 20.03svn12516 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1712,7 +1712,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of codeblocks 20.03svn12487:";;
+ short | recursive ) echo "Configuration of codeblocks 20.03svn12516:";;
esac
cat <<\_ACEOF
@@ -1917,7 +1917,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-codeblocks configure 20.03svn12487
+codeblocks configure 20.03svn12516
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2457,7 +2457,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by codeblocks $as_me 20.03svn12487, which was
+It was created by codeblocks $as_me 20.03svn12516, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3656,7 +3656,7 @@
# Define the identity of the package.
PACKAGE='codeblocks'
- VERSION='20.03svn12487'
+ VERSION='20.03svn12516'
cat >>confdefs.h <<_ACEOF
@@ -24853,11 +24853,11 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: Configuring Code::Blocks..." >&5
$as_echo "$as_me: Configuring Code::Blocks..." >&6;}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: SVN revision 20.03svn12487 (2021-07-07 17:47:29)" >&5
-$as_echo "$as_me: SVN revision 20.03svn12487 (2021-07-07 17:47:29)" >&6;}
-REVISION=12487
+{ $as_echo "$as_me:${as_lineno-$LINENO}: SVN revision 20.03svn12516 (2021-08-15 16:35:46)" >&5
+$as_echo "$as_me: SVN revision 20.03svn12516 (2021-08-15 16:35:46)" >&6;}
+REVISION=12516
-DATE="2021-07-07 17:47:29"
+DATE="2021-08-15 16:35:46"
if test "x${target_vendor}" = "xapple"; then
@@ -26160,7 +26160,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by codeblocks $as_me 20.03svn12487, which was
+This file was extended by codeblocks $as_me 20.03svn12516, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -26226,7 +26226,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-codeblocks config.status 20.03svn12487
+codeblocks config.status 20.03svn12516
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/debian/changelog codeblocks-20.03svn12516~ubuntu16.04/debian/changelog
--- codeblocks-20.03svn12487~ubuntu16.04/debian/changelog 2021-07-09 23:19:29.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/debian/changelog 2021-08-28 20:59:29.000000000 +0000
@@ -1,8 +1,8 @@
-codeblocks (20.03svn12487~ubuntu16.04) xenial; urgency=medium
+codeblocks (20.03svn12516~ubuntu16.04) xenial; urgency=medium
* New svn revision
- -- Teodor Petrov Sat, 10 Jul 2021 02:19:29 +0300
+ -- Teodor Petrov Sat, 28 Aug 2021 23:59:29 +0300
codeblocks (20.03svn12027) unstable; urgency=medium
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/debian/changelog.original codeblocks-20.03svn12516~ubuntu16.04/debian/changelog.original
--- codeblocks-20.03svn12487~ubuntu16.04/debian/changelog.original 2021-07-09 23:19:29.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/debian/changelog.original 2021-08-28 20:59:29.000000000 +0000
@@ -1,8 +1,8 @@
-codeblocks (20.03svn12487) UNRELEASED; urgency=medium
+codeblocks (20.03svn12516) UNRELEASED; urgency=medium
* New svn revision
- -- Teodor Petrov Sat, 10 Jul 2021 02:19:29 +0300
+ -- Teodor Petrov Sat, 28 Aug 2021 23:59:29 +0300
codeblocks (20.03svn12027) unstable; urgency=medium
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/revision.m4 codeblocks-20.03svn12516~ubuntu16.04/revision.m4
--- codeblocks-20.03svn12487~ubuntu16.04/revision.m4 2021-07-09 23:19:29.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/revision.m4 2021-08-28 20:59:29.000000000 +0000
@@ -1,3 +1,3 @@
-m4_define([SVN_REV], 12487)
-m4_define([SVN_REVISION], 20.03svn12487)
-m4_define([SVN_DATE], 2021-07-07 17:47:29)
+m4_define([SVN_REV], 12516)
+m4_define([SVN_REVISION], 20.03svn12516)
+m4_define([SVN_DATE], 2021-08-15 16:35:46)
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/CodeBlocks_wx30-unix.cbp codeblocks-20.03svn12516~ubuntu16.04/src/CodeBlocks_wx30-unix.cbp
--- codeblocks-20.03svn12487~ubuntu16.04/src/CodeBlocks_wx30-unix.cbp 2021-05-12 18:03:26.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/CodeBlocks_wx30-unix.cbp 2021-08-28 20:59:15.000000000 +0000
@@ -567,6 +567,9 @@
+
+
+
@@ -2121,6 +2124,9 @@
+
+
+
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/CodeBlocks_wx31_64.cbp codeblocks-20.03svn12516~ubuntu16.04/src/CodeBlocks_wx31_64.cbp
--- codeblocks-20.03svn12487~ubuntu16.04/src/CodeBlocks_wx31_64.cbp 2021-05-12 18:03:25.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/CodeBlocks_wx31_64.cbp 2021-08-28 20:59:15.000000000 +0000
@@ -779,6 +779,9 @@
+
+
+
@@ -2331,6 +2334,9 @@
+
+
+
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/CodeBlocks_wx31.cbp codeblocks-20.03svn12516~ubuntu16.04/src/CodeBlocks_wx31.cbp
--- codeblocks-20.03svn12487~ubuntu16.04/src/CodeBlocks_wx31.cbp 2021-05-12 18:03:25.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/CodeBlocks_wx31.cbp 2021-08-28 20:59:15.000000000 +0000
@@ -778,6 +778,9 @@
+
+
+
@@ -2332,6 +2335,9 @@
+
+
+
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/include/autorevision.h codeblocks-20.03svn12516~ubuntu16.04/src/include/autorevision.h
--- codeblocks-20.03svn12487~ubuntu16.04/src/include/autorevision.h 2021-07-09 23:19:29.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/include/autorevision.h 2021-08-28 20:59:29.000000000 +0000
@@ -1,4 +1,4 @@
-/*12487*/
+/*12516*/
//don't include this header, only configmanager-revision.cpp should do this.
#ifndef AUTOREVISION_H
#define AUTOREVISION_H
@@ -8,9 +8,9 @@
namespace autorevision
{
- const unsigned int svn_revision = 12487;
- const wxString svnRevision(_T("12487"));
- const wxString svnDate(_T("2021-07-07 17:47:29"));
+ const unsigned int svn_revision = 12516;
+ const wxString svnRevision(_T("12516"));
+ const wxString svnDate(_T("2021-08-15 16:35:46"));
}
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/include/cbplugin.h codeblocks-20.03svn12516~ubuntu16.04/src/include/cbplugin.h
--- codeblocks-20.03svn12487~ubuntu16.04/src/include/cbplugin.h 2021-07-04 10:20:31.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/include/cbplugin.h 2021-08-28 20:59:15.000000000 +0000
@@ -37,7 +37,7 @@
// this is the plugins SDK version number
// it will change when the SDK interface breaks
#define PLUGIN_SDK_VERSION_MAJOR 2
-#define PLUGIN_SDK_VERSION_MINOR 11
+#define PLUGIN_SDK_VERSION_MINOR 14
#define PLUGIN_SDK_VERSION_RELEASE 0
// class decls
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/include/cygwin.h codeblocks-20.03svn12516~ubuntu16.04/src/include/cygwin.h
--- codeblocks-20.03svn12487~ubuntu16.04/src/include/cygwin.h 1970-01-01 00:00:00.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/include/cygwin.h 2021-08-28 20:59:15.000000000 +0000
@@ -0,0 +1,15 @@
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
+ * http://www.gnu.org/licenses/lgpl-3.0.html
+ */
+#ifndef CODEBLOCKS_SDK_CYGWIN_H
+#define CODEBLOCKS_SDK_CYGWIN_H
+
+#include "settings.h"
+
+extern DLLIMPORT bool cbIsDetectedCygwinCompiler(void);
+extern DLLIMPORT wxString cbGetCygwinCompilerPathRoot(void);
+extern DLLIMPORT void cbGetWindowsPathFromCygwinPath(wxString& path);
+extern DLLIMPORT void cbGetCygwinPathFromWindowsPath(wxString& path);
+
+#endif // CODEBLOCKS_SDK_CYGWIN_H
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/include/macrosmanager.h codeblocks-20.03svn12516~ubuntu16.04/src/include/macrosmanager.h
--- codeblocks-20.03svn12487~ubuntu16.04/src/include/macrosmanager.h 2021-05-12 18:03:25.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/include/macrosmanager.h 2021-08-28 20:59:15.000000000 +0000
@@ -71,12 +71,13 @@
wxRegEx m_RE_To83Path;
wxRegEx m_RE_RemoveQuotes;
UserVariableManager *m_UserVarMan;
-
+ bool m_Valid;
private:
MacrosManager();
~MacrosManager() override;
wxString EvalCondition(const wxString& cond, const wxString& true_clause, const wxString& false_clause, const ProjectBuildTarget* target);
int MatchBrace(const wxString& buffer, int index);
+ bool CompileRegexes();
};
#endif // MACROSMANAGER_H
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/include/Makefile.am codeblocks-20.03svn12516~ubuntu16.04/src/include/Makefile.am
--- codeblocks-20.03svn12487~ubuntu16.04/src/include/Makefile.am 2021-05-12 18:03:23.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/include/Makefile.am 2021-08-28 20:59:15.000000000 +0000
@@ -58,6 +58,7 @@
configuretoolsdlg.h \
confirmreplacedlg.h \
crc32.h \
+ cygwin.h \
debuggermanager.h \
editarrayfiledlg.h \
editarrayorderdlg.h \
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/include/Makefile.in codeblocks-20.03svn12516~ubuntu16.04/src/include/Makefile.in
--- codeblocks-20.03svn12487~ubuntu16.04/src/include/Makefile.in 2021-07-09 23:19:29.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/include/Makefile.in 2021-08-28 20:59:29.000000000 +0000
@@ -514,6 +514,7 @@
configuretoolsdlg.h \
confirmreplacedlg.h \
crc32.h \
+ cygwin.h \
debuggermanager.h \
editarrayfiledlg.h \
editarrayorderdlg.h \
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/include/pipedprocess.h codeblocks-20.03svn12516~ubuntu16.04/src/include/pipedprocess.h
--- codeblocks-20.03svn12487~ubuntu16.04/src/include/pipedprocess.h 2021-05-12 18:03:23.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/include/pipedprocess.h 2021-08-28 20:59:15.000000000 +0000
@@ -23,7 +23,7 @@
bool pipe = true, const wxString& dir = wxEmptyString, int index = -1);
// class destructor
~PipedProcess() override;
- virtual int Launch(const wxString& cmd, unsigned int pollingInterval = 100);
+ virtual int Launch(const wxString& cmd, int flags);
virtual void SendString(const wxString& text);
virtual bool HasInput();
virtual int GetPid(){ return m_Pid; }
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/include/scripting/bindings/sc_utils.h codeblocks-20.03svn12516~ubuntu16.04/src/include/scripting/bindings/sc_utils.h
--- codeblocks-20.03svn12487~ubuntu16.04/src/include/scripting/bindings/sc_utils.h 2021-06-20 14:42:50.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/include/scripting/bindings/sc_utils.h 2021-08-28 20:59:15.000000000 +0000
@@ -520,10 +520,7 @@
return true;
}
- int ErrorMessage()
- {
- return sq_throwerror(m_vm, m_errorMessage);
- }
+ DLLIMPORT int ErrorMessage();
HSQUIRRELVM GetVM() { return m_vm; }
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/astyle/dlgformattersettings.cpp codeblocks-20.03svn12516~ubuntu16.04/src/plugins/astyle/dlgformattersettings.cpp
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/astyle/dlgformattersettings.cpp 2021-05-12 18:04:34.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/astyle/dlgformattersettings.cpp 2021-08-28 20:59:15.000000000 +0000
@@ -2,8 +2,8 @@
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
* http://www.gnu.org/licenses/gpl-3.0.html
*
- * $Revision: 11266 $
- * $Id: dlgformattersettings.cpp 11266 2018-01-15 17:54:23Z jenslody $
+ * $Revision: 12490 $
+ * $Id: dlgformattersettings.cpp 12490 2021-08-05 23:50:23Z fuscated $
* $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/astyle/dlgformattersettings.cpp $
*/
@@ -13,6 +13,7 @@
#include
#include
#include
+#include
#include
DlgFormatterSettings::DlgFormatterSettings(wxWindow *dlg) :
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/compilergcc/compilerCYGWIN.cpp codeblocks-20.03svn12516~ubuntu16.04/src/plugins/compilergcc/compilerCYGWIN.cpp
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/compilergcc/compilerCYGWIN.cpp 2021-05-12 18:03:59.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/compilergcc/compilerCYGWIN.cpp 2021-08-28 20:59:15.000000000 +0000
@@ -2,16 +2,15 @@
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
* http://www.gnu.org/licenses/gpl-3.0.html
*
- * $Revision: 8649 $
- * $Id: compilerCYGWIN.cpp 8649 2012-12-12 19:18:18Z mortenmacfly $
+ * $Revision: 12503 $
+ * $Id: compilerCYGWIN.cpp 12503 2021-08-14 15:07:36Z fuscated $
* $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/compilergcc/compilerCYGWIN.cpp $
*/
+#include
+
#include "compilerCYGWIN.h"
-#include
-#ifdef __WXMSW__
- #include
-#endif // __WXMSW__
+#include "cygwin.h"
CompilerCYGWIN::CompilerCYGWIN()
: CompilerMINGW(_("Cygwin GCC"), _T("cygwin"))
@@ -31,55 +30,13 @@
AutoDetectResult CompilerCYGWIN::AutoDetectInstallationDir()
{
- AutoDetectResult ret = adrGuessed;
- m_MasterPath = _T("C:\\Cygwin"); // just a guess
- wxString tempMasterPath(m_MasterPath);
- bool validInstallationDir = false;
-
- // look in registry for Cygwin
-
-#ifdef __WXMSW__
- wxRegKey key; // defaults to HKCR
- key.SetName(_T("HKEY_LOCAL_MACHINE\\Software\\Cygwin\\setup"));
- if (key.Exists() && key.Open(wxRegKey::Read))
- {
- // found CygWin version 1.7 or newer; read it
- key.QueryValue(_T("rootdir"), tempMasterPath);
- if (wxDirExists(tempMasterPath + wxFILE_SEP_PATH + _T("bin")))
- validInstallationDir = true;
- }
- if (!validInstallationDir)
+ if (platform::windows && cbIsDetectedCygwinCompiler())
{
- key.SetName(_T("HKEY_LOCAL_MACHINE\\Software\\Cygnus Solutions\\Cygwin\\mounts v2\\/"));
- if (key.Exists() && key.Open(wxRegKey::Read))
- {
- // found CygWin version 1.5 or older; read it
- key.QueryValue(_T("native"), tempMasterPath);
- if ( wxDirExists(tempMasterPath + wxFILE_SEP_PATH + _T("bin")) )
- validInstallationDir = true;
- }
+ m_MasterPath = cbGetCygwinCompilerPathRoot();
+ return adrDetected;
}
-#endif // __WXMSW__
-
- if (!validInstallationDir)
- return ret;
-
- wxString cProgramDir = tempMasterPath + wxFILE_SEP_PATH + _T("bin") + wxFILE_SEP_PATH;
- wxString cProgramFullname = cProgramDir + m_Programs.C;
- if ( !wxFileExists(cProgramFullname) )
- return ret;
-
- wxFile pfFile(cProgramFullname);
- if ( !pfFile.IsOpened() )
- return ret;
-
- char buffer[10] = {0};
- pfFile.Read(buffer,10);
- if (memcmp("!", buffer, 10) != 0)
+ else
{
- m_MasterPath = tempMasterPath;
- ret = adrDetected;
+ return adrGuessed;
}
-
- return ret;
}
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/compilergcc/compilergcc.cpp codeblocks-20.03svn12516~ubuntu16.04/src/plugins/compilergcc/compilergcc.cpp
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/compilergcc/compilergcc.cpp 2021-07-04 10:20:31.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/compilergcc/compilergcc.cpp 2021-08-28 20:59:15.000000000 +0000
@@ -2,8 +2,8 @@
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
* http://www.gnu.org/licenses/gpl-3.0.html
*
- * $Revision: 12482 $
- * $Id: compilergcc.cpp 12482 2021-07-01 21:43:46Z bluehazzard $
+ * $Revision: 12516 $
+ * $Id: compilergcc.cpp 12516 2021-08-15 16:35:46Z bluehazzard $
* $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/compilergcc/compilergcc.cpp $
*/
@@ -1359,7 +1359,7 @@
if (cmd->isRun)
{
pipe = false; // no need to pipe output channels...
- flags |= wxEXEC_NOHIDE;
+ flags |= wxEXEC_SHOW_CONSOLE;
dir = m_CdRun;
// setup dynamic linker path
@@ -1393,7 +1393,7 @@
process.OutputFile = (cmd->isLink && cmd->target) ? cmd->target->GetOutputFilename() : wxString(wxEmptyString);
process.pProcess = new PipedProcess(&(process.pProcess), this, idGCCProcess, pipe, dir, procIndex);
- process.PID = wxExecute(cmd->command, flags, process.pProcess);
+ process.PID = process.pProcess->Launch(cmd->command, flags);
if (!process.PID)
{
wxString err = wxString::Format(_("Execution of '%s' in '%s' failed."),
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/contrib/regex_testbed/regexdlg.cpp codeblocks-20.03svn12516~ubuntu16.04/src/plugins/contrib/regex_testbed/regexdlg.cpp
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/contrib/regex_testbed/regexdlg.cpp 2021-05-12 18:03:55.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/contrib/regex_testbed/regexdlg.cpp 2021-08-28 20:59:15.000000000 +0000
@@ -2,8 +2,8 @@
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
* http://www.gnu.org/licenses/gpl-3.0.html
*
- * $Revision: 10293 $
- * $Id: regexdlg.cpp 10293 2015-05-15 10:58:52Z jenslody $
+ * $Revision: 12510 $
+ * $Id: regexdlg.cpp 12510 2021-08-15 11:51:08Z fuscated $
* $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/regex_testbed/regexdlg.cpp $
*/
@@ -26,8 +26,6 @@
//*)
BEGIN_EVENT_TABLE(RegExDlg,wxScrollingDialog)
- EVT_INIT_DIALOG(RegExDlg::OnInit)
- EVT_UPDATE_UI(-1, RegExDlg::OnUpdateUI)
END_EVENT_TABLE()
RegExDlg::VisibleDialogs RegExDlg::m_visible_dialogs;
@@ -43,6 +41,12 @@
m_newlines = (wxCheckBox*)FindWindow(XRCID("ID_NEWLINES"));
m_text = (wxTextCtrl*)FindWindow(XRCID("ID_TEXT"));
m_output = (wxHtmlWindow*)FindWindow(XRCID("ID_OUT"));
+
+ Connect(XRCID("ID_REGEX"),wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&RegExDlg::OnValueChanged);
+ Connect(XRCID("ID_LIBRARY"),wxEVT_COMMAND_CHOICE_SELECTED,(wxObjectEventFunction)&RegExDlg::OnValueChanged);
+ Connect(XRCID("ID_NOCASE"),wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&RegExDlg::OnValueChanged);
+ Connect(XRCID("ID_NEWLINES"),wxEVT_COMMAND_CHECKBOX_CLICKED,(wxObjectEventFunction)&RegExDlg::OnValueChanged);
+ Connect(XRCID("ID_TEXT"),wxEVT_COMMAND_TEXT_UPDATED,(wxObjectEventFunction)&RegExDlg::OnValueChanged);
//*)
assert(m_regex);
@@ -55,6 +59,10 @@
m_text->MoveAfterInTabOrder(m_quoted);
+#if wxCHECK_VERSION(3, 1, 6)
+ m_library->Delete(1); // v3.1.6 made wxRE_ADVANCED a synonym of wxRE_EXTENDED, so delete it
+#endif
+
m_library->SetSelection(0);
m_output->SetBorders(0);
m_quoted->SetEditable(false);
@@ -99,7 +107,7 @@
}
}
-void RegExDlg::OnUpdateUI(wxUpdateUIEvent& /*event*/)
+void RegExDlg::OnValueChanged(cb_unused wxCommandEvent& event)
{
static wxString regex;
static wxString text;
@@ -116,14 +124,14 @@
// cannot scroll the text (windows and linux).
//
- if ( regex == m_regex->GetValue() &&
+ if (regex == m_regex->GetValue() &&
text == m_text->GetValue() &&
nocase == m_nocase->GetValue() &&
newlines == m_newlines->GetValue() &&
library == m_library->GetSelection())
- {
- return;
- }
+ {
+ return;
+ }
regex = m_regex->GetValue();
text = m_text->GetValue();
@@ -158,48 +166,29 @@
m_output->SetPage(s);
}
-
-void RegExDlg::RunBenchmark(wxCommandEvent& /*event*/)
-{
-}
-
-
void RegExDlg::EndModal(int retCode)
{
wxScrollingDialog::EndModal(retCode);
}
-void RegExDlg::OnInit(wxInitDialogEvent& /*event*/)
-{
-}
-
-void RegExDlg::OnRegExItemActivated(wxListEvent& /*event*/)
-{
- //
-}
-
-
wxArrayString RegExDlg::GetBuiltinMatches(const wxString& text)
{
wxArrayString ret;
+#if wxCHECK_VERSION(3, 1, 6)
+ // wxRE_ADVANCED is a synonym of wxRE_EXTENDED, so it has been deleted from the choice
+ int flags = m_library->GetSelection() ? wxRE_BASIC : wxRE_EXTENDED;
+#else
int flags = m_library->GetSelection();
+#endif
- if (text.IsEmpty() || flags > 2) // should not be
- return ret;
+ if (m_newlines->IsChecked())
+ flags |= wxRE_NEWLINE;
- flags |= m_newlines->IsChecked() ? wxRE_NEWLINE : 0;
- flags |= m_nocase->IsChecked() ? wxRE_ICASE : 0;
+ if (m_nocase->IsChecked())
+ flags |= wxRE_ICASE;
- if (m_wxre.Compile(m_regex->GetValue(), flags))
- {
- m_regex->SetForegroundColour(wxNullColour);
- m_regex->SetBackgroundColour(wxNullColour);
- m_regex->GetParent()->Refresh();
- if (!m_wxre.Matches(text))
- return ret;
- }
- else
+ if (!m_wxre.Compile(m_regex->GetValue(), flags))
{
m_regex->SetForegroundColour(*wxWHITE);
m_regex->SetBackgroundColour(*wxRED);
@@ -207,26 +196,16 @@
return ret;
}
- for(size_t i = 0; i < m_wxre.GetMatchCount(); ++i)
- if (!m_wxre.GetMatch(text, i).IsEmpty())
- ret.Add(m_wxre.GetMatch(text, i));
-
- return ret;
-}
-
-wxArrayString RegExDlg::GetPregMatches(const wxString& /*text*/)
-{
- wxArrayString ret;
+ m_regex->SetForegroundColour(wxNullColour);
+ m_regex->SetBackgroundColour(wxNullColour);
+ m_regex->GetParent()->Refresh();
-// const char *error;
-// int erroffset;
-// int flags = 0;
-// flags |= m_nocase->IsChecked() ? PCRE_CASELESS : 0;
-// flags |= m_newlines->IsChecked() ? PCRE_DOTALL : 0;
-// pcre *reg = pcre_compile(text.mb_str(), flags, &error, &erroffset, 0);
+ if (!text.empty() && m_wxre.Matches(text))
+ {
+ const size_t count = m_wxre.GetMatchCount();
+ for (size_t i = 0; i < count; ++i)
+ ret.Add(m_wxre.GetMatch(text, i));
+ }
return ret;
}
-
-
-
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/contrib/regex_testbed/regexdlg.h codeblocks-20.03svn12516~ubuntu16.04/src/plugins/contrib/regex_testbed/regexdlg.h
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/contrib/regex_testbed/regexdlg.h 2021-05-12 18:03:55.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/contrib/regex_testbed/regexdlg.h 2021-08-28 20:59:15.000000000 +0000
@@ -10,11 +10,11 @@
#include
//(*Headers(RegExDlg)
-#include
#include "scrollingdialog.h"
-#include
+#include
#include
#include
+#include
//*)
#include
@@ -43,27 +43,23 @@
protected:
//(*Handlers(RegExDlg)
- void RunBenchmark(wxCommandEvent& event);
- void OnInit(wxInitDialogEvent& event);
- void OnRegExItemActivated(wxListEvent& event);
- void OnUpdateUI(wxUpdateUIEvent& event);
void OnClose(wxCloseEvent& event);
+ void OnValueChanged(wxCommandEvent& event);
//*)
private:
wxArrayString GetBuiltinMatches(const wxString& text);
- wxArrayString GetPregMatches(const wxString& text);
//(*Declarations(RegExDlg)
+ wxCheckBox* m_newlines;
wxCheckBox* m_nocase;
+ wxChoice* m_library;
wxHtmlWindow* m_output;
- wxTextCtrl* m_text;
wxTextCtrl* m_quoted;
wxTextCtrl* m_regex;
- wxCheckBox* m_newlines;
- wxChoice* m_library;
+ wxTextCtrl* m_text;
//*)
wxRegEx m_wxre;
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/contrib/regex_testbed/RegExTestbed.cpp codeblocks-20.03svn12516~ubuntu16.04/src/plugins/contrib/regex_testbed/RegExTestbed.cpp
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/contrib/regex_testbed/RegExTestbed.cpp 2021-05-12 18:03:55.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/contrib/regex_testbed/RegExTestbed.cpp 2021-08-28 20:59:15.000000000 +0000
@@ -2,8 +2,8 @@
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
* http://www.gnu.org/licenses/gpl-3.0.html
*
- * $Revision: 7593 $
- * $Id: RegExTestbed.cpp 7593 2011-11-13 19:04:12Z mortenmacfly $
+ * $Revision: 12509 $
+ * $Id: RegExTestbed.cpp 12509 2021-08-15 11:51:05Z fuscated $
* $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/contrib/regex_testbed/RegExTestbed.cpp $
*/
@@ -65,7 +65,7 @@
{
try
{
- RegExDlg *dlg = new RegExDlg(0, -1);
+ RegExDlg *dlg = new RegExDlg(Manager::Get()->GetAppWindow(), -1);
PlaceWindow(dlg);
dlg->Show();
}
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/contrib/regex_testbed/wxsmith/RegExDlg.wxs codeblocks-20.03svn12516~ubuntu16.04/src/plugins/contrib/regex_testbed/wxsmith/RegExDlg.wxs
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/contrib/regex_testbed/wxsmith/RegExDlg.wxs 2021-05-12 18:03:55.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/contrib/regex_testbed/wxsmith/RegExDlg.wxs 2021-08-28 20:59:15.000000000 +0000
@@ -3,14 +3,24 @@
-
+
-
-
-
+
+
+
-
+
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/contrib/rndgen/rndgen.cpp codeblocks-20.03svn12516~ubuntu16.04/src/plugins/contrib/rndgen/rndgen.cpp
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/contrib/rndgen/rndgen.cpp 2021-05-12 18:03:55.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/contrib/rndgen/rndgen.cpp 2021-08-28 20:59:15.000000000 +0000
@@ -12,7 +12,7 @@
namespace
{
- PluginRegistrant reg(_T("rndgen"));
+ PluginRegistrant reg("rndgen");
}
void RndGen::OnAttach()
@@ -25,20 +25,19 @@
cbEditor* ed = (cbEditor*) event.GetEditor();
cbStyledTextCtrl* ctrl = ed->GetControl();
- if (ctrl->GetText().Contains(_T("RANDGEN:")) == false)
+ if (ctrl->GetText().Contains("RANDGEN:") == false)
return;
const int Pos = ctrl->GetCurrentPos();
- ctrl->SetUndoCollection(false);
+ ctrl->BeginUndoAction();
- wxRegEx int_re(_T("([0-9]+)\\ *;?\\ */\\*(\\ *RANDGEN:INT\\((.*))\\*/"));
-// wxRegEx alnum_re(_T("\\\"([^\"]+)\\\"\\ *;?\\ */\\*(\\ *RANDGEN:ALNUM\\((.*))\\*/"));
- wxRegEx alnum_re(_T("\\\"([^\\\"]+)\\\"\\ *;?\\ */\\*(\\ *RANDGEN:(ALNUM|DIGITS|CHARS|UPPERCHARS|LOWERCHARS)\\((.*))\\*/"));
+ wxRegEx int_re("([0-9]+) *;? *\\/\\* *RANDGEN:INT\\((.+)\\) *\\*\\/");
+ wxCHECK_RET(int_re.IsValid(), "Invalid regex (int_re) in rndgen plugin");
- const wxString Chars(_T("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"));
-
- assert(alnum_re.IsValid() && int_re.IsValid());
+ wxRegEx alnum_re("\"([^\"]+)\" *;? *\\/\\* *RANDGEN:(ALNUM|DIGITS|CHARS|UPPERCHARS|LOWERCHARS)\\((.*)\\) *\\*\\/");
+ wxCHECK_RET(alnum_re.IsValid(), "Invalid regex (alnum_re) in rndgen plugin");
+ const wxString Chars("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ");
const unsigned int n = ctrl->GetLineCount();
for (unsigned int i = 0; i < n; ++i)
{
@@ -53,9 +52,9 @@
{
const wxString Search(int_re.GetMatch(s, 1));
long Arg;
- int_re.GetMatch(s, 3).ToLong(&Arg);
+ int_re.GetMatch(s, 2).ToLong(&Arg);
wxString Replace;
- Replace.Printf(_T("%u"), RandGen() % (Arg+1));
+ Replace.Printf("%lu", static_cast(RandGen() % (Arg+1)));
s.Replace(Search, Replace, false);
ctrl->SetTargetStart(a);
@@ -65,31 +64,31 @@
else if (alnum_re.Matches(s))
{
const wxString Search(alnum_re.GetMatch(s, 1));
- const wxString What(alnum_re.GetMatch(s, 3));
+ const wxString What(alnum_re.GetMatch(s, 2));
long Arg;
- alnum_re.GetMatch(s, 4).ToLong(&Arg);
+ alnum_re.GetMatch(s, 3).ToLong(&Arg);
wxString Replace;
- if (What == _T("ALNUM"))
+ if (What == "ALNUM")
{
for (int j = 0; j < Arg; ++j)
Replace += Chars[RandGen() % Chars.length()];
}
- else if (What == _T("DIGITS"))
+ else if (What == "DIGITS")
{
for (int j = 0; j < Arg; ++j)
Replace += Chars[RandGen() % 10];
}
- else if (What == _T("CHARS"))
+ else if (What == "CHARS")
{
for (int j = 0; j < Arg; ++j)
Replace += Chars[10+ RandGen() % (Chars.length() - 10)];
}
- else if (What == _T("UPPERCHARS"))
+ else if (What == "UPPERCHARS")
{
for (int j = 0; j < Arg; ++j)
Replace += Chars[36 + RandGen() % 26];
}
- else if(What == _T("LOWERCHARS"))
+ else if (What == "LOWERCHARS")
{
for (int j = 0; j < Arg; ++j)
Replace += Chars[10 + RandGen() % 26];
@@ -103,6 +102,7 @@
}
}
- ctrl->SetUndoCollection(true);
+ ctrl->EndUndoAction();
ctrl->SetCurrentPos(Pos);
+ ctrl->SelectNone();
}
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/debuggergdb/debuggergdb.cpp codeblocks-20.03svn12516~ubuntu16.04/src/plugins/debuggergdb/debuggergdb.cpp
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/debuggergdb/debuggergdb.cpp 2021-07-09 23:19:18.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/debuggergdb/debuggergdb.cpp 2021-08-28 20:59:15.000000000 +0000
@@ -2,8 +2,8 @@
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
* http://www.gnu.org/licenses/gpl-3.0.html
*
- * $Revision: 12484 $
- * $Id: debuggergdb.cpp 12484 2021-07-04 21:19:35Z fuscated $
+ * $Revision: 12503 $
+ * $Id: debuggergdb.cpp 12503 2021-08-14 15:07:36Z fuscated $
* $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/debuggergdb/debuggergdb.cpp $
*/
@@ -95,8 +95,6 @@
CMD_RUNNINGTHREADS
};
-const wxString g_EscapeChar = wxChar(26);
-
namespace
{
long idMenuInfoFrame = wxNewId();
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/debuggergdb/debuggergdb.h codeblocks-20.03svn12516~ubuntu16.04/src/plugins/debuggergdb/debuggergdb.h
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/debuggergdb/debuggergdb.h 2021-05-12 18:04:27.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/debuggergdb/debuggergdb.h 2021-08-28 20:59:15.000000000 +0000
@@ -19,8 +19,6 @@
#include "debuggerstate.h"
#include "debugger_defs.h"
-extern const wxString g_EscapeChar;
-
class cbProject;
class TiXmlElement;
class DebuggerDriver;
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/debuggergdb/gdb_driver.cpp codeblocks-20.03svn12516~ubuntu16.04/src/plugins/debuggergdb/gdb_driver.cpp
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/debuggergdb/gdb_driver.cpp 2021-05-12 18:04:30.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/debuggergdb/gdb_driver.cpp 2021-08-28 20:59:15.000000000 +0000
@@ -2,8 +2,8 @@
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
* http://www.gnu.org/licenses/gpl-3.0.html
*
- * $Revision: 12212 $
- * $Id: gdb_driver.cpp 12212 2020-10-17 22:50:28Z fuscated $
+ * $Revision: 12503 $
+ * $Id: gdb_driver.cpp 12503 2021-08-14 15:07:36Z fuscated $
* $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/debuggergdb/gdb_driver.cpp $
*/
@@ -12,17 +12,14 @@
#include "gdb_commands.h"
#include "debuggeroptionsdlg.h"
#include "debuggerstate.h"
+
#include
-#include
-#include
#include
+#include
#include
#include
-
-#ifdef __WXMSW__
-// for Registry detection of Cygwin
-#include "wx/msw/wrapwin.h" // Wraps windows.h
-#endif
+#include
+#include
// the ">>>>>>" is a hack: sometimes, especially when watching uninitialized char*
// some random control codes in the stream (like 'delete') will mess-up our prompt and the debugger
@@ -79,7 +76,6 @@
GDB_driver::GDB_driver(DebuggerGDB* plugin) :
DebuggerDriver(plugin),
- m_CygwinPresent(false),
m_BreakOnEntry(false),
m_ManualBreakOnEntry(false),
m_IsStarted(false),
@@ -91,6 +87,9 @@
//ctor
m_needsUpdate = false;
m_forceUpdate = false;
+
+ if (platform::windows)
+ m_CygwinPresent = cbIsDetectedCygwinCompiler();
}
GDB_driver::~GDB_driver()
@@ -107,7 +106,17 @@
cmd << _T(" -fullname"); // report full-path filenames when breaking
cmd << _T(" -quiet"); // don't display version on startup
cmd << wxT(" ") << userArguments;
- cmd << _T(" -args ") << debuggee;
+
+ wxString actualDebuggee;
+ if (platform::windows && m_CygwinPresent)
+ {
+ actualDebuggee = debuggee;
+ cbGetCygwinPathFromWindowsPath(actualDebuggee);
+ }
+ else
+ actualDebuggee = debuggee;
+
+ cmd << _T(" -args ") << actualDebuggee;
return cmd;
}
@@ -133,10 +142,6 @@
{
// default initialization
- // for the possibility that the program to be debugged is compiled under Cygwin
- if (platform::windows)
- DetectCygwinMount();
-
// make sure we 're using the prompt that we know and trust ;)
QueueCommand(new DebuggerCmd(this, wxString("set prompt ") + FULL_GDB_PROMPT));
@@ -242,121 +247,12 @@
}
}
-// Cygwin check code
-#ifdef __WXMSW__
-
-enum{ BUFSIZE = 64 };
-
-// routines to handle cygwin compiled programs on a Windows compiled C::B IDE
-void GDB_driver::DetectCygwinMount(void)
-{
- LONG lRegistryAPIresult;
- HKEY hKey_CU;
- HKEY hKey_LM;
- TCHAR szCygwinRoot[BUFSIZE];
- DWORD dwBufLen=BUFSIZE*sizeof(TCHAR);
-
- // checking if cygwin mounts are present under HKCU
- lRegistryAPIresult = RegOpenKeyEx( HKEY_CURRENT_USER,
- TEXT("Software\\Cygnus Solutions\\Cygwin\\mounts v2"),
- 0, KEY_QUERY_VALUE, &hKey_CU );
- if ( lRegistryAPIresult == ERROR_SUCCESS )
- {
- // try to readback cygwin root (might not exist!)
- lRegistryAPIresult = RegQueryValueEx( hKey_CU, TEXT("cygdrive prefix"), NULL, NULL,
- (LPBYTE) szCygwinRoot, &dwBufLen);
- }
-
- // lRegistryAPIresult can be erroneous for two reasons:
- // 1.) Cygwin entry is not present (could not be opened) in HKCU
- // 2.) "cygdrive prefix" is not present (could not be read) in HKCU
- if ( lRegistryAPIresult != ERROR_SUCCESS )
- {
- // Now check if probably present under HKLM
- lRegistryAPIresult = RegOpenKeyEx( HKEY_LOCAL_MACHINE,
- TEXT("SOFTWARE\\Cygnus Solutions\\Cygwin\\mounts v2"),
- 0, KEY_QUERY_VALUE, &hKey_LM );
- if ( lRegistryAPIresult != ERROR_SUCCESS )
- {
- // cygwin definitely not installed
- m_CygwinPresent = false;
- return;
- }
-
- // try to readback cygwin root (now it really should exist here)
- lRegistryAPIresult = RegQueryValueEx( hKey_LM, TEXT("cygdrive prefix"), NULL, NULL,
- (LPBYTE) szCygwinRoot, &dwBufLen);
- }
-
- // handle a possible query error
- if ( (lRegistryAPIresult != ERROR_SUCCESS) || (dwBufLen > BUFSIZE*sizeof(TCHAR)) )
- {
- // bit of an assumption, but we won't be able to find the root without it
- m_CygwinPresent = false;
- return;
- }
-
- // close opened keys
- RegCloseKey( hKey_CU ); // ignore key close errors
- RegCloseKey( hKey_LM ); // ignore key close errors
-
- m_CygwinPresent = true; // if we end up here all was OK
- m_CygdrivePrefix = (szCygwinRoot); // convert to wxString type for later use
-}
-
-void GDB_driver::CorrectCygwinPath(wxString& path)
-{
- unsigned int i=0, EscCount=0;
-
- // preserve any escape characters at start of path - this is true for
- // breakpoints - value is 2, but made dynamic for safety as we
- // are only checking for the CDprefix not any furthur correctness
- if (path.GetChar(0)==g_EscapeChar)
- {
- while ( (iLog(wxString::Format(_T("file: %s, line: %s"), file.c_str(), lineStr.c_str()));
long line;
lineStr.ToLong(&line);
@@ -996,7 +890,7 @@
}
// cursor change
- else if (lines[i].StartsWith(g_EscapeChar)) // ->->
+ else if (!lines[i].empty() && lines[i][0] == wxUniChar(26)) // ->->
{
// breakpoint, e.g.
// C:/Devel/tmp/test_console_dbg/tmp/main.cpp:14:171:beg:0x401428
@@ -1018,6 +912,7 @@
}
else
{
+ bool isFileUpdated = false;
// other break info, e.g.
// 0x7c9507a8 in ntdll!KiIntSystemCall () from C:\WINDOWS\system32\ntdll.dll
wxRegEx* re = 0;
@@ -1035,6 +930,7 @@
m_Cursor.line = -1;
m_Cursor.changed = true;
m_needsUpdate = true;
+ isFileUpdated = true;
}
else if ( reThreadSwitch2.Matches(lines[i]) )
{
@@ -1045,6 +941,7 @@
m_Cursor.line = -1;
m_Cursor.changed = true;
m_needsUpdate = true;
+ isFileUpdated = true;
}
else if (reBreak3.Matches(lines[i]) )
{
@@ -1073,6 +970,9 @@
m_Cursor.changed = true;
m_needsUpdate = true;
}
+
+ if (isFileUpdated && platform::windows && m_CygwinPresent)
+ cbGetWindowsPathFromCygwinPath(m_Cursor.file);
}
}
buffer.Clear();
@@ -1123,11 +1023,13 @@
if (platform::windows)
{
m_Cursor.file = reBreak_in.GetMatch(line, 1) + reBreak_in.GetMatch(line, 2);
+ if (m_CygwinPresent)
+ cbGetWindowsPathFromCygwinPath(m_Cursor.file);
}
else
{
- // For debuging of usual linux application 'GetMatch(line, 1)' is empty.
- // While for debuging of application under wine the name of the disk is useless.
+ // For debugging of usual linux application 'GetMatch(line, 1)' is empty.
+ // While for debugging of application under wine the name of the disk is useless.
m_Cursor.file = reBreak_in.GetMatch( line, 2);
}
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/debuggergdb/gdb_driver.h codeblocks-20.03svn12516~ubuntu16.04/src/plugins/debuggergdb/gdb_driver.h
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/debuggergdb/gdb_driver.h 2021-05-12 18:04:30.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/debuggergdb/gdb_driver.h 2021-08-28 20:59:15.000000000 +0000
@@ -78,12 +78,7 @@
private:
void HandleMainBreakPoint(const wxRegEx& reBreak, wxString line);
- // win/Cygwin platform checking
- void DetectCygwinMount(void);
- void CorrectCygwinPath(wxString& path);
-
bool m_CygwinPresent;
- wxString m_CygdrivePrefix;
// Seems to be intended to allow step before program has started.
// Was always false. HC changed to take value from DebuggerGDB::m_BreakOnEntry.
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/plugins/debuggergdb/parsewatchvalue.cpp codeblocks-20.03svn12516~ubuntu16.04/src/plugins/debuggergdb/parsewatchvalue.cpp
--- codeblocks-20.03svn12487~ubuntu16.04/src/plugins/debuggergdb/parsewatchvalue.cpp 2021-05-12 18:04:31.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/plugins/debuggergdb/parsewatchvalue.cpp 2021-08-28 20:59:15.000000000 +0000
@@ -2,8 +2,8 @@
* This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
* http://www.gnu.org/licenses/gpl-3.0.html
*
- * $Revision: 11633 $
- * $Id: parsewatchvalue.cpp 11633 2019-04-20 16:56:13Z fuscated $
+ * $Revision: 12515 $
+ * $Id: parsewatchvalue.cpp 12515 2021-08-15 11:51:22Z fuscated $
* $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/plugins/debuggergdb/parsewatchvalue.cpp $
*/
@@ -333,7 +333,7 @@
}
wxRegEx regexRepeatedChar(wxT(".+[ \\t]()$"));
-wxRegEx regexFortranArray(wxT("^\\([0-9,]+)$"));
+wxRegEx regexFortranArray(wxT("^\\([0-9,]+\\)$"));
inline bool ParseGDBWatchValue(cb::shared_ptr watch, wxString const &value, int &start, int length)
{
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/sdk/cbplugin.cpp codeblocks-20.03svn12516~ubuntu16.04/src/sdk/cbplugin.cpp
--- codeblocks-20.03svn12487~ubuntu16.04/src/sdk/cbplugin.cpp 2021-05-12 18:04:38.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/sdk/cbplugin.cpp 2021-08-28 20:59:15.000000000 +0000
@@ -2,8 +2,8 @@
* This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
* http://www.gnu.org/licenses/lgpl-3.0.html
*
- * $Revision: 12326 $
- * $Id: cbplugin.cpp 12326 2021-05-07 22:23:31Z bluehazzard $
+ * $Revision: 12489 $
+ * $Id: cbplugin.cpp 12489 2021-08-05 23:50:20Z fuscated $
* $HeadURL: https://svn.code.sf.net/p/codeblocks/code/trunk/src/sdk/cbplugin.cpp $
*/
@@ -178,13 +178,13 @@
{
cbEditor* ed = Manager::Get()->GetEditorManager()->GetBuiltinActiveEditor();
if (!ed)
- return wxEmptyString;
+ return wxString();
cbStyledTextCtrl* stc = ed->GetControl();
if (!stc)
- return wxEmptyString;
+ return wxString();
wxString selected_text = stc->GetSelectedText();
- if (selected_text != wxEmptyString)
+ if (!selected_text.empty())
{
selected_text.Trim(true);
selected_text.Trim(false);
@@ -203,11 +203,11 @@
int endPos = stc->GetSelectionEnd();
int mousePos = stc->PositionFromPointClose(mousePosition->x, mousePosition->y);
if (mousePos == wxSCI_INVALID_POSITION)
- return wxEmptyString;
+ return wxString();
else if (startPos <= mousePos && mousePos <= endPos)
return selected_text;
else
- return wxEmptyString;
+ return wxString();
}
else
return selected_text;
diff -Nru codeblocks-20.03svn12487~ubuntu16.04/src/sdk/cygwin.cpp codeblocks-20.03svn12516~ubuntu16.04/src/sdk/cygwin.cpp
--- codeblocks-20.03svn12487~ubuntu16.04/src/sdk/cygwin.cpp 1970-01-01 00:00:00.000000000 +0000
+++ codeblocks-20.03svn12516~ubuntu16.04/src/sdk/cygwin.cpp 2021-08-28 20:59:15.000000000 +0000
@@ -0,0 +1,249 @@
+/*
+ * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
+ * http://www.gnu.org/licenses/lgpl-3.0.html
+ *
+ * $Revision$
+ * $Id$
+ * $HeadURL$
+ */
+
+#include "sdk_precomp.h"
+
+#ifndef CB_PRECOMP
+ #include
+ #include "cbproject.h"
+ #include "compilerfactory.h"
+ #include "logmanager.h"
+ #include