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 --- 248 unchanged lines hidden (view full) --- 257} 258 259void 260BaseRemoteGDB::TrapEvent::process() 261{ 262 gdb->trap(_type); 263} 264 |
265void 266BaseRemoteGDB::SingleStepEvent::process() |
267{ |
268 if (!gdb->singleStepEvent.scheduled()) 269 gdb->scheduleInstCommitEvent(&gdb->singleStepEvent, 1); 270 gdb->trap(SIGTRAP); 271} 272 273BaseRemoteGDB::BaseRemoteGDB(System *_system, ThreadContext *c, 274 size_t cacheSize) : inputEvent(NULL), trapEvent(this), listener(NULL), 275 number(-1), fd(-1), active(false), attached(false), system(_system), 276 context(c), gdbregs(cacheSize), singleStepEvent(this) 277{ |
278 memset(gdbregs.regs, 0, gdbregs.bytes()); 279} 280 281BaseRemoteGDB::~BaseRemoteGDB() 282{ 283 if (inputEvent) 284 delete inputEvent; 285} --- 241 unchanged lines hidden (view full) --- 527 } else { 528 SETranslatingPortProxy &proxy = context->getMemProxy(); 529 proxy.writeBlob(vaddr, (uint8_t*)data, size); 530 } 531 532 return true; 533} 534 |
535void 536BaseRemoteGDB::clearSingleStep() 537{ 538 descheduleInstCommitEvent(&singleStepEvent); 539} 540 541void 542BaseRemoteGDB::setSingleStep() 543{ 544 if (!singleStepEvent.scheduled()) 545 scheduleInstCommitEvent(&singleStepEvent, 1); 546} 547 |
548PCEventQueue *BaseRemoteGDB::getPcEventQueue() 549{ 550 return &system->pcEventQueue; 551} 552 553EventQueue * 554BaseRemoteGDB::getComInstEventQueue() 555{ --- 525 unchanged lines hidden --- |