1
/*******************************************************************************
2
* Copyright (c) 2000, 2006 QNX Software Systems and others.
3
* All rights reserved. This program and the accompanying materials
4
* are made available under the terms of the Eclipse Public License v1.0
5
* which accompanies this distribution, and is available at
6
* http://www.eclipse.org/legal/epl-v10.html
9
* QNX Software Systems - Initial API and implementation
10
*******************************************************************************/
11
package org.eclipse.cdt.debug.mi.core.cdi.event;
13
import java.math.BigInteger;
14
import java.util.ArrayList;
15
import java.util.List;
17
import org.eclipse.cdt.debug.core.cdi.event.ICDIMemoryChangedEvent;
18
import org.eclipse.cdt.debug.core.cdi.model.ICDIObject;
19
import org.eclipse.cdt.debug.mi.core.cdi.Session;
20
import org.eclipse.cdt.debug.mi.core.cdi.model.MemoryBlock;
21
import org.eclipse.cdt.debug.mi.core.event.MIMemoryChangedEvent;
25
public class MemoryChangedEvent implements ICDIMemoryChangedEvent {
29
MIMemoryChangedEvent miMem;
31
public MemoryChangedEvent(Session s, MemoryBlock block, MIMemoryChangedEvent mem) {
38
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEvent#getAddresses()
40
public BigInteger[] getAddresses() {
41
/* But only returns the address that are in the block. */
42
BigInteger[] mi_addresses = miMem.getAddresses();
43
List aList = new ArrayList(mi_addresses.length);
44
for (int i = 0; i < mi_addresses.length; i++) {
45
if (source.contains(mi_addresses[i])) {
46
aList.add(mi_addresses[i]);
49
return (BigInteger[]) aList.toArray(new BigInteger[aList.size()]);
53
* @see org.eclipse.cdt.debug.core.cdi.event.ICDIEvent#getSource()
55
public ICDIObject getSource() {