LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cvs-checkins > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: cvs at opencores.org<cvs@o...>
    Date: Tue Dec 18 03:31:27 CET 2007
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/07/12 18:03:31

    Modified: jop/java/tools/src/com/jopdesign/debug/jdwp
    SymbolManager.java
    Log:
    Methods added:

    356: public int getMethodSizeInWords(int methodPointer)

    388: public int getMethodSizeInBytes(int methodPointer)

    400: public boolean isValidInstructionOffset(int methodStructPointer, int offset)


    Revision Changes Path
    1.4 jop/java/tools/src/com/jopdesign/debug/jdwp/SymbolManager.java

    http://www.opencores.org/cvsweb.shtml/jop/java/tools/src/com/jopdesign/debug/jdwp/SymbolManager.java.diff?r1=1.3&r2=1.4

    (In the diff below, changes in quantity of whitespace are not shown.)

    Index: SymbolManager.java
    ===================================================================
    RCS file: /cvsroot/paulo/jop/java/tools/src/com/jopdesign/debug/jdwp/SymbolManager.java,v
    retrieving revision 1.3
    retrieving revision 1.4
    diff -u -b -r1.3 -r1.4
    --- SymbolManager.java 29 Nov 2007 15:11:27 -0000 1.3
    +++ SymbolManager.java 18 Dec 2007 02:31:27 -0000 1.4
    @@ -347,6 +347,27 @@
    }

    /**
    + * Get the method size in words. If the method pointer is not valid,
    + * return -1.
    + *
    + * @param methodPointer
    + * @return
    + */
    + public int getMethodSizeInWords(int methodPointer)
    + {
    + if(isValidMethodStructurePointer(methodPointer))
    + {
    + SymbolTable table = getSymbolTable();
    + int methodId = table.getMethodSizeInWords(methodPointer);
    + return methodId;
    + }
    + else
    + {
    + return -1;
    + }
    + }
    +
    + /**
    * Get the method size in bytes.
    *
    * @param className
    @@ -357,4 +378,38 @@
    {
    return 4 * getMethodSizeInWords(className, methodSignature);
    }
    +
    + /**
    + * Get the method size in bytes.
    + *
    + * @param methodPointer
    + * @return
    + */
    + public int getMethodSizeInBytes(int methodPointer)
    + {
    + return 4 * getMethodSizeInWords(methodPointer);
    + }
    +
    + /**
    + * Check if a given offset is valid for a method pointer.
    + *
    + * @param methodStructPointer
    + * @param offset
    + * @return
    + */
    + public boolean isValidInstructionOffset(int methodStructPointer, int offset)
    + {
    + boolean result = false;
    +
    + if(isValidMethodStructurePointer(methodStructPointer))
    + {
    + int size = getMethodSizeInBytes(methodStructPointer);
    + if(0 <= offset && offset < size)
    + {
    + result = true;
    + }
    + }
    +
    + return result;
    + }
    }



     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.