remote_gdb.cc (10599:910fc5624d68) 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

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

257}
258
259void
260BaseRemoteGDB::TrapEvent::process()
261{
262 gdb->trap(_type);
263}
264
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
265BaseRemoteGDB::BaseRemoteGDB(System *_system, ThreadContext *c, size_t cacheSize)
266 : inputEvent(NULL), trapEvent(this), listener(NULL), number(-1), fd(-1),
267 active(false), attached(false),
268 system(_system), context(c),
269 gdbregs(cacheSize)
265void
266BaseRemoteGDB::SingleStepEvent::process()
270{
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{
271 memset(gdbregs.regs, 0, gdbregs.bytes());
272}
273
274BaseRemoteGDB::~BaseRemoteGDB()
275{
276 if (inputEvent)
277 delete inputEvent;
278}

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

520 } else {
521 SETranslatingPortProxy &proxy = context->getMemProxy();
522 proxy.writeBlob(vaddr, (uint8_t*)data, size);
523 }
524
525 return true;
526}
527
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
528PCEventQueue *BaseRemoteGDB::getPcEventQueue()
529{
530 return &system->pcEventQueue;
531}
532
533EventQueue *
534BaseRemoteGDB::getComInstEventQueue()
535{

--- 525 unchanged lines hidden ---
548PCEventQueue *BaseRemoteGDB::getPcEventQueue()
549{
550 return &system->pcEventQueue;
551}
552
553EventQueue *
554BaseRemoteGDB::getComInstEventQueue()
555{

--- 525 unchanged lines hidden ---