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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 (*caller_registers)[it->first] = value; | 81 (*caller_registers)[it->first] = value; |
82 } | 82 } |
83 | 83 |
84 (*caller_registers)[".ra"] = ra; | 84 (*caller_registers)[".ra"] = ra; |
85 (*caller_registers)[".cfa"] = cfa; | 85 (*caller_registers)[".cfa"] = cfa; |
86 | 86 |
87 return true; | 87 return true; |
88 } | 88 } |
89 | 89 |
90 // Explicit instantiations for 32-bit and 64-bit architectures. | 90 // Explicit instantiations for 32-bit and 64-bit architectures. |
91 template bool CFIFrameInfo::FindCallerRegs<u_int32_t>( | 91 template bool CFIFrameInfo::FindCallerRegs<uint32_t>( |
92 const RegisterValueMap<u_int32_t> ®isters, | 92 const RegisterValueMap<uint32_t> ®isters, |
93 const MemoryRegion &memory, | 93 const MemoryRegion &memory, |
94 RegisterValueMap<u_int32_t> *caller_registers) const; | 94 RegisterValueMap<uint32_t> *caller_registers) const; |
95 template bool CFIFrameInfo::FindCallerRegs<u_int64_t>( | 95 template bool CFIFrameInfo::FindCallerRegs<uint64_t>( |
96 const RegisterValueMap<u_int64_t> ®isters, | 96 const RegisterValueMap<uint64_t> ®isters, |
97 const MemoryRegion &memory, | 97 const MemoryRegion &memory, |
98 RegisterValueMap<u_int64_t> *caller_registers) const; | 98 RegisterValueMap<uint64_t> *caller_registers) const; |
99 | 99 |
100 string CFIFrameInfo::Serialize() const { | 100 string CFIFrameInfo::Serialize() const { |
101 std::ostringstream stream; | 101 std::ostringstream stream; |
102 | 102 |
103 if (!cfa_rule_.empty()) { | 103 if (!cfa_rule_.empty()) { |
104 stream << ".cfa: " << cfa_rule_; | 104 stream << ".cfa: " << cfa_rule_; |
105 } | 105 } |
106 if (!ra_rule_.empty()) { | 106 if (!ra_rule_.empty()) { |
107 if (static_cast<std::streamoff>(stream.tellp()) != 0) | 107 if (static_cast<std::streamoff>(stream.tellp()) != 0) |
108 stream << " "; | 108 stream << " "; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 void CFIFrameInfoParseHandler::RARule(const string &expression) { | 173 void CFIFrameInfoParseHandler::RARule(const string &expression) { |
174 frame_info_->SetRARule(expression); | 174 frame_info_->SetRARule(expression); |
175 } | 175 } |
176 | 176 |
177 void CFIFrameInfoParseHandler::RegisterRule(const string &name, | 177 void CFIFrameInfoParseHandler::RegisterRule(const string &name, |
178 const string &expression) { | 178 const string &expression) { |
179 frame_info_->SetRegisterRule(name, expression); | 179 frame_info_->SetRegisterRule(name, expression); |
180 } | 180 } |
181 | 181 |
182 } // namespace google_breakpad | 182 } // namespace google_breakpad |
OLD | NEW |