remote_gdb.cc (13468:1c6a93604421) remote_gdb.cc (13469:3090dae4115b)
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

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

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]);
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

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

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 context->pcState(r.pc);
221 auto pc_state = context->pcState();
222 pc_state.set(r.pc);
223 context->pcState(pc_state);
222 context->setMiscRegNoEffect(MISCREG_CPSR, r.cpsr);
223 // Update the stack pointer. This should be done after
224 // updating CPSR/PSTATE since that might affect how SPX gets
225 // mapped.
226 context->setIntReg(INTREG_SPX, r.spx);
227
228 for (int i = 0; i < 32*4; i += 4) {
229 context->setFloatRegBits(i + 2, r.v[i + 0]);

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

277 context->setIntReg(INTREG_R7, r.gpr[7]);
278 context->setIntReg(INTREG_R8, r.gpr[8]);
279 context->setIntReg(INTREG_R9, r.gpr[9]);
280 context->setIntReg(INTREG_R10, r.gpr[10]);
281 context->setIntReg(INTREG_R11, r.gpr[11]);
282 context->setIntReg(INTREG_R12, r.gpr[12]);
283 context->setIntReg(INTREG_SP, r.gpr[13]);
284 context->setIntReg(INTREG_LR, r.gpr[14]);
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]);

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

279 context->setIntReg(INTREG_R7, r.gpr[7]);
280 context->setIntReg(INTREG_R8, r.gpr[8]);
281 context->setIntReg(INTREG_R9, r.gpr[9]);
282 context->setIntReg(INTREG_R10, r.gpr[10]);
283 context->setIntReg(INTREG_R11, r.gpr[11]);
284 context->setIntReg(INTREG_R12, r.gpr[12]);
285 context->setIntReg(INTREG_SP, r.gpr[13]);
286 context->setIntReg(INTREG_LR, r.gpr[14]);
285 context->pcState(r.gpr[15]);
287 auto pc_state = context->pcState();
288 pc_state.set(r.gpr[15]);
289 context->pcState(pc_state);
286
287 // One day somebody will implement transfer of FPRs correctly.
288
289 context->setMiscReg(MISCREG_FPSCR, r.fpscr);
290 context->setMiscRegNoEffect(MISCREG_CPSR, r.cpsr);
291}
292
293BaseGdbRegCache*
294RemoteGDB::gdbRegs()
295{
296 if (inAArch64(context()))
297 return &regCache64;
298 else
299 return &regCache32;
300}
290
291 // One day somebody will implement transfer of FPRs correctly.
292
293 context->setMiscReg(MISCREG_FPSCR, r.fpscr);
294 context->setMiscRegNoEffect(MISCREG_CPSR, r.cpsr);
295}
296
297BaseGdbRegCache*
298RemoteGDB::gdbRegs()
299{
300 if (inAArch64(context()))
301 return &regCache64;
302 else
303 return &regCache32;
304}