Package com.sun.jdi.event

Examples of com.sun.jdi.event.BreakpointEvent


             */
            //req.setSuspendPolicy( EventRequest.SUSPEND_EVENT_THREAD );
            addJDIEventListener(new IJDIEventListener() {

                public boolean handleEvent(Event event, JDIDebugTarget target) {
                    BreakpointEvent entryEvent = (BreakpointEvent) event;

                    //System.out.println( entryEvent + ":" + entryEvent.location() );

                    try {
                        IThread[] tharr = getThreads();
View Full Code Here


            } else if (event instanceof VMDisconnectEvent) {
              break eventHandlingLoop;
            } else if (event instanceof BreakpointEvent || event instanceof StepEvent) {
              final ThreadReference thread;
              if (event instanceof BreakpointEvent) {
                BreakpointEvent be = (BreakpointEvent) event;
                thread = be.thread();
              } else {
                StepEvent se = (StepEvent) event;
                thread = se.thread();
                this.vm.eventRequestManager().deleteEventRequest(se.request());
              }
View Full Code Here

                    }
                  }
            //se entro a un metodo
            else if(event instanceof BreakpointEvent)
              {             
              BreakpointEvent be=(BreakpointEvent) event;
             
              //if(be.location().lineNumber()!=9)
              //{
             
              if(be.request().getProperty(((BreakpointEvent) event).thread().name())!=null)
                {
                be.request().putProperty(((BreakpointEvent) event).thread().name(), null);
                }
              else
                {
                //generar evento
                EEvent eEvent=null;
                if(!be.location().method().isConstructor())
                    generatedEvents.add(eEvent=dataManager.createMethodEntryEvent(be));
                else
                  generatedEvents.add(eEvent=dataManager.createNewObjectEvent(be));
 
                //crea method entry para desactivar method exit cuando empiece a bajar en el stack trace
                MethodEntryRequest mer = vm.eventRequestManager().createMethodEntryRequest();
                    mer.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
                    mer.addThreadFilter(be.thread());
                    mer.putProperty("threadName", be.thread().name());
                    mer.putProperty("eEvent", eEvent);
                    mer.putProperty("where", "breakpoint");
                    mer.setEnabled(true);
               
                    //crea method exit para cuando salga de este stacktrace
                MethodExitRequest mxr = vm.eventRequestManager().createMethodExitRequest();
                    mxr.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
                    mxr.addThreadFilter(be.thread());
                    mxr.putProperty("threadName", be.thread().name());
                    mxr.putProperty("eEvent", eEvent);
                    mxr.putProperty("where", "breakpoint");
                    mxr.setEnabled(true);
                }
             
View Full Code Here

            else if(event instanceof BreakpointEvent)
              {
              //System.out.println("\t\t" + event);//////////////////////
              //printStackTrace(((BreakpointEvent) event).thread());
             
              BreakpointEvent be=(BreakpointEvent) event;
              /*
              if((Boolean) be.request().getProperty("START"))
                {
                if(!be.location().method().isConstructor())
                    {
                  generatedEvents.add(dataManager.createMethodEntryEvent(be));
                    }
                else
                    {
                  generatedEvents.add(dataManager.createNewObjectEvent(be));
                    }
                }
              */
              /*if(vm.eventRequestManager().methodEntryRequests().size()==0)
                {
                MethodEntryRequest mer = vm.eventRequestManager().createMethodEntryRequest();
                    mer.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
                    mer.addThreadFilter(be.thread());
                   
                    MethodExitRequest mxr = vm.eventRequestManager().createMethodExitRequest();
                    mxr.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
                    mxr.addThreadFilter(be.thread());
                }
             
              habilitarMethodEvents=true;
              System.out.println("\t\t\t" + "solicitar eventos metodos: " + habilitarMethodEvents);//////////////////////
              */
             
//              //generar evento
              EEvent eEvent=null;
              if(!be.location().method().isConstructor())
                  {
                generatedEvents.add(eEvent=dataManager.createMethodEntryEvent(be));
                  }
              else
                  {
                generatedEvents.add(eEvent=dataManager.createNewObjectEvent(be));
                  }

                {
                //crea method entry para desactivar method exit cuando empiece a bajar en el stack trace
                MethodEntryRequest mer = vm.eventRequestManager().createMethodEntryRequest();
                    mer.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
                    mer.addThreadFilter(be.thread());
                    mer.putProperty("eEvent", eEvent);
                    mer.setEnabled(true);
               
                    //crea method exit para cuando salga de este stacktrace
                MethodExitRequest mxr = vm.eventRequestManager().createMethodExitRequest();
                    mxr.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
                    mxr.addThreadFilter(be.thread());
                    mxr.putProperty("eEvent", eEvent);
                    mxr.setEnabled(true);
                    //System.out.println("\t\t\teventID: " + eEvent.getId());
                }
//                  
View Full Code Here

             */
            //req.setSuspendPolicy( EventRequest.SUSPEND_EVENT_THREAD );
            addJDIEventListener(new IJDIEventListener() {

                public boolean handleEvent(Event event, JDIDebugTarget target) {
                    BreakpointEvent entryEvent = (BreakpointEvent) event;

                    //System.out.println( entryEvent + ":" + entryEvent.location() );

                    try {
                        IThread[] tharr = getThreads();
View Full Code Here

             */
            //req.setSuspendPolicy( EventRequest.SUSPEND_EVENT_THREAD );
            addJDIEventListener(new IJDIEventListener() {

                public boolean handleEvent(Event event, JDIDebugTarget target) {
                    BreakpointEvent entryEvent = (BreakpointEvent) event;

                    //System.out.println( entryEvent + ":" + entryEvent.location() );

                    try {
                        IThread[] tharr = getThreads();
View Full Code Here

          }
        }
        for (final EventIterator ei = es.eventIterator(); ei.hasNext();) {
          final Event e = ei.nextEvent();
          if (!done && e instanceof BreakpointEvent) {
            final BreakpointEvent be = (BreakpointEvent) e;
            final Location loc = be.location();
            final ThreadReference tr = be.thread()
            if (loc.equals(interceptIn)) {
              LocalVariable result = (LocalVariable) loc.method().variablesByName("result").get(0);
              LocalVariable buffer = (LocalVariable) loc.method().arguments().get(0);
              ArrayReference buf = (ArrayReference) tr.frame(0).getValue(buffer);
              new InputInterceptHandler(tr, buf, result).start();
View Full Code Here

                                                  watchpointEvent.location() );
                        }
                    }
                    else if ( event instanceof BreakpointEvent )
                    {
                        BreakpointEvent breakpointEvent = (BreakpointEvent) event;
                        handler.onBreakpoint( suspension, breakpointEvent.virtualMachine(), breakpointEvent.thread(),
                                              (BreakpointRequest) breakpointEvent.request(),
                                              breakpointEvent.location() );
                    }
                    else if ( event instanceof MethodEntryEvent )
                    {
                        MethodEntryEvent entryEvent = (MethodEntryEvent) event;
                        handler.onMethodEntry( suspension, entryEvent.virtualMachine(), entryEvent.thread(),
View Full Code Here

TOP

Related Classes of com.sun.jdi.event.BreakpointEvent

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.