jasonbcox / rocket

ROCKET Engine
Other
1 stars 0 forks source link

Refactor Debug from the ground up #4

Open jasonbcox opened 11 years ago

jasonbcox commented 11 years ago

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