Deleted Added
sdiff udiff text old ( 13469:3090dae4115b ) new ( 13471:f41c4625aa79 )
full compact
1/*
2 * Copyright 2015 LabWare
3 * Copyright 2014 Google Inc.
4 * Copyright (c) 2010, 2013, 2016 ARM Limited
5 * All rights reserved
6 *
7 * The license below extends only to copyright in the software and shall
8 * not be construed as granting a license to any other intellectual

--- 189 unchanged lines hidden (view full) ---

198 DPRINTF(GDBAcc, "getRegs in remotegdb \n");
199
200 for (int i = 0; i < 31; ++i)
201 r.x[i] = context->readIntReg(INTREG_X0 + i);
202 r.spx = context->readIntReg(INTREG_SPX);
203 r.pc = context->pcState().pc();
204 r.cpsr = context->readMiscRegNoEffect(MISCREG_CPSR);
205
206 for (int i = 0; i < 32*4; i += 4) {
207 r.v[i + 0] = context->readFloatRegBits(i + 2);
208 r.v[i + 1] = context->readFloatRegBits(i + 3);
209 r.v[i + 2] = context->readFloatRegBits(i + 0);
210 r.v[i + 3] = context->readFloatRegBits(i + 1);
211 }
212}
213
214void
215RemoteGDB::AArch64GdbRegCache::setRegs(ThreadContext *context) const
216{
217 DPRINTF(GDBAcc, "setRegs in remotegdb \n");
218
219 for (int i = 0; i < 31; ++i)
220 context->setIntReg(INTREG_X0 + i, r.x[i]);
221 auto pc_state = context->pcState();
222 pc_state.set(r.pc);
223 context->pcState(pc_state);
224 context->setMiscRegNoEffect(MISCREG_CPSR, r.cpsr);
225 // Update the stack pointer. This should be done after
226 // updating CPSR/PSTATE since that might affect how SPX gets
227 // mapped.
228 context->setIntReg(INTREG_SPX, r.spx);
229
230 for (int i = 0; i < 32*4; i += 4) {
231 context->setFloatRegBits(i + 2, r.v[i + 0]);
232 context->setFloatRegBits(i + 3, r.v[i + 1]);
233 context->setFloatRegBits(i + 0, r.v[i + 2]);
234 context->setFloatRegBits(i + 1, r.v[i + 3]);
235 }
236}
237
238void
239RemoteGDB::AArch32GdbRegCache::getRegs(ThreadContext *context)
240{
241 DPRINTF(GDBAcc, "getRegs in remotegdb \n");
242

--- 62 unchanged lines hidden ---