Author Topic: Error in revision 3382: extra qualification  (Read 3435 times)

Offline Der Meister

  • Regular
  • ***
  • Posts: 307
Error in revision 3382: extra qualification
« on: December 15, 2006, 02:49:33 pm »
Quote
gdb_driver.h:76: error: extra qualification 'GDB_driver::' on member 'HandleMainBreakPoint'
I got this message while compiling revision 3384 with gcc 4.1.1 on Linux. The following patch fixes this issue:
Code
Index: src/plugins/debuggergdb/gdb_driver.h
===================================================================
--- src/plugins/debuggergdb/gdb_driver.h        (revision 3384)
+++ src/plugins/debuggergdb/gdb_driver.h        (working copy)
@@ -73,7 +73,7 @@
     private:
         void InitializeScripting();
         void RegisterType(const wxString& name, const wxString& regex, const wxString& eval_func, const wxString& parse_func);
-        void GDB_driver::HandleMainBreakPoint(const wxRegEx& reBreak, wxString line);
+        void HandleMainBreakPoint(const wxRegEx& reBreak, wxString line);
 #ifdef __WXMSW__
         // win/Cygwin platform checking
         void DetectCygwinMount(void);

Edit:
Got another few errors:
Quote
gdb_commands.h: In member function 'virtual void GdbCmd_DisassemblyInit::ParseOutput(const wxString&)':
gdb_commands.h:1148: error: 'm_disassemblyFlavor' was not declared in this scope
gdb_commands.h:1150: error: 'reDisassemblyInitFuncOR32' was not declared in this scope
gdb_driver.cpp: In member function 'virtual void GDB_driver::ParseOutput(const wxString&)':
gdb_driver.cpp:757: error: 'reBreak_or32' was not declared in this scope
Don't know how to fix them all. Seems as these are windows-specific things.

Edit2:
Tried the following patch. It fixes the compiler errors but I don't know if the resulting behaviour is still correct. Can anyone with good knowledge of this code part look over it?
Code
Index: src/plugins/debuggergdb/gdb_driver.cpp
===================================================================
--- src/plugins/debuggergdb/gdb_driver.cpp      (revision 3384)
+++ src/plugins/debuggergdb/gdb_driver.cpp      (working copy)
@@ -752,14 +752,18 @@
             // Main breakpoint handler is wrapped into a function so we can use
             // the same code with different regular expressions - depending on
             // the platform.
+#ifdef __WXMSW__
             if(flavour == _T("set disassembly-flavor or32"))
             {
                 HandleMainBreakPoint(reBreak_or32, lines[i]);
             }
             else
             {
+#endif
                 HandleMainBreakPoint(reBreak, lines[i]);
+#ifdef __WXMSW__
             }
+#endif
         }
         else
         {
Index: src/plugins/debuggergdb/gdb_commands.h
===================================================================
--- src/plugins/debuggergdb/gdb_commands.h      (revision 3384)
+++ src/plugins/debuggergdb/gdb_commands.h      (working copy)
@@ -1145,14 +1145,18 @@
                     sf.function = reDisassemblyInitFunc.GetMatch(output, 2);
                     long int active;
 
+#ifdef __WXMSW__
                     if(m_disassemblyFlavor == _T("set disassembly-flavor or32"))
                     {
                         reDisassemblyInitFuncOR32.GetMatch(output, 1).ToLong(&active, 16);
                     }
                     else
                     {
+#endif
                         reDisassemblyInitFunc.GetMatch(output, 1).ToLong(&active, 16);
+#ifdef __WXMSW__
                     }
+#endif
                     m_pDlg->SetActiveAddress(active);
                 }
 
« Last Edit: December 15, 2006, 03:00:20 pm by Der Meister »
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand.
Real Programmers don't write in BASIC. Actually, no programmers write in BASIC, after the age of 12.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Error in revision 3382: extra qualification
« Reply #1 on: December 15, 2006, 03:00:44 pm »
Yes, I committed those changes by accident actually. I wanted to test them under linux too before committing but for some obscure reason they got included in my last commit...

Will fix them later today, thanks for reporting it.
Be patient!
This bug will be fixed soon...