After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 641391 - re-add debugger module, with a nativeTrap() function which calls G_BREAKPOINT
re-add debugger module, with a nativeTrap() function which calls G_BREAKPOINT
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
0.7.x
Other Linux
: Normal enhancement
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-03 18:30 UTC by Joe Shaw
Modified: 2011-02-17 21:03 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.55 KB, patch)
2011-02-17 16:15 UTC, Joe Shaw
none Details | Review
proposed patch (5.29 KB, patch)
2011-02-17 16:17 UTC, Joe Shaw
accepted-commit_now Details | Review
debugger: fix build. (610 bytes, patch)
2011-02-17 20:26 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review

Description Joe Shaw 2011-02-03 18:30:40 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.
Comment 1 Joe Shaw 2011-02-17 16:15:52 UTC
Created attachment 181145 [details] [review]
proposed patch

Oops, apparently I forgot to attach the actual patch.
Comment 2 Joe Shaw 2011-02-17 16:17:51 UTC
Created attachment 181147 [details] [review]
proposed patch

Oops, last patch was against an older version of gjs.  This one is against recent master.
Comment 3 Johan (not receiving bugmail) Dahlin 2011-02-17 17:16:30 UTC
Review of attachment 181147 [details] [review]:

Looks good to me.
Comment 4 Johan (not receiving bugmail) Dahlin 2011-02-17 17:16:31 UTC
Review of attachment 181147 [details] [review]:

Looks good to me.
Comment 5 Joe Shaw 2011-02-17 19:13:41 UTC
Thanks.  Pushed to gjs master:

665f283 bring back debugger module, with a nativeTrap() which calls G_BREAKPOINT
Comment 6 Dan Winship 2011-02-17 20:17:55 UTC
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
Comment 7 Jasper St. Pierre (not reading bugmail) 2011-02-17 20:26:37 UTC
Created attachment 181166 [details] [review]
debugger: fix build.
Comment 8 Joe Shaw 2011-02-17 20:35:39 UTC
Eek!  Sorry, I guess I wasn't against latest master.

Jasper, your patch looks good to me.
Comment 9 Colin Walters 2011-02-17 20:56:25 UTC
Joe can you commit it?
Comment 10 Joe Shaw 2011-02-17 21:03:07 UTC
Yep, done.