Update I386 DNB impl to fix the same errors as DNBArchImplX86_64: ('==' instead of '=') and (by value instead of by reference).

llvm-svn: 139667
This commit is contained in:
Johnny Chen
2011-09-13 23:43:18 +00:00
parent 3c53258964
commit 3ba42283f4

View File

@@ -552,7 +552,7 @@ DNBArchImplI386::ThreadWillResume()
if (kret != KERN_SUCCESS)
return;
DBG debug_state = m_state.context.dbg;
DBG &debug_state = m_state.context.dbg;
bool need_reset = false;
uint32_t i, num = NumSupportedHardwareWatchpoints();
for (i = 0; i < num; ++i)
@@ -722,13 +722,13 @@ DNBArchImplI386::SetWatchpoint(DBG &debug_state, uint32_t hw_index, nub_addr_t a
uint32_t addr_32 = addr & 0xffffffff;
switch (hw_index) {
case 0:
debug_state.__dr0 == addr_32; break;
debug_state.__dr0 = addr_32; break;
case 1:
debug_state.__dr1 == addr_32; break;
debug_state.__dr1 = addr_32; break;
case 2:
debug_state.__dr2 == addr_32; break;
debug_state.__dr2 = addr_32; break;
case 3:
debug_state.__dr3 == addr_32; break;
debug_state.__dr3 = addr_32; break;
default:
assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3");
}
@@ -741,13 +741,13 @@ DNBArchImplI386::ClearWatchpoint(DBG &debug_state, uint32_t hw_index)
debug_state.__dr7 &= ~(3 << (2*hw_index));
switch (hw_index) {
case 0:
debug_state.__dr0 == 0; break;
debug_state.__dr0 = 0; break;
case 1:
debug_state.__dr1 == 0; break;
debug_state.__dr1 = 0; break;
case 2:
debug_state.__dr2 == 0; break;
debug_state.__dr2 = 0; break;
case 3:
debug_state.__dr3 == 0; break;
debug_state.__dr3 = 0; break;
default:
assert(0 && "invalid hardware register index, must be one of 0, 1, 2, or 3");
}
@@ -831,7 +831,7 @@ DNBArchImplI386::EnableHardwareWatchpoint (nub_addr_t addr, nub_size_t size, boo
// Check to make sure we have the needed hardware support
uint32_t i = 0;
DBG debug_state = m_state.context.dbg;
DBG &debug_state = m_state.context.dbg;
for (i = 0; i < num_hw_watchpoints; ++i)
{
if (IsWatchpointVacant(debug_state, i))
@@ -866,7 +866,7 @@ DNBArchImplI386::DisableHardwareWatchpoint (uint32_t hw_index)
const uint32_t num_hw_points = NumSupportedHardwareWatchpoints();
if (kret == KERN_SUCCESS)
{
DBG debug_state = m_state.context.dbg;
DBG &debug_state = m_state.context.dbg;
if (hw_index < num_hw_points && !IsWatchpointVacant(debug_state, hw_index))
{
// Modify our local copy of the debug state, first.
@@ -892,7 +892,7 @@ DNBArchImplI386::GetHardwareWatchpointHit(nub_addr_t &addr)
DNBLogThreadedIf(LOG_WATCHPOINTS, "DNBArchImplI386::GetHardwareWatchpointHit() GetDBGState() => 0x%8.8x.", kret);
if (kret == KERN_SUCCESS)
{
DBG debug_state = m_state.context.dbg;
DBG &debug_state = m_state.context.dbg;
uint32_t i, num = NumSupportedHardwareWatchpoints();
for (i = 0; i < num; ++i)
{