Debug has poor performance and design in general. Rebuild it so that it satisfies these requirements in a reasonable fashion:
[ ] Debug Logger (must be able to print to terminal and files, with multiple debug levels)
[x] Assertion Handler to throw errors and kill the program while also displaying useful information
[ ] Complex breakpoints (ex: A stateful breakpoint such that if local variable x results in the same value five times, then break) [2]
[ ] Make a DebugTimer object that reports its time upon destruction
Some ideas for a completely revamped/awesome debug framework: (consider making a new ticket for these if you don't have enough time to implement them for version 1.0)
Statistics on the number of calls of member functions [1]
Statistics on uses of classes (which class has the slowest function calls, etc) [1]
[1.a] See http://www.stroustrup.com/wrapper.pdf for somewhat unintrusive wrapper classes
[1.b] An idea is to use a DebugTimer object that counts the timings of each call and then collects averages and other useful information. Include a function to reset all of these sorts of timers each frame.
[2.a] An idea for this is to output debug messages to cerr and then immediately raise( SIGTRAP ); to break. In GDB, do 'finish' to step out of the raise() call.
[2.b] Another idea is to write a script that generates a list of breakpoints that can be loaded into GDB using -x filename
Debug has poor performance and design in general. Rebuild it so that it satisfies these requirements in a reasonable fashion:
Some ideas for a completely revamped/awesome debug framework: (consider making a new ticket for these if you don't have enough time to implement them for version 1.0)
[0] Consider this for hashtables used in this implementation: http://nguillemot.blogspot.com/2012/06/side-story-compile-time-string-hashing.html
[1.a] See http://www.stroustrup.com/wrapper.pdf for somewhat unintrusive wrapper classes [1.b] An idea is to use a DebugTimer object that counts the timings of each call and then collects averages and other useful information. Include a function to reset all of these sorts of timers each frame.
[2.a] An idea for this is to output debug messages to cerr and then immediately raise( SIGTRAP ); to break. In GDB, do 'finish' to step out of the raise() call. [2.b] Another idea is to write a script that generates a list of breakpoints that can be loaded into GDB using -x filename