From e03958b6ad00d5a09daf0d7f8933d8d2ef4bb153 Mon Sep 17 00:00:00 2001 From: John Dallaway Date: Wed, 26 Oct 2011 16:15:43 -0400 Subject: [PATCH] Bug 341762: MIDataReadMemory problem when word_size != 1 --- .../service/command/commands/MIDataReadMemory.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataReadMemory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataReadMemory.java index fd243eb7a7e..ef3d6b29c4d 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataReadMemory.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDataReadMemory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2009, 2007 QNX Software Systems and others. + * Copyright (c) 2000, 2011 QNX Software Systems and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,6 +8,7 @@ * Contributors: * QNX Software Systems - Initial API and implementation * Ericsson AB - Modified for new DSF Reference Implementation + * John Dallaway - Accept word size bigger than 1 (Bug 341762) *******************************************************************************/ package org.eclipse.cdt.dsf.mi.service.command.commands; @@ -74,7 +75,7 @@ public class MIDataReadMemory extends MICommand { fword_size = word_size; if (offset != 0) { - setOptions(new String[] { "-o", Long.toString(offset * word_size)}); //$NON-NLS-1$ + setOptions(new String[] { "-o", Long.toString(offset)}); //$NON-NLS-1$ } String format = "x"; //$NON-NLS-1$ @@ -128,17 +129,17 @@ public class MIDataReadMemory extends MICommand { new String[] { address, format, - Integer.toString(1), // wordSize + Integer.toString(word_size), Integer.toString(rows), - Integer.toString(cols * word_size)}); + Integer.toString(cols)}); } else { setParameters( new String[] { address, format, - Integer.toString(1), // wordSize + Integer.toString(word_size), Integer.toString(rows), - Integer.toString(cols * word_size), + Integer.toString(cols), asChar.toString()}); } }