Hi,

I'm currently doing a research project that involves modifying the V8 code 
to gather some information about the JS execution (e.g., stack traces, JIT 
code address info, DOM element modifications, etc.). FYI, I'm running 
Chrome on my Surface 3, which is running Windows 10 Home (64-bit). I'm 
using Microsoft Visual Studio 12.0 to build (and debug) Chrome.

Right now, I'm simply trying to see how I can output the stack trace to a 
file right before an error message is shown. To do so, I modified the 
Isolate::ReportPendingMessages() function in isolate.cc to include the 
following code:

void Isolate::ReportPendingMessages() {
   ...
   if (!message_obj->IsTheHole() && should_report_exception) {
      /*NEW CODE STARTS HERE*/
      //First, get the stack trace string
      Handle<String> st = StackTraceString();

      //Next, set up the output file using fopen
      FILE * pFile;
      pFile = fopen("C:\\sample_outputs\\jsbt_outputs_stack.txt", "w");
      if (pFile != NULL) {
         st->PrintOn(pFile);
      }
      else {
         int a = errno;
         ...
      }
      /*NEW CODE ENDS HERE*/
      ...
   }
}

The problem is, when I run this code, fopen() always returns NULL, with an 
errno of 13 (which means "Permission denied"). I've tried various 
combinations of several things, including running my Chrome exe in admin 
mode and changing the permissions for the output folder, but the same thing 
happens (i.e., errno set to 13).

Your help is much appreciated. Thanks in advance!

Frolin

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to