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 23 matching lines...) Expand all Loading... |
34 // | 34 // |
35 // See fast_source_line_resolver.h and fast_source_line_resolver_types.h | 35 // See fast_source_line_resolver.h and fast_source_line_resolver_types.h |
36 // for more documentation. | 36 // for more documentation. |
37 // | 37 // |
38 // Author: Siyang Xie (lambxsy@google.com) | 38 // Author: Siyang Xie (lambxsy@google.com) |
39 | 39 |
40 #include "google_breakpad/processor/fast_source_line_resolver.h" | 40 #include "google_breakpad/processor/fast_source_line_resolver.h" |
41 #include "processor/fast_source_line_resolver_types.h" | 41 #include "processor/fast_source_line_resolver_types.h" |
42 | 42 |
43 #include <map> | 43 #include <map> |
| 44 #include <string> |
44 #include <utility> | 45 #include <utility> |
45 | 46 |
| 47 #include "common/using_std_string.h" |
46 #include "processor/module_factory.h" | 48 #include "processor/module_factory.h" |
47 #include "processor/scoped_ptr.h" | 49 #include "processor/scoped_ptr.h" |
48 | 50 |
49 using std::map; | 51 using std::map; |
50 using std::make_pair; | 52 using std::make_pair; |
51 | 53 |
52 namespace google_breakpad { | 54 namespace google_breakpad { |
53 | 55 |
54 FastSourceLineResolver::FastSourceLineResolver() | 56 FastSourceLineResolver::FastSourceLineResolver() |
55 : SourceLineResolverBase(new FastModuleFactory) { } | 57 : SourceLineResolverBase(new FastModuleFactory) { } |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 raw + 2 * sizeof(int32_t)); | 120 raw + 2 * sizeof(int32_t)); |
119 | 121 |
120 u_int32_t prolog_size = para_uint32[0];; | 122 u_int32_t prolog_size = para_uint32[0];; |
121 u_int32_t epilog_size = para_uint32[1]; | 123 u_int32_t epilog_size = para_uint32[1]; |
122 u_int32_t parameter_size = para_uint32[2]; | 124 u_int32_t parameter_size = para_uint32[2]; |
123 u_int32_t saved_register_size = para_uint32[3]; | 125 u_int32_t saved_register_size = para_uint32[3]; |
124 u_int32_t local_size = para_uint32[4]; | 126 u_int32_t local_size = para_uint32[4]; |
125 u_int32_t max_stack_size = para_uint32[5]; | 127 u_int32_t max_stack_size = para_uint32[5]; |
126 const char *boolean = reinterpret_cast<const char*>(para_uint32 + 6); | 128 const char *boolean = reinterpret_cast<const char*>(para_uint32 + 6); |
127 bool allocates_base_pointer = (*boolean != 0); | 129 bool allocates_base_pointer = (*boolean != 0); |
128 std::string program_string = boolean + 1; | 130 string program_string = boolean + 1; |
129 | 131 |
130 return WindowsFrameInfo(type, | 132 return WindowsFrameInfo(type, |
131 prolog_size, | 133 prolog_size, |
132 epilog_size, | 134 epilog_size, |
133 parameter_size, | 135 parameter_size, |
134 saved_register_size, | 136 saved_register_size, |
135 local_size, | 137 local_size, |
136 max_stack_size, | 138 max_stack_size, |
137 allocates_base_pointer, | 139 allocates_base_pointer, |
138 program_string); | 140 program_string); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 // Apply delta rules up to and including the frame's address. | 259 // Apply delta rules up to and including the frame's address. |
258 while (delta != cfi_delta_rules_.end() && delta.GetKey() <= address) { | 260 while (delta != cfi_delta_rules_.end() && delta.GetKey() <= address) { |
259 ParseCFIRuleSet(delta.GetValuePtr(), rules.get()); | 261 ParseCFIRuleSet(delta.GetValuePtr(), rules.get()); |
260 delta++; | 262 delta++; |
261 } | 263 } |
262 | 264 |
263 return rules.release(); | 265 return rules.release(); |
264 } | 266 } |
265 | 267 |
266 } // namespace google_breakpad | 268 } // namespace google_breakpad |
OLD | NEW |