Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Delta Between Two Patch Sets: src/processor/dump_context.cc

Issue 5684002: Refactoring in preparation for microdump processing (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk/
Left Patch Set: Revert mistakenly changed aclocal.m4 Created 10 years, 7 months ago
Right Patch Set: More alpha sorting fixes in Makefile.am Created 10 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/processor/cfi_frame_info_unittest.cc ('k') | src/processor/dump_object.cc » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const MDRawContextMIPS* DumpContext::GetContextMIPS() const { 127 const MDRawContextMIPS* DumpContext::GetContextMIPS() const {
128 if (GetContextCPU() != MD_CONTEXT_MIPS) { 128 if (GetContextCPU() != MD_CONTEXT_MIPS) {
129 BPLOG(ERROR) << "DumpContext cannot get MIPS context"; 129 BPLOG(ERROR) << "DumpContext cannot get MIPS context";
130 return NULL; 130 return NULL;
131 } 131 }
132 132
133 return context_.ctx_mips; 133 return context_.ctx_mips;
134 } 134 }
135 135
136 bool DumpContext::GetInstructionPointer(uint64_t* ip) const { 136 bool DumpContext::GetInstructionPointer(uint64_t* ip) const {
137 BPLOG_IF(ERROR, !ip) << "MinidumpContext::GetInstructionPointer " 137 BPLOG_IF(ERROR, !ip) << "DumpContext::GetInstructionPointer requires |ip|";
138 "requires |ip|";
139 assert(ip); 138 assert(ip);
140 *ip = 0; 139 *ip = 0;
141 140
142 if (!valid_) { 141 if (!valid_) {
143 BPLOG(ERROR) << "Invalid MinidumpContext for GetInstructionPointer"; 142 BPLOG(ERROR) << "Invalid DumpContext for GetInstructionPointer";
144 return false; 143 return false;
145 } 144 }
146 145
147 switch (GetContextCPU()) { 146 switch (GetContextCPU()) {
148 case MD_CONTEXT_AMD64: 147 case MD_CONTEXT_AMD64:
149 *ip = GetContextAMD64()->rip; 148 *ip = GetContextAMD64()->rip;
150 break; 149 break;
151 case MD_CONTEXT_ARM: 150 case MD_CONTEXT_ARM:
152 *ip = GetContextARM()->iregs[MD_CONTEXT_ARM_REG_PC]; 151 *ip = GetContextARM()->iregs[MD_CONTEXT_ARM_REG_PC];
153 break; 152 break;
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 break; 596 break;
598 } 597 }
599 598
600 default: { 599 default: {
601 break; 600 break;
602 } 601 }
603 } 602 }
604 } 603 }
605 604
606 } // namespace google_breakpad 605 } // namespace google_breakpad
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted