remote_gdb.cc (10595:25ecfc14f73f) | remote_gdb.cc (10601:6efb37480d87) |
---|---|
1/* 2 * Copyright 2014 Google, Inc. 3 * Copyright (c) 2002-2005 The Regents of The University of Michigan 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 241 unchanged lines hidden (view full) --- 250#ifdef KGDB_FP_REGS 251 for (int i = 0; i < NumFloatArchRegs; ++i) { 252 context->setFloatRegBits(i, gdbregs.regs64[i + KGDB_REG_F0]); 253 } 254#endif 255 context->pcState(gdbregs.regs64[KGDB_REG_PC]); 256} 257 | 1/* 2 * Copyright 2014 Google, Inc. 3 * Copyright (c) 2002-2005 The Regents of The University of Michigan 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 241 unchanged lines hidden (view full) --- 250#ifdef KGDB_FP_REGS 251 for (int i = 0; i < NumFloatArchRegs; ++i) { 252 context->setFloatRegBits(i, gdbregs.regs64[i + KGDB_REG_F0]); 253 } 254#endif 255 context->pcState(gdbregs.regs64[KGDB_REG_PC]); 256} 257 |
258void 259RemoteGDB::clearSingleStep() 260{ 261 DPRINTF(GDBMisc, "clearSingleStep bt_addr=%#x nt_addr=%#x\n", 262 takenBkpt, notTakenBkpt); 263 264 if (takenBkpt != 0) 265 clearTempBreakpoint(takenBkpt); 266 267 if (notTakenBkpt != 0) 268 clearTempBreakpoint(notTakenBkpt); 269} 270 271void 272RemoteGDB::setSingleStep() 273{ 274 PCState pc = context->pcState(); 275 PCState bpc; 276 bool set_bt = false; 277 278 // User was stopped at pc, e.g. the instruction at pc was not 279 // executed. 280 MachInst inst = read<MachInst>(pc.pc()); 281 StaticInstPtr si = context->getDecoderPtr()->decode(inst, pc.pc()); 282 if (si->hasBranchTarget(pc, context, bpc)) { 283 // Don't bother setting a breakpoint on the taken branch if it 284 // is the same as the next pc 285 if (bpc.pc() != pc.npc()) 286 set_bt = true; 287 } 288 289 DPRINTF(GDBMisc, "setSingleStep bt_addr=%#x nt_addr=%#x\n", 290 takenBkpt, notTakenBkpt); 291 292 setTempBreakpoint(notTakenBkpt = pc.npc()); 293 294 if (set_bt) 295 setTempBreakpoint(takenBkpt = bpc.pc()); 296} 297 | |
298// Write bytes to kernel address space for debugger. 299bool 300RemoteGDB::write(Addr vaddr, size_t size, const char *data) 301{ 302 if (BaseRemoteGDB::write(vaddr, size, data)) { 303#ifdef IMB 304 alpha_pal_imb(); 305#endif --- 14 unchanged lines hidden --- | 258// Write bytes to kernel address space for debugger. 259bool 260RemoteGDB::write(Addr vaddr, size_t size, const char *data) 261{ 262 if (BaseRemoteGDB::write(vaddr, size, data)) { 263#ifdef IMB 264 alpha_pal_imb(); 265#endif --- 14 unchanged lines hidden --- |