| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
| 13 // limitations under the License. | 13 // limitations under the License. |
| 14 | 14 |
| 15 #include "util/mach/exc_server_variants.h" | 15 #include "util/mach/exc_server_variants.h" |
| 16 | 16 |
| 17 #include <AvailabilityMacros.h> | 17 #include <AvailabilityMacros.h> |
| 18 #include <string.h> | 18 #include <string.h> |
| 19 | 19 |
| 20 #include <algorithm> | 20 #include <algorithm> |
| 21 #include <vector> | 21 #include <vector> |
| 22 | 22 |
| 23 #include "base/logging.h" | 23 #include "base/logging.h" |
| 24 #include "util/mac/mac_util.h" | 24 #include "util/mac/mac_util.h" |
| 25 #include "util/mach/composite_mach_message_server.h" | 25 #include "util/mach/composite_mach_message_server.h" |
| 26 #include "util/mach/exc.h" | 26 #include "util/mach/exc.h" |
| 27 #include "util/mach/excServer.h" |
| 27 #include "util/mach/exception_behaviors.h" | 28 #include "util/mach/exception_behaviors.h" |
| 28 #include "util/mach/excServer.h" | |
| 29 #include "util/mach/mach_exc.h" | 29 #include "util/mach/mach_exc.h" |
| 30 #include "util/mach/mach_excServer.h" | 30 #include "util/mach/mach_excServer.h" |
| 31 #include "util/mach/mach_message.h" | 31 #include "util/mach/mach_message.h" |
| 32 | 32 |
| 33 extern "C" { | 33 extern "C" { |
| 34 | 34 |
| 35 // These six functions are not used, and are in fact obsoleted by the other | 35 // These six functions are not used, and are in fact obsoleted by the other |
| 36 // functionality implemented in this file. The standard MIG-generated exc_server | 36 // functionality implemented in this file. The standard MIG-generated exc_server |
| 37 // (in excServer.c) and mach_exc_server (in mach_excServer.c) server dispatch | 37 // (in excServer.c) and mach_exc_server (in mach_excServer.c) server dispatch |
| 38 // routines usable with the standard mach_msg_server() function call out to | 38 // routines usable with the standard mach_msg_server() function call out to |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 792 mach_msg_type_number_t old_state_count, | 792 mach_msg_type_number_t old_state_count, |
| 793 thread_state_t new_state, | 793 thread_state_t new_state, |
| 794 mach_msg_type_number_t* new_state_count) { | 794 mach_msg_type_number_t* new_state_count) { |
| 795 if (ExceptionBehaviorHasState(behavior)) { | 795 if (ExceptionBehaviorHasState(behavior)) { |
| 796 *new_state_count = std::min(old_state_count, *new_state_count); | 796 *new_state_count = std::min(old_state_count, *new_state_count); |
| 797 memcpy(new_state, old_state, *new_state_count * sizeof(old_state[0])); | 797 memcpy(new_state, old_state, *new_state_count * sizeof(old_state[0])); |
| 798 } | 798 } |
| 799 } | 799 } |
| 800 | 800 |
| 801 } // namespace crashpad | 801 } // namespace crashpad |
| OLD | NEW |