Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-debug-dev] Implementing View in Debugger


Hi all!!!!

I have a task to create a view in CDT Debugger Model. This view should behave itself like Memory or Register View - for example, it must be always refreshed  after step action. I almost understood technology of implementing views to Debugger Model but one thing I can't understand.  

So, I created class ModelViewEventHandler where I situated such fragment


        protected void doHandleDebugEvents( DebugEvent[] events )
        {
                for( int i = 0; i < events.length; i++ )
                {
                        DebugEvent event = events[i];
                        switch( event.getKind() )
                        {
                                case DebugEvent.CHANGE :
                                        if ( event.getDetail() == DebugEvent.STATE )
                                        {
                                                // only process variable state changes
                                                if ( event.getSource() instanceof ModelManager )
                                                {
//                                                        refresh( event.getSource() );
                            ((ModelViewer)getViewer()).setInput(event.getSource());                                                        
                                                }
                                        }
                        }
                }
        }

There I want to catch debug event with source equals "ModelManager". Earlier  I  defined this class like
       
     public ModelManager( CDebugTarget target )
     {
                super( target );
                getCDISession().getEventManager().addEventListener( this );        
     }

So, I decided that it is enough actions in order to get debug events with source I need. But I was wrong because usually I catch events with source equals "CStackFrame" or "CFormattedMemoryBlock" and not "ModelManager".

Where did I make a mistake? What should I do in order to make Debugger model to send events with source I need?



Thanks in advance,
 Igor S. Zamyatin

 Interstron Ltd.
----------------------------------------
email:  isz@xxxxxxxxxxxxx
tel:    +7 (095) 269-4713
cell:   +7 (902) 659-5838
www:    http://www.interstron.ru

Back to the top