pc_event.cc (8793:5f25086326ac) | pc_event.cc (8798:adaa92be9037) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 69 unchanged lines hidden (view full) --- 78 event->pc(), event->descr()); 79 80 return true; 81} 82 83bool 84PCEventQueue::doService(ThreadContext *tc) 85{ | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 69 unchanged lines hidden (view full) --- 78 event->pc(), event->descr()); 79 80 return true; 81} 82 83bool 84PCEventQueue::doService(ThreadContext *tc) 85{ |
86 Addr pc = tc->instAddr() & ~0x3; | 86 // This will fail to break on Alpha PALcode addresses, but that is 87 // a rare use case. 88 Addr pc = tc->instAddr(); |
87 int serviced = 0; 88 range_t range = equal_range(pc); 89 for (iterator i = range.first; i != range.second; ++i) { 90 // Make sure that the pc wasn't changed as the side effect of 91 // another event. This for example, prevents two invocations 92 // of the SkipFuncEvent. Maybe we should have separate PC 93 // event queues for each processor? | 89 int serviced = 0; 90 range_t range = equal_range(pc); 91 for (iterator i = range.first; i != range.second; ++i) { 92 // Make sure that the pc wasn't changed as the side effect of 93 // another event. This for example, prevents two invocations 94 // of the SkipFuncEvent. Maybe we should have separate PC 95 // event queues for each processor? |
94 if (pc != (tc->instAddr() & ~0x3)) | 96 if (pc != tc->instAddr()) |
95 continue; 96 97 DPRINTF(PCEvent, "PC based event serviced at %#x: %s\n", 98 (*i)->pc(), (*i)->descr()); 99 100 (*i)->process(tc); 101 ++serviced; 102 } --- 52 unchanged lines hidden --- | 97 continue; 98 99 DPRINTF(PCEvent, "PC based event serviced at %#x: %s\n", 100 (*i)->pc(), (*i)->descr()); 101 102 (*i)->process(tc); 103 ++serviced; 104 } --- 52 unchanged lines hidden --- |