Changeset 43096 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Apr 30, 2009, 2:38:01 PM (16 years ago)
Author:
[email protected]
Message:

Add function to CallFrame for dumping the current JS caller

Reviewed by Gavin Barraclough.

Added debug only method CallFrame::dumpCaller() that provide the call location
of the deepest currently executing JS function.

Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r43090 r43096  
     12009-04-30  Oliver Hunt  <[email protected]>
     2
     3        Reviewed by Gavin Barraclough.
     4
     5        Add function to CallFrame for dumping the current JS caller
     6
     7        Added debug only method CallFrame::dumpCaller() that provide the call location
     8        of the deepest currently executing JS function.
     9
     10        * interpreter/CallFrame.cpp:
     11        (JSC::CallFrame::dumpCaller):
     12        * interpreter/CallFrame.h:
     13
    1142009-04-30  Maciej Stachowiak  <[email protected]>
    215
  • trunk/JavaScriptCore/interpreter/CallFrame.cpp

    r42989 r43096  
    2828
    2929#include "CodeBlock.h"
     30#include "Interpreter.h"
    3031
    3132namespace JSC {
     
    3637}
    3738
     39#ifndef NDEBUG
     40void CallFrame::dumpCaller()
     41{
     42    int signedLineNumber;
     43    intptr_t sourceID;
     44    UString urlString;
     45    JSValuePtr function;
     46   
     47    interpreter()->retrieveLastCaller(this, signedLineNumber, sourceID, urlString, function);
     48    printf("Callpoint => %s:%d\n", urlString.ascii(), signedLineNumber);
    3849}
     50#endif
     51
     52}
  • trunk/JavaScriptCore/interpreter/CallFrame.h

    r43037 r43096  
    8484        Interpreter* interpreter() { return globalData().interpreter; }
    8585        Heap* heap() { return &globalData().heap; }
    86 
     86#ifndef NDEBUG
     87        void dumpCaller();
     88#endif
    8789        static const HashTable* arrayTable(CallFrame* callFrame) { return callFrame->globalData().arrayTable; }
    8890        static const HashTable* dateTable(CallFrame* callFrame) { return callFrame->globalData().dateTable; }
Note: See TracChangeset for help on using the changeset viewer.