Skip to content

Commit ef70f5c

Browse files
committed
Revert "Align mach exception data before accessing it"
This reverts commit b10c2f8. Need to add the phabracator line to the message.
1 parent b10c2f8 commit ef70f5c

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

lldb/tools/debugserver/source/MacOSX/MachException.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,13 @@ catch_mach_exception_raise(mach_port_t exc_port, mach_port_t thread_port,
9595
mach_exception_data_t exc_data,
9696
mach_msg_type_number_t exc_data_count) {
9797
if (DNBLogCheckLogBit(LOG_EXCEPTIONS)) {
98-
std::vector<uint64_t> exc_datas;
99-
uint64_t tmp;
100-
for (unsigned i = 0; i < exc_data_count; ++i) {
101-
// Perform an unaligned copy.
102-
memcpy(&tmp, &exc_data[i], sizeof(uint64_t));
103-
exc_datas.push_back(tmp);
104-
}
10598
DNBLogThreaded("::%s ( exc_port = 0x%4.4x, thd_port = 0x%4.4x, tsk_port = "
10699
"0x%4.4x, exc_type = %d ( %s ), exc_data[%d] = { 0x%llx, "
107100
"0x%llx })",
108101
__FUNCTION__, exc_port, thread_port, task_port, exc_type,
109102
MachException::Name(exc_type), exc_data_count,
110-
(uint64_t)(exc_data_count > 0 ? exc_datas[0] : 0xBADDBADD),
111-
(uint64_t)(exc_data_count > 1 ? exc_datas[1] : 0xBADDBADD));
103+
(uint64_t)(exc_data_count > 0 ? exc_data[0] : 0xBADDBADD),
104+
(uint64_t)(exc_data_count > 1 ? exc_data[1] : 0xBADDBADD));
112105
}
113106
g_message->exc_type = 0;
114107
g_message->exc_data.clear();

0 commit comments

Comments
 (0)