Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Custom Watch Script Pluggins

<< < (8/10) > >>

mandrav:

--- Quote from: Game_Ender on January 27, 2006, 05:39:12 pm ---That is very cool, awesome job Mandrav.  That looks like it is clean and should be pretty independent.  But like mentioned above, when you are doing some complicated like STL vectors and such you might have to use library specific names, is there some way to for script to detect what compiler you are using so it can react accordingly?

--- End quote ---

My tests with std::vector show that there is no other way than using vector._M_impl._M_start to access its elements, which binds the script to a specific compiler implementation (gcc-3.4.4 in this case).

BUT

I could add some script constants for the used compiler/debugger so the script could return different data for different compilers.
I believe this will be settled this weekend.

takeshimiya:
You mean, not really based on the compiler, but based on the stl implementation, right? Like detecting if it's libstdc++, stlport, sgi stl, etc.

mandrav:
Yes, all it comes down to is the STL implementation.

Game_Ender:

--- Quote from: Takeshi Miya on January 27, 2006, 06:07:41 pm ---You mean, not really based on the compiler, but based on the stl implementation, right? Like detecting if it's libstdc++, stlport, sgi stl, etc.

--- End quote ---

Would there be an easy way to do this through scripting?  I know it will be pretty to easy to check the constants as Mandrav posted above and then you can infer the stl implementation based on the compiler.  You would probably have to code some new methods into the debugger so that it searches the library include paths, checks all the linker settings, and checks compiler version to figure out the proper STL version.  That would get complicated and might not be worth the effort.

takeshimiya:

--- Quote from: Game_Ender on January 27, 2006, 07:31:51 pm ---
--- Quote from: Takeshi Miya on January 27, 2006, 06:07:41 pm ---You mean, not really based on the compiler, but based on the stl implementation, right? Like detecting if it's libstdc++, stlport, sgi stl, etc.

--- End quote ---

Would there be an easy way to do this through scripting?  I know it will be pretty to easy to check the constants as Mandrav posted above and then you can infer the stl implementation based on the compiler.  You would probably have to code some new methods into the debugger so that it searches the library include paths, checks all the linker settings, and checks compiler version to figure out the proper STL version.  That would get complicated and might not be worth the effort.

--- End quote ---

A good source would be to see how STL decryptor detects the different stl implementations.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version