pc_event.cc (8232:b28d06a175be) pc_event.cc (8670:aae12ce9f34c)
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;

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

79 event->pc(), event->descr());
80
81 return true;
82}
83
84bool
85PCEventQueue::doService(ThreadContext *tc)
86{
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;

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

79 event->pc(), event->descr());
80
81 return true;
82}
83
84bool
85PCEventQueue::doService(ThreadContext *tc)
86{
87 Addr pc = tc->instAddr() & ~0x3;
87 // This will fail to break on Alpha PALcode addresses, but that is
88 // a rare use case.
89 Addr pc = tc->instAddr();
88 int serviced = 0;
89 range_t range = equal_range(pc);
90 for (iterator i = range.first; i != range.second; ++i) {
91 // Make sure that the pc wasn't changed as the side effect of
92 // another event. This for example, prevents two invocations
93 // of the SkipFuncEvent. Maybe we should have separate PC
94 // event queues for each processor?
90 int serviced = 0;
91 range_t range = equal_range(pc);
92 for (iterator i = range.first; i != range.second; ++i) {
93 // Make sure that the pc wasn't changed as the side effect of
94 // another event. This for example, prevents two invocations
95 // of the SkipFuncEvent. Maybe we should have separate PC
96 // event queues for each processor?
95 if (pc != (tc->instAddr() & ~0x3))
97 if (pc != tc->instAddr())
96 continue;
97
98 DPRINTF(PCEvent, "PC based event serviced at %#x: %s\n",
99 (*i)->pc(), (*i)->descr());
100
101 (*i)->process(tc);
102 ++serviced;
103 }

--- 54 unchanged lines hidden ---
98 continue;
99
100 DPRINTF(PCEvent, "PC based event serviced at %#x: %s\n",
101 (*i)->pc(), (*i)->descr());
102
103 (*i)->process(tc);
104 ++serviced;
105 }

--- 54 unchanged lines hidden ---