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 630412 - Add "system" module
Add "system" module
Status: RESOLVED FIXED
Product: gjs
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gjs-maint
gjs-maint
Depends on:
Blocks:
 
 
Reported: 2010-09-23 14:22 UTC by Colin Walters
Modified: 2012-02-03 19:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add "system" module (6.85 KB, patch)
2010-09-23 14:22 UTC, Colin Walters
none Details | Review

Description Colin Walters 2010-09-23 14:22:45 UTC
There are three functions in here:

* addressOf: Extremely useful when debugging a gjs process with a
  native code debugger like GDB.  Add "print(imports.system.addressOf(foo))"
  for an object, then take the number it prints "12345" and paste into
  gdb like:
  p (JSObject*) 12345
* breakpoint: Wrapper for G_BREAKPOINT().  Insert a SIGTRAP which,
  if the process is under a debugger, causes a breakpoint.  Combines
  nicely with the above.
* gc: Forces a full garbage collection.
Comment 1 Colin Walters 2010-09-23 14:22:55 UTC
Created attachment 170908 [details] [review]
Add "system" module