GNOME Bugzilla – Bug 641391
re-add debugger module, with a nativeTrap() function which calls G_BREAKPOINT
Last modified: 2011-02-17 21:03:07 UTC
I've re-added the debugger module with a nativeTrap() function which just calls G_BREAKPOINT(). When debugging code inside callbacks (ie, signal emissions, idle and timeout callbacks, etc.) this makes it easier to break in gdb and see what the unmanaged call stack is at that point. I'm attaching a patch against current gjs master.
Created attachment 181145 [details] [review] proposed patch Oops, apparently I forgot to attach the actual patch.
Created attachment 181147 [details] [review] proposed patch Oops, last patch was against an older version of gjs. This one is against recent master.
Review of attachment 181147 [details] [review]: Looks good to me.
Thanks. Pushed to gjs master: 665f283 bring back debugger module, with a nativeTrap() which calls G_BREAKPOINT
you broke it! CC debugger_la-debugger.lo modules/debugger.c: In function 'gjs_define_debugger_stuff': modules/debugger.c:49:31: error: 'GJS_MODULE_PROP_FLAGS' undeclared (first use in this function) modules/debugger.c:49:31: note: each undeclared identifier is reported only once for each function it appears in modules/debugger.c:49:28: warning: passing argument 4 of 'JS_DefineFunction' from incompatible pointer type [enabled by default] /usr/include/xulrunner-sdk-2/jsapi.h:2608:1: note: expected 'JSNative' but argument is of type 'JSBool (*)(struct JSContext *, struct JSObject *, uintN, jsval *, jsval *)' modules/debugger.c: At top level: modules/debugger.c:55:28: error: expected declaration specifiers or '...' before string constant modules/debugger.c:55:40: error: expected declaration specifiers or '...' before 'gjs_define_debugger_stuff' make[1]: *** [debugger_la-debugger.lo] Error 1
Created attachment 181166 [details] [review] debugger: fix build.
Eek! Sorry, I guess I wasn't against latest master. Jasper, your patch looks good to me.
Joe can you commit it?
Yep, done.