Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Splitting debugger in two - specific debugger and common GUI

<< < (44/136) > >>

oBFusCATed:
One more change I have in my working copy is this:


--- Code: ---===================================================================
--- sdk/globals.cpp     (revision 6372)
+++ sdk/globals.cpp     (working copy)
@@ -210,6 +210,9 @@
 {
     wxString ext = filename.AfterLast(_T('.')).Lower();
 
+    if (ext.find(wxT('/')) != wxString::npos)
+        return ftHeader;
+
     if (ext.IsSameAs(FileFilters::ASM_EXT) ||
         ext.IsSameAs(FileFilters::C_EXT) ||
         ext.IsSameAs(FileFilters::CC_EXT) ||
Index: sdk/cbplugin.cpp
===================================================================
--- sdk/cbplugin.cpp    (revision 6372)
+++ sdk/cbplugin.cpp    (working copy)
@@ -254,7 +254,7 @@
         }
     }
     FileType ft = FileTypeOf(filename);
-    if (ft != ftSource && ft != ftHeader && ft != ftResource)
+    if ((ft != ftSource && ft != ftHeader && ft != ftResource) || line < 0)
     {
         if(log_index != -1)
         {

--- End code ---

I've added it in order to enabled switching to frames inside headers from the C++'s standard library (vector, string, exception, etc).
I know this is not the right solution, but I'm not sure it if can be done without hacks.
Any suggestions are welcome and desired!

MortenMacFly:

--- Quote from: oBFusCATed on June 29, 2010, 01:08:34 am ---OK, two new patches:

--- End quote ---
Applied and merged with trunk. The latter is untested... just take it as a warning. I just came back and have other things to do before testing this myself...

oBFusCATed:
Morten: Latter should be the CDB's patch, shouldn't it?
What about the header hack, do you know a better way to handle this?

MortenMacFly:

--- Quote from: oBFusCATed on July 12, 2010, 12:42:16 pm ---Morten: Latter should be the CDB's patch, shouldn't it?

--- End quote ---
Yes.


--- Quote from: oBFusCATed on July 12, 2010, 12:42:16 pm ---What about the header hack, do you know a better way to handle this?

--- End quote ---
I don't know a better way. A file without an extension could be ANYTHING. So it's really a hack and surely will introduce side-effects. The question is if these side-effects are critical and if the benefits are worth it.

oBFusCATed:
I could move this check to the cbDebuggerPlugin, so the damage could be limited a bit :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version