User forums > Embedded development

Virtual AGC (Apollo Guidance Computer) debugging in C::B

<< < (2/3) > >>

ohommes:
Okay I just confirmed it just renaming a source file from something.agc to something.s makes the file capable of debugging again. Why does code blocks have this weird limitation build in. If a file is a source file no matter what it should be possible to use it as a file in the debugger and have the IDE set the line indicator when debugging to show where you are. If I have a file name a.s which jumps to a file b.agc which then calls c.s then while I am in a.s I get the nice indication in the editor during debugging where I am, when jumping into the b.agc file it stops and when jumping to c.s it starts again. So clearly it is based on the extension whether or not CodeBlocks enables source stepping. This is weird especially when all the other debug functions work. It is just that the IDE editor is afraid of opening a non-text file.

Does anyone have a solution for this?

stahta01:
I do NOT use the debugger; so, I can not test patch or confirm this issue.
But, I do build Code::Blocks a lot and if it is in code blocks I think it is it the code below.

from filefilters.cpp

--- Code: ---const wxString FileFilters::S_EXT                        = _T("s");

--- End code ---

from globals.cpp

--- Code: ---FileType FileTypeOf(const wxString& filename)
{
    wxString ext = filename.AfterLast(_T('.')).Lower();

    if (ext.IsSameAs(FileFilters::ASM_EXT) ||
        ext.IsSameAs(FileFilters::C_EXT) ||
        ext.IsSameAs(FileFilters::CC_EXT) ||
        ext.IsSameAs(FileFilters::CPP_EXT) ||
        ext.IsSameAs(FileFilters::CXX_EXT) ||
        ext.IsSameAs(FileFilters::INL_EXT) ||
        ext.IsSameAs(FileFilters::S_EXT) ||
        ext.IsSameAs(FileFilters::SS_EXT) ||
        ext.IsSameAs(FileFilters::S62_EXT) ||
        ext.IsSameAs(FileFilters::D_EXT) ||
        ext.IsSameAs(FileFilters::F_EXT) ||
        ext.IsSameAs(FileFilters::F77_EXT) ||
        ext.IsSameAs(FileFilters::F90_EXT) ||
        ext.IsSameAs(FileFilters::F95_EXT) ||
        ext.IsSameAs(FileFilters::JAVA_EXT)
       )
        return ftSource;

--- End code ---

from debuggergdb.cpp

--- Code: ---void DebuggerGDB::SyncEditor(const wxString& filename, int line, bool setMarker)
{
    if (setMarker)
        ClearActiveMarkFromAllEditors();
    FileType ft = FileTypeOf(filename);
    if (ft != ftSource && ft != ftHeader && ft != ftResource)
        return; // don't try to open unknown files

--- End code ---

Tim S.

stahta01:
Possible patch it needs testing to confirm it fixes the problem and to confirm it compiles.


--- Code: ---Index: src/sdk/scripting/bindings/sc_consts.cpp
===================================================================
--- src/sdk/scripting/bindings/sc_consts.cpp (revision 5730)
+++ src/sdk/scripting/bindings/sc_consts.cpp (working copy)
@@ -195,6 +195,8 @@
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::MSVC6_WORKSPACE_EXT, "EXT_MSVC6_WORKSPACE");
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::MSVC7_EXT, "EXT_MSVC7");
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::MSVC7_WORKSPACE_EXT, "EXT_MSVC7_WORKSPACE");
+        BIND_WXSTR_CONSTANT_NAMED(FileFilters::AEA_EXT, "EXT_AEA");
+        BIND_WXSTR_CONSTANT_NAMED(FileFilters::AGC_EXT, "EXT_AGC");
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::ASM_EXT, "EXT_ASM");
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::D_EXT, "EXT_D");
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::F_EXT, "EXT_F");
@@ -231,6 +233,8 @@
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::MSVC6_WORKSPACE_DOT_EXT, "DOT_EXT_MSVC6_WORKSPACE");
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::MSVC7_DOT_EXT, "DOT_EXT_MSVC7");
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::MSVC7_WORKSPACE_DOT_EXT, "DOT_EXT_MSVC7_WORKSPACE");
+        BIND_WXSTR_CONSTANT_NAMED(FileFilters::AEA_DOT_EXT, "DOT_EXT_AEA");
+        BIND_WXSTR_CONSTANT_NAMED(FileFilters::AGC_DOT_EXT, "DOT_EXT_AGC");
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::ASM_DOT_EXT, "DOT_EXT_ASM");
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::D_DOT_EXT, "DOT_EXT_D");
         BIND_WXSTR_CONSTANT_NAMED(FileFilters::F_DOT_EXT, "DOT_EXT_F");
Index: src/sdk/globals.cpp
===================================================================
--- src/sdk/globals.cpp (revision 5730)
+++ src/sdk/globals.cpp (working copy)
@@ -210,7 +210,9 @@
 {
     wxString ext = filename.AfterLast(_T('.')).Lower();
 
-    if (ext.IsSameAs(FileFilters::ASM_EXT) ||
+    if (ext.IsSameAs(FileFilters::AEA_EXT) ||
+        ext.IsSameAs(FileFilters::AGC_EXT) ||
+        ext.IsSameAs(FileFilters::ASM_EXT) ||
         ext.IsSameAs(FileFilters::C_EXT) ||
         ext.IsSameAs(FileFilters::CC_EXT) ||
         ext.IsSameAs(FileFilters::CPP_EXT) ||
Index: src/sdk/filefilters.cpp
===================================================================
--- src/sdk/filefilters.cpp (revision 5730)
+++ src/sdk/filefilters.cpp (working copy)
@@ -147,6 +147,8 @@
 const wxString FileFilters::MSVC7_WORKSPACE_EXT          = _T("sln");
 const wxString FileFilters::XCODE1_EXT                   = _T("xcode");
 const wxString FileFilters::XCODE2_EXT                   = _T("xcodeproj");
+const wxString FileFilters::AEA_EXT                      = _T("aea");
+const wxString FileFilters::AGC_EXT                      = _T("agc");
 const wxString FileFilters::ASM_EXT                      = _T("asm");
 const wxString FileFilters::D_EXT                        = _T("d");
 const wxString FileFilters::F_EXT                        = _T("f");
@@ -197,6 +199,8 @@
 const wxString FileFilters::MSVC7_WORKSPACE_DOT_EXT          = _T('.') + FileFilters::MSVC7_WORKSPACE_EXT;
 const wxString FileFilters::XCODE1_DOT_EXT                   = _T('.') + FileFilters::XCODE1_EXT;
 const wxString FileFilters::XCODE2_DOT_EXT                   = _T('.') + FileFilters::XCODE2_EXT;
+const wxString FileFilters::AEA_DOT_EXT                      = _T('.') + FileFilters::AEA_EXT;
+const wxString FileFilters::AGC_DOT_EXT                      = _T('.') + FileFilters::AGC_EXT;
 const wxString FileFilters::ASM_DOT_EXT                      = _T('.') + FileFilters::ASM_EXT;
 const wxString FileFilters::D_DOT_EXT                        = _T('.') + FileFilters::D_EXT;
 const wxString FileFilters::F_DOT_EXT                        = _T('.') + FileFilters::F_EXT;
Index: src/include/filefilters.h
===================================================================
--- src/include/filefilters.h (revision 5730)
+++ src/include/filefilters.h (working copy)
@@ -72,6 +72,8 @@
     extern const DLLIMPORT wxString MSVC7_WORKSPACE_EXT;
     extern const DLLIMPORT wxString XCODE1_EXT;
     extern const DLLIMPORT wxString XCODE2_EXT;
+    extern const DLLIMPORT wxString AEA_EXT;
+    extern const DLLIMPORT wxString AGC_EXT;
     extern const DLLIMPORT wxString ASM_EXT;
     extern const DLLIMPORT wxString D_EXT;
     extern const DLLIMPORT wxString F_EXT;
@@ -112,6 +114,8 @@
     extern const DLLIMPORT wxString MSVC7_WORKSPACE_DOT_EXT;
     extern const DLLIMPORT wxString XCODE1_DOT_EXT;
     extern const DLLIMPORT wxString XCODE2_DOT_EXT;
+    extern const DLLIMPORT wxString AEA_DOT_EXT;
+    extern const DLLIMPORT wxString AGC_DOT_EXT;
     extern const DLLIMPORT wxString ASM_DOT_EXT;
     extern const DLLIMPORT wxString D_DOT_EXT;
     extern const DLLIMPORT wxString F_DOT_EXT;
Index: src/src/associations.cpp
===================================================================
--- src/src/associations.cpp (revision 5730)
+++ src/src/associations.cpp (working copy)
@@ -47,6 +47,8 @@
     { FileFilters::RESOURCE_EXT,        _T("resource file"),                10 },
     { FileFilters::XRCRESOURCE_EXT,     _T("XRC resource file"),            10 },
 
+    { FileFilters::AEA_EXT,             _T("ASM source file"),               2 },
+    { FileFilters::AGC_EXT,             _T("ASM source file"),               2 },
     { FileFilters::ASM_EXT,             _T("ASM source file"),               2 },
     { FileFilters::S_EXT,               _T("ASM source file"),               2 },
     { FileFilters::SS_EXT,              _T("ASM source file"),               2 },

--- End code ---

Tim S.

ohommes:
Okay I'll try to give this patch a try soon and let you know if this allows it to open the files. I think in general all files that are added to the file types and categories which are added to the base groups should be allowed to be opened. But for now I'll try this patch. I think this should work based on what I can see in the code but nevertheless it needs testing.

Thanks in advance!!

ohommes:
Still trying to validate this patch. I am currently going through the hassle and setup of compiling CodeBlocks with a very very old gcc compiler (3.2.3). Compiling and archiving works fine from the existing 8.02 but I am battling the correct wxWidgets setup. I found a wiki that explains the steps so I'll try that and see how far it goes.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version