OLD | NEW |
1 // Copyright (c) 2010 Google Inc. | 1 // Copyright (c) 2010 Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 } | 158 } |
159 | 159 |
160 // This just swaps each int64 half of the 128-bit value. | 160 // This just swaps each int64 half of the 128-bit value. |
161 // The value should also be normalized by calling Normalize128(). | 161 // The value should also be normalized by calling Normalize128(). |
162 static void Swap(uint128_struct* value) { | 162 static void Swap(uint128_struct* value) { |
163 Swap(&value->low); | 163 Swap(&value->low); |
164 Swap(&value->high); | 164 Swap(&value->high); |
165 } | 165 } |
166 | 166 |
167 // Swapping signed integers | 167 // Swapping signed integers |
168 static inline void Swap(int16_t* value) { | |
169 Swap(reinterpret_cast<uint16_t*>(value)); | |
170 } | |
171 | |
172 static inline void Swap(int32_t* value) { | 168 static inline void Swap(int32_t* value) { |
173 Swap(reinterpret_cast<uint32_t*>(value)); | 169 Swap(reinterpret_cast<uint32_t*>(value)); |
174 } | 170 } |
175 | 171 |
176 static inline void Swap(int64_t* value) { | |
177 Swap(reinterpret_cast<uint64_t*>(value)); | |
178 } | |
179 | |
180 | |
181 static inline void Swap(MDLocationDescriptor* location_descriptor) { | 172 static inline void Swap(MDLocationDescriptor* location_descriptor) { |
182 Swap(&location_descriptor->data_size); | 173 Swap(&location_descriptor->data_size); |
183 Swap(&location_descriptor->rva); | 174 Swap(&location_descriptor->rva); |
184 } | 175 } |
185 | 176 |
186 | 177 |
187 static inline void Swap(MDMemoryDescriptor* memory_descriptor) { | 178 static inline void Swap(MDMemoryDescriptor* memory_descriptor) { |
188 Swap(&memory_descriptor->start_of_memory_range); | 179 Swap(&memory_descriptor->start_of_memory_range); |
189 Swap(&memory_descriptor->memory); | 180 Swap(&memory_descriptor->memory); |
190 } | 181 } |
(...skipping 4598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4789 return NULL; | 4780 return NULL; |
4790 } | 4781 } |
4791 | 4782 |
4792 *stream = new_stream.release(); | 4783 *stream = new_stream.release(); |
4793 info->stream = *stream; | 4784 info->stream = *stream; |
4794 return *stream; | 4785 return *stream; |
4795 } | 4786 } |
4796 | 4787 |
4797 | 4788 |
4798 } // namespace google_breakpad | 4789 } // namespace google_breakpad |
OLD | NEW |