OLD | NEW |
1 // Copyright (c) 2014 Google Inc. | 1 // Copyright (c) 2014 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 const MDRawContextMIPS* GetContextMIPS() const; | 60 const MDRawContextMIPS* GetContextMIPS() const; |
61 const MDRawContextPPC* GetContextPPC() const; | 61 const MDRawContextPPC* GetContextPPC() const; |
62 const MDRawContextPPC64* GetContextPPC64() const; | 62 const MDRawContextPPC64* GetContextPPC64() const; |
63 const MDRawContextSPARC* GetContextSPARC() const; | 63 const MDRawContextSPARC* GetContextSPARC() const; |
64 const MDRawContextX86* GetContextX86() const; | 64 const MDRawContextX86* GetContextX86() const; |
65 | 65 |
66 // A convenience method to get the instruction pointer out of the | 66 // A convenience method to get the instruction pointer out of the |
67 // MDRawContext, since it varies per-CPU architecture. | 67 // MDRawContext, since it varies per-CPU architecture. |
68 bool GetInstructionPointer(uint64_t* ip) const; | 68 bool GetInstructionPointer(uint64_t* ip) const; |
69 | 69 |
| 70 // Similar to the GetInstructionPointer method, this method gets the stack |
| 71 // pointer for all CPU architectures. |
| 72 bool GetStackPointer(uint64_t* sp) const; |
| 73 |
70 // Print a human-readable representation of the object to stdout. | 74 // Print a human-readable representation of the object to stdout. |
71 void Print(); | 75 void Print(); |
72 | 76 |
73 protected: | 77 protected: |
74 DumpContext(); | 78 DumpContext(); |
75 | 79 |
76 // Sets row CPU-specific context data for the names CPU type. | 80 // Sets row CPU-specific context data for the names CPU type. |
77 void SetContextFlags(uint32_t context_flags); | 81 void SetContextFlags(uint32_t context_flags); |
78 void SetContextX86(MDRawContextX86* x86); | 82 void SetContextX86(MDRawContextX86* x86); |
79 void SetContextPPC(MDRawContextPPC* ppc); | 83 void SetContextPPC(MDRawContextPPC* ppc); |
(...skipping 23 matching lines...) Expand all Loading... |
103 MDRawContextMIPS* ctx_mips; | 107 MDRawContextMIPS* ctx_mips; |
104 } context_; | 108 } context_; |
105 | 109 |
106 // Store this separately because of the weirdo AMD64 context | 110 // Store this separately because of the weirdo AMD64 context |
107 uint32_t context_flags_; | 111 uint32_t context_flags_; |
108 }; | 112 }; |
109 | 113 |
110 } // namespace google_breakpad | 114 } // namespace google_breakpad |
111 | 115 |
112 #endif // GOOGLE_BREAKPAD_PROCESSOR_DUMP_CONTEXT_H__ | 116 #endif // GOOGLE_BREAKPAD_PROCESSOR_DUMP_CONTEXT_H__ |
OLD | NEW |