Package org.tod.meta

Examples of org.tod.meta.BreakpointInfo


       
        IClassInfo classInfo = event.getOperationBehavior().getDeclaringType();
        String jvmName = classInfo.getJvmName();
        String fullyQualifiedClassName = jvmName.substring(1, jvmName.length() - 1);
        int line = TypeUtils.calculateLineNumber(event.getOperationBehavior(), event.getOperationBytecodeIndex());
        BreakpointInfo breakpoint = this.getTODSession().getJVMHandler().getBreakpoint(fullyQualifiedClassName, line);
        System.out.println("Breakpoint at " + fullyQualifiedClassName + ":" + line + "?");
        return breakpoint != null;
    }
View Full Code Here


     */
    public void clear() {
        Iterator<BreakpointInfo> resolved = this.resolvedBreakpoints.iterator();
        while (resolved.hasNext()) {
            try {
                BreakpointInfo bpi = resolved.next();
                BreakpointRequest bpr = this.infoToRequest.get(bpi);
                if (bpr != null) {
                    bpr.disable();
                }
            } catch (VMDisconnectedException e) {
View Full Code Here

     * Attempt to resolve all currently unresolved breakpoints.
     */
    public void attemptResolveAll() {
        Iterator<BreakpointInfo> breakpoints = this.unresolvedBreakpoints.iterator();
        while (breakpoints.hasNext()) {
            BreakpointInfo bpi = breakpoints.next();
            boolean resolved = attemptResolve(bpi);

            if (resolved) {
                // Remove this breakpoint from the unresolved queue.
                this.resolvedBreakpoints.add(bpi);
View Full Code Here

       
        try {
            Iterator<BreakpointInfo> iterator = this.unresolvedBreakpoints.iterator();
            String fullyQualifiedClassName = ref.name();
            while (iterator.hasNext()) {
                BreakpointInfo bpi = iterator.next();
                if (bpi.getClassInfo().getDotName().equals(fullyQualifiedClassName)) {
                    List<Location> locations;
                    try {
                        locations = ref.locationsOfLine(bpi.getLineNumber());
                        // Set a breakpoint at the first location.
                        if (locations.size() >= 1) {
                            EventRequestManager mgr = vm.eventRequestManager();
                            BreakpointRequest req = mgr.createBreakpointRequest(locations.get(0));
                            req.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
                            if (bpi.getCountFilter() != -1) {
                                req.addCountFilter(bpi.getCountFilter());
                            }
                            // TODO: bpi.setThread(...)
                            bpi.setMethodInfo(this.session.getClassInformationProvider().getMethodInfo(req.location().method()));
                            req.enable();
                            this.infoToRequest.put(bpi, req);
                            // This breakpoint has been satisfied. Remove it from
                            // the unsatisfied list.
                            this.resolvedBreakpoints.add(bpi);
View Full Code Here

    public void breakpointEvent(BreakpointEvent e) {
        Iterator<DebugEventListener> listeners = this.session.getEventListeners();
        while (listeners.hasNext()) {
            DebugEventListener listener = listeners.next();
            BreakpointRequest bpr = (BreakpointRequest) e.request();
            BreakpointInfo info = new BreakpointInfo();
            info.setClassInfo(this.session.getClassInformationProvider().getClassInfo(e.location().declaringType()));
            info.setMethodInfo(this.session.getClassInformationProvider().getMethodInfo(e.location().method()));
            info.setLineNumber(e.location().lineNumber());
            ThreadInfo threadInfo = this.session.getThreadTracker().getByReference(e.thread());
            this.session.getThreadTracker().setActiveThread(threadInfo);
            info.setThread(threadInfo);
            listener.breakpointReached(info);
            // TODO
            // Is this a "step into" event, or a real breakpoint?
            //if (this.expectingStepInto) {
            //listener.steppedInto((StateInfo)info);
View Full Code Here

        this.addLineBreakpoint(fullyQualifiedClassName, lineNumber, -1);
    }

    @Override
    public void addLineBreakpoint(String fullyQualifiedClassName, int lineNumber, int count) {
        BreakpointInfo bpi = new BreakpointInfo();
        bpi.setClassInfo(this.getTODSession().getClassInformationProvider().getClassInfo(fullyQualifiedClassName));
        bpi.setLineNumber(lineNumber);
        bpi.setCountFilter(count);
        this.requestManager.add(bpi);
    }
View Full Code Here

        return this.requestManager.getBreakpoint(fullyQualifiedClassName, line);
    }
   
    @Override
    public void removeLineBreakpoint(String fullyQualifiedClassName, int lineNumber) {
        BreakpointInfo bpi = new BreakpointInfo();
        bpi.setClassInfo(this.getTODSession().getClassInformationProvider().getClassInfo(fullyQualifiedClassName));
        bpi.setLineNumber(lineNumber);
        this.requestManager.remove(bpi);
    }
View Full Code Here

TOP

Related Classes of org.tod.meta.BreakpointInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.