Dave, 

How did you use gdb to set breakpoints in your C++ add-in code, that got 
triggered after calling `node test.js`?

Thanks!

On Wednesday, June 27, 2012 at 1:19:26 AM UTC-4, Dave Horton wrote:
>
> Any suggestions along these lines welcome.  I'm writing my first C++ 
> add-in and struggling with a couple of things:
>
> 1) I can use gdb to set breakpoints in my code, but node-gyp by default 
> doesn't include symbols and I haven't been able to figure out how to get it 
> to generate debug code (non optimized, no symbols).  I tried "defines": 
> ['DEBUG'] but that didn't work....
>
> 2) I tried putting simple printf's in my code to stdout or stderr but they 
> don't appear so I assume they are being gobbled up by node some how.
>
> For a first exercise, I am simply trying to create a module that returns a 
> wrapped C++ object, with a property which when accessed in JS triggers a 
> C++ getter.  I can compile the module ok, and my test script can create an 
> instance, but it appears my getter is never called for some reason (it 
> should return an integer value of 5060 but it returns undefined).  For 
> anyone willing to point out what I assume is an obvious flaw, I have posted 
> a gist here: git://gist.github.com/3001626.git
>
> I've read the docs on nodejs.org on the basics of creating modules, but 
> if anyone knows of useful sample code for a newbie to node (knowledgeable 
> of javascript and C++) I'd appreciate the pointer.  Thanks
>

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/4cc10db8-dd16-422d-a4b1-82313ec17cdc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to