Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [dsdp-dd-dev] Updating registers view when memory changes?

> -----Original Message-----
> From: dsdp-dd-dev-bounces@xxxxxxxxxxx 
> [mailto:dsdp-dd-dev-bounces@xxxxxxxxxxx] On Behalf Of Norman Yee
> Sent: Thursday, April 09, 2009 4:03 PM
> To: dsdp-dd-dev@xxxxxxxxxxx
> Subject: [dsdp-dd-dev] Updating registers view when memory changes?
> 
> 
> I'm working on a custom debugger plugin and I'm running into 
> a problem where the registers view doesn't get updated when 
> you change memory in the memory view.  The two views need to 
> be synchronized when a memory mapped register is changed.  Is 
> this something that should be implemented in my custom 
> debugger plugin or is it something that should be handled in 
> the framework?
> 
> I'm trying to work around this problem by modifying my 
> registers DSF service class to handle the memory changed 
> event like this:
> 
> public class Registers extends AbstractDsfService 
>     implements IRegisters, IEventListener {
> 
> 	@DsfServiceEventHandler
> 	public void eventDispatched(IMemoryChangedEvent e) {
> 
> 	}	
> }
> 
> Then in my eventDispatched(), I want to force the contents of 
> the registers view to refresh.  How do I do that?  Thanks in advance.

Hi,

If you want the registers view to refresh on a memory event
it is not the register service that must listen for the memory event
but the register view model.

If you look in RegisterVMNode getDeltaFlags() and buildDelta(), it
already handles the IMemoryChangedEvent to trigger a refresh.  My
guess is that it should work for your debugger automatically.

Marc


Back to the top