<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'>David and Bert.<br><br>Thank you very much for the pointers.<br><br>David,<br><br>The printf-fu is strong with me! <br><br>Seriously,&nbsp; on Linux the SqueakSSL plugin never loads (or stays loaded longer than a primitive fail) so <br>that will definitely come in handy.<br><br>Thanks again.<br><br><br>tty<br><div id="1"><br>---- On Thu, 03 Apr 2014 20:01:50 -0700 <b>David T. Lewis &lt;lewis@mail.msen.com&gt;</b> wrote ---- <br></div><br><blockquote style="border-left: 1px solid #0000FF; padding-left: 6px; margin:0 0 0 5px">  <br>On Thu, Apr 03, 2014 at 01:44:42PM -0700, gettimothy wrote: <br>&gt;   <br>&gt; Howdy all. <br>&gt;  <br>&gt; I will be debugging the SqueakSSL plugin on Linux tomorrow or so and am planning on using DDD to connect to a running process and see what I can see. <br>&gt;  <br>&gt; Is this the approach you folks would use? or are there better methods for approaching this. <br>&gt;  <br> <br>Sure, connecting the debugger to the running VM process will let you debug the primitive. <br>Compile it with CFLAGS=-g (debugger symbols, no compiler optimization). It can be tricky <br>because the primitive function will not be visible until the plugin has been loaded, so <br>you can't set the breakpoint until after the plugin module is loaded, which can be annoying <br>if the primitive causes the VM to crash. <br> <br>Here is another debugging technique, but I have to warn you that it is a super top secret <br>technique known only to VM gurus, so don't let anybody know I told you about this. After <br>you generate the sources for the plugin, put some printf's in the source code to print <br>out the values of the variables or addresses or object pointers that you think may be <br>causing a problem. It's crude, but sometimes this is easier than trying to capture the <br>problem in a debugger. <br> <br>If you are debugging a plugin that works when compiled for 32-bits and crashes the VM <br>when compiled for 64-bits, the problems are usually associated with somebody trying to <br>stuff a 64-bit C pointer into a 32-bit sqInt variable. Look for this kind of problem, <br>and print the object pointers and variables with "%lx" in the printf statements. <br> <br>Put a "fflush(stdout)" after your printf statements to make sure your debugging output <br>gets flushed out to the console right away. <br> <br>Dave <br> <br></blockquote><br></div></body></html>