Issue 49012: Breakpad Processor: Rename 'StackFrameInfo' structure to 'WindowsFrameInfo'.

Also, rename stack_frame_info.h to windows_frame_info.h.

If it seems odd to have functions like FillSourceLineInfo returning
Windows-specific data structures... well, it is! This patch just makes
it more obvious what's going on.

a=jimblandy, r=nealsid


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@471 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
jimblandy 2009-12-23 22:32:14 +00:00
parent 92b1f834d1
commit b64d76a3b8
19 changed files with 55 additions and 55 deletions

View file

@ -91,7 +91,7 @@ src_libbreakpad_la_SOURCES = \
src/processor/scoped_ptr.h \ src/processor/scoped_ptr.h \
src/processor/simple_symbol_supplier.cc \ src/processor/simple_symbol_supplier.cc \
src/processor/simple_symbol_supplier.h \ src/processor/simple_symbol_supplier.h \
src/processor/stack_frame_info.h \ src/processor/windows_frame_info.h \
src/processor/stackwalker.cc \ src/processor/stackwalker.cc \
src/processor/stackwalker_amd64.cc \ src/processor/stackwalker_amd64.cc \
src/processor/stackwalker_amd64.h \ src/processor/stackwalker_amd64.h \

View file

@ -475,7 +475,7 @@ src_libbreakpad_la_SOURCES = \
src/processor/scoped_ptr.h \ src/processor/scoped_ptr.h \
src/processor/simple_symbol_supplier.cc \ src/processor/simple_symbol_supplier.cc \
src/processor/simple_symbol_supplier.h \ src/processor/simple_symbol_supplier.h \
src/processor/stack_frame_info.h \ src/processor/windows_frame_info.h \
src/processor/stackwalker.cc \ src/processor/stackwalker.cc \
src/processor/stackwalker_amd64.cc \ src/processor/stackwalker_amd64.cc \
src/processor/stackwalker_amd64.h \ src/processor/stackwalker_amd64.h \

View file

@ -63,7 +63,7 @@ class BasicSourceLineResolver : public SourceLineResolverInterface {
virtual bool HasModule(const string &module_name) const; virtual bool HasModule(const string &module_name) const;
virtual StackFrameInfo* FillSourceLineInfo(StackFrame *frame) const; virtual WindowsFrameInfo* FillSourceLineInfo(StackFrame *frame) const;
private: private:
template<class T> class MemAddrMap; template<class T> class MemAddrMap;

View file

@ -40,7 +40,7 @@ namespace google_breakpad {
using std::string; using std::string;
struct StackFrame; struct StackFrame;
struct StackFrameInfo; struct WindowsFrameInfo;
class SourceLineResolverInterface { class SourceLineResolverInterface {
public: public:
@ -68,9 +68,9 @@ class SourceLineResolverInterface {
// module_name fields must already be filled in. Additional debugging // module_name fields must already be filled in. Additional debugging
// information, if available, is returned. If the information is not // information, if available, is returned. If the information is not
// available, returns NULL. A NULL return value does not indicate an // available, returns NULL. A NULL return value does not indicate an
// error. The caller takes ownership of any returned StackFrameInfo // error. The caller takes ownership of any returned WindowsFrameInfo
// object. // object.
virtual StackFrameInfo* FillSourceLineInfo(StackFrame *frame) const = 0; virtual WindowsFrameInfo* FillSourceLineInfo(StackFrame *frame) const = 0;
protected: protected:
// SourceLineResolverInterface cannot be instantiated except by subclasses // SourceLineResolverInterface cannot be instantiated except by subclasses

View file

@ -53,7 +53,7 @@ class MemoryRegion;
class MinidumpContext; class MinidumpContext;
class SourceLineResolverInterface; class SourceLineResolverInterface;
struct StackFrame; struct StackFrame;
struct StackFrameInfo; struct WindowsFrameInfo;
class SymbolSupplier; class SymbolSupplier;
class SystemInfo; class SystemInfo;
@ -135,7 +135,7 @@ class Stackwalker {
// the caller. // the caller.
virtual StackFrame* GetCallerFrame( virtual StackFrame* GetCallerFrame(
const CallStack *stack, const CallStack *stack,
const vector< linked_ptr<StackFrameInfo> > &stack_frame_info) = 0; const vector< linked_ptr<WindowsFrameInfo> > &stack_frame_info) = 0;
// The optional SymbolSupplier for resolving source line info. // The optional SymbolSupplier for resolving source line info.
SymbolSupplier *supplier_; SymbolSupplier *supplier_;

View file

@ -46,7 +46,7 @@
#include "google_breakpad/processor/stack_frame.h" #include "google_breakpad/processor/stack_frame.h"
#include "processor/linked_ptr.h" #include "processor/linked_ptr.h"
#include "processor/scoped_ptr.h" #include "processor/scoped_ptr.h"
#include "processor/stack_frame_info.h" #include "processor/windows_frame_info.h"
using std::map; using std::map;
using std::vector; using std::vector;
@ -117,8 +117,8 @@ class BasicSourceLineResolver::Module {
// with the result. Additional debugging information, if available, is // with the result. Additional debugging information, if available, is
// returned. If no additional information is available, returns NULL. // returned. If no additional information is available, returns NULL.
// A NULL return value is not an error. The caller takes ownership of // A NULL return value is not an error. The caller takes ownership of
// any returned StackFrameInfo object. // any returned WindowsFrameInfo object.
StackFrameInfo* LookupAddress(StackFrame *frame) const; WindowsFrameInfo* LookupAddress(StackFrame *frame) const;
private: private:
friend class BasicSourceLineResolver; friend class BasicSourceLineResolver;
@ -175,7 +175,7 @@ class BasicSourceLineResolver::Module {
// StackInfoTypes. These are split by type because there may be overlaps // StackInfoTypes. These are split by type because there may be overlaps
// between maps of different types, but some information is only available // between maps of different types, but some information is only available
// as certain types. // as certain types.
ContainedRangeMap< MemAddr, linked_ptr<StackFrameInfo> > ContainedRangeMap< MemAddr, linked_ptr<WindowsFrameInfo> >
stack_info_[STACK_INFO_LAST]; stack_info_[STACK_INFO_LAST];
}; };
@ -236,7 +236,7 @@ bool BasicSourceLineResolver::HasModule(const string &module_name) const {
return modules_->find(module_name) != modules_->end(); return modules_->find(module_name) != modules_->end();
} }
StackFrameInfo* BasicSourceLineResolver::FillSourceLineInfo( WindowsFrameInfo* BasicSourceLineResolver::FillSourceLineInfo(
StackFrame *frame) const { StackFrame *frame) const {
if (frame->module) { if (frame->module) {
ModuleMap::const_iterator it = modules_->find(frame->module->code_file()); ModuleMap::const_iterator it = modules_->find(frame->module->code_file());
@ -413,11 +413,11 @@ bool BasicSourceLineResolver::Module::LoadMap(const string &map_file) {
return LoadMapFromBuffer(map_buffer); return LoadMapFromBuffer(map_buffer);
} }
StackFrameInfo* BasicSourceLineResolver::Module::LookupAddress( WindowsFrameInfo* BasicSourceLineResolver::Module::LookupAddress(
StackFrame *frame) const { StackFrame *frame) const {
MemAddr address = frame->instruction - frame->module->base_address(); MemAddr address = frame->instruction - frame->module->base_address();
linked_ptr<StackFrameInfo> retrieved_info; linked_ptr<WindowsFrameInfo> retrieved_info;
// Check for debugging info first, before any possible early returns. // Check for debugging info first, before any possible early returns.
// //
// We only know about STACK_INFO_FRAME_DATA and STACK_INFO_FPO. Prefer // We only know about STACK_INFO_FRAME_DATA and STACK_INFO_FPO. Prefer
@ -429,9 +429,9 @@ StackFrameInfo* BasicSourceLineResolver::Module::LookupAddress(
stack_info_[STACK_INFO_FPO].RetrieveRange(address, &retrieved_info); stack_info_[STACK_INFO_FPO].RetrieveRange(address, &retrieved_info);
} }
scoped_ptr<StackFrameInfo> frame_info; scoped_ptr<WindowsFrameInfo> frame_info;
if (retrieved_info.get()) { if (retrieved_info.get()) {
frame_info.reset(new StackFrameInfo()); frame_info.reset(new WindowsFrameInfo());
frame_info->CopyFrom(*retrieved_info.get()); frame_info->CopyFrom(*retrieved_info.get());
} }
@ -489,9 +489,9 @@ StackFrameInfo* BasicSourceLineResolver::Module::LookupAddress(
// about how much space their parameters consume on the stack. Prefer // about how much space their parameters consume on the stack. Prefer
// the STACK stuff (above), but if it's not present, take the // the STACK stuff (above), but if it's not present, take the
// information from the FUNC or PUBLIC line. // information from the FUNC or PUBLIC line.
frame_info.reset(new StackFrameInfo()); frame_info.reset(new WindowsFrameInfo());
frame_info->parameter_size = parameter_size; frame_info->parameter_size = parameter_size;
frame_info->valid |= StackFrameInfo::VALID_PARAMETER_SIZE; frame_info->valid |= WindowsFrameInfo::VALID_PARAMETER_SIZE;
} }
return frame_info.release(); return frame_info.release();
@ -681,8 +681,8 @@ bool BasicSourceLineResolver::Module::ParseStackInfo(char *stack_info_line) {
// if ContainedRangeMap were modified to allow replacement of // if ContainedRangeMap were modified to allow replacement of
// already-stored values. // already-stored values.
linked_ptr<StackFrameInfo> stack_frame_info( linked_ptr<WindowsFrameInfo> stack_frame_info(
new StackFrameInfo(prolog_size, new WindowsFrameInfo(prolog_size,
epilog_size, epilog_size,
parameter_size, parameter_size,
saved_register_size, saved_register_size,

View file

@ -35,7 +35,7 @@
#include "processor/linked_ptr.h" #include "processor/linked_ptr.h"
#include "processor/logging.h" #include "processor/logging.h"
#include "processor/scoped_ptr.h" #include "processor/scoped_ptr.h"
#include "processor/stack_frame_info.h" #include "processor/windows_frame_info.h"
#define ASSERT_TRUE(cond) \ #define ASSERT_TRUE(cond) \
if (!(cond)) { \ if (!(cond)) { \
@ -55,7 +55,7 @@ using google_breakpad::CodeModule;
using google_breakpad::linked_ptr; using google_breakpad::linked_ptr;
using google_breakpad::scoped_ptr; using google_breakpad::scoped_ptr;
using google_breakpad::StackFrame; using google_breakpad::StackFrame;
using google_breakpad::StackFrameInfo; using google_breakpad::WindowsFrameInfo;
class TestCodeModule : public CodeModule { class TestCodeModule : public CodeModule {
public: public:
@ -106,7 +106,7 @@ static bool RunTests() {
StackFrame frame; StackFrame frame;
frame.instruction = 0x1000; frame.instruction = 0x1000;
frame.module = NULL; frame.module = NULL;
scoped_ptr<StackFrameInfo> frame_info(resolver.FillSourceLineInfo(&frame)); scoped_ptr<WindowsFrameInfo> frame_info(resolver.FillSourceLineInfo(&frame));
ASSERT_FALSE(frame.module); ASSERT_FALSE(frame.module);
ASSERT_TRUE(frame.function_name.empty()); ASSERT_TRUE(frame.function_name.empty());
ASSERT_EQ(frame.function_base, 0); ASSERT_EQ(frame.function_base, 0);
@ -173,7 +173,7 @@ static bool RunTests() {
ASSERT_EQ(frame_info->prolog_size, 1); ASSERT_EQ(frame_info->prolog_size, 1);
frame.instruction = 0x216f; frame.instruction = 0x216f;
StackFrameInfo *s; WindowsFrameInfo *s;
s = resolver.FillSourceLineInfo(&frame); s = resolver.FillSourceLineInfo(&frame);
ASSERT_EQ(frame.function_name, "Public2_1"); ASSERT_EQ(frame.function_name, "Public2_1");
delete s; delete s;

View file

@ -47,7 +47,7 @@
#include "processor/linked_ptr.h" #include "processor/linked_ptr.h"
#include "processor/logging.h" #include "processor/logging.h"
#include "processor/scoped_ptr.h" #include "processor/scoped_ptr.h"
#include "processor/stack_frame_info.h" #include "processor/windows_frame_info.h"
#include "processor/stackwalker_ppc.h" #include "processor/stackwalker_ppc.h"
#include "processor/stackwalker_sparc.h" #include "processor/stackwalker_sparc.h"
#include "processor/stackwalker_x86.h" #include "processor/stackwalker_x86.h"
@ -78,7 +78,7 @@ bool Stackwalker::Walk(CallStack *stack) {
// stack_frame_info parallels the CallStack. The vector is passed to the // stack_frame_info parallels the CallStack. The vector is passed to the
// GetCallerFrame function. It contains information that may be helpful // GetCallerFrame function. It contains information that may be helpful
// for stackwalking. // for stackwalking.
vector< linked_ptr<StackFrameInfo> > stack_frame_info; vector< linked_ptr<WindowsFrameInfo> > stack_frame_info;
// Begin with the context frame, and keep getting callers until there are // Begin with the context frame, and keep getting callers until there are
// no more. // no more.
@ -91,7 +91,7 @@ bool Stackwalker::Walk(CallStack *stack) {
// frame_pointer fields. The frame structure comes from either the // frame_pointer fields. The frame structure comes from either the
// context frame (above) or a caller frame (below). // context frame (above) or a caller frame (below).
linked_ptr<StackFrameInfo> frame_info; linked_ptr<WindowsFrameInfo> frame_info;
// Resolve the module information, if a module map was provided. // Resolve the module information, if a module map was provided.
if (modules_) { if (modules_) {

View file

@ -74,7 +74,7 @@ StackFrame* StackwalkerAMD64::GetContextFrame() {
StackFrame* StackwalkerAMD64::GetCallerFrame( StackFrame* StackwalkerAMD64::GetCallerFrame(
const CallStack *stack, const CallStack *stack,
const vector< linked_ptr<StackFrameInfo> > &stack_frame_info) { const vector< linked_ptr<WindowsFrameInfo> > &stack_frame_info) {
if (!memory_ || !stack) { if (!memory_ || !stack) {
BPLOG(ERROR) << "Can't get caller frame without memory or stack"; BPLOG(ERROR) << "Can't get caller frame without memory or stack";
return NULL; return NULL;

View file

@ -66,7 +66,7 @@ class StackwalkerAMD64 : public Stackwalker {
virtual StackFrame* GetContextFrame(); virtual StackFrame* GetContextFrame();
virtual StackFrame* GetCallerFrame( virtual StackFrame* GetCallerFrame(
const CallStack *stack, const CallStack *stack,
const vector< linked_ptr<StackFrameInfo> > &stack_frame_info); const vector< linked_ptr<WindowsFrameInfo> > &stack_frame_info);
// Stores the CPU context corresponding to the innermost stack frame to // Stores the CPU context corresponding to the innermost stack frame to
// be returned by GetContextFrame. // be returned by GetContextFrame.

View file

@ -74,7 +74,7 @@ StackFrame* StackwalkerARM::GetContextFrame() {
StackFrame* StackwalkerARM::GetCallerFrame( StackFrame* StackwalkerARM::GetCallerFrame(
const CallStack *stack, const CallStack *stack,
const vector< linked_ptr<StackFrameInfo> > &stack_frame_info) { const vector< linked_ptr<WindowsFrameInfo> > &stack_frame_info) {
if (!memory_ || !stack) { if (!memory_ || !stack) {
BPLOG(ERROR) << "Can't get caller frame without memory or stack"; BPLOG(ERROR) << "Can't get caller frame without memory or stack";
return NULL; return NULL;

View file

@ -66,7 +66,7 @@ class StackwalkerARM : public Stackwalker {
virtual StackFrame* GetContextFrame(); virtual StackFrame* GetContextFrame();
virtual StackFrame* GetCallerFrame( virtual StackFrame* GetCallerFrame(
const CallStack *stack, const CallStack *stack,
const vector< linked_ptr<StackFrameInfo> > &stack_frame_info); const vector< linked_ptr<WindowsFrameInfo> > &stack_frame_info);
// Stores the CPU context corresponding to the innermost stack frame to // Stores the CPU context corresponding to the innermost stack frame to
// be returned by GetContextFrame. // be returned by GetContextFrame.

View file

@ -83,7 +83,7 @@ StackFrame* StackwalkerPPC::GetContextFrame() {
StackFrame* StackwalkerPPC::GetCallerFrame( StackFrame* StackwalkerPPC::GetCallerFrame(
const CallStack *stack, const CallStack *stack,
const vector< linked_ptr<StackFrameInfo> > &stack_frame_info) { const vector< linked_ptr<WindowsFrameInfo> > &stack_frame_info) {
if (!memory_ || !stack) { if (!memory_ || !stack) {
BPLOG(ERROR) << "Can't get caller frame without memory or stack"; BPLOG(ERROR) << "Can't get caller frame without memory or stack";
return NULL; return NULL;

View file

@ -67,7 +67,7 @@ class StackwalkerPPC : public Stackwalker {
virtual StackFrame* GetContextFrame(); virtual StackFrame* GetContextFrame();
virtual StackFrame* GetCallerFrame( virtual StackFrame* GetCallerFrame(
const CallStack *stack, const CallStack *stack,
const vector< linked_ptr<StackFrameInfo> > &stack_frame_info); const vector< linked_ptr<WindowsFrameInfo> > &stack_frame_info);
// Stores the CPU context corresponding to the innermost stack frame to // Stores the CPU context corresponding to the innermost stack frame to
// be returned by GetContextFrame. // be returned by GetContextFrame.

View file

@ -74,7 +74,7 @@ StackFrame* StackwalkerSPARC::GetContextFrame() {
StackFrame* StackwalkerSPARC::GetCallerFrame( StackFrame* StackwalkerSPARC::GetCallerFrame(
const CallStack *stack, const CallStack *stack,
const vector< linked_ptr<StackFrameInfo> > &stack_frame_info) { const vector< linked_ptr<WindowsFrameInfo> > &stack_frame_info) {
if (!memory_ || !stack) { if (!memory_ || !stack) {
BPLOG(ERROR) << "Can't get caller frame without memory or stack"; BPLOG(ERROR) << "Can't get caller frame without memory or stack";
return NULL; return NULL;

View file

@ -72,7 +72,7 @@ class StackwalkerSPARC : public Stackwalker {
virtual StackFrame* GetContextFrame(); virtual StackFrame* GetContextFrame();
virtual StackFrame* GetCallerFrame( virtual StackFrame* GetCallerFrame(
const CallStack *stack, const CallStack *stack,
const vector< linked_ptr<StackFrameInfo> > &stack_frame_info); const vector< linked_ptr<WindowsFrameInfo> > &stack_frame_info);
// Stores the CPU context corresponding to the innermost stack frame to // Stores the CPU context corresponding to the innermost stack frame to
// be returned by GetContextFrame. // be returned by GetContextFrame.

View file

@ -43,7 +43,7 @@
#include "google_breakpad/processor/stack_frame_cpu.h" #include "google_breakpad/processor/stack_frame_cpu.h"
#include "processor/linked_ptr.h" #include "processor/linked_ptr.h"
#include "processor/logging.h" #include "processor/logging.h"
#include "processor/stack_frame_info.h" #include "processor/windows_frame_info.h"
namespace google_breakpad { namespace google_breakpad {
@ -88,7 +88,7 @@ StackFrame* StackwalkerX86::GetContextFrame() {
StackFrame* StackwalkerX86::GetCallerFrame( StackFrame* StackwalkerX86::GetCallerFrame(
const CallStack *stack, const CallStack *stack,
const vector< linked_ptr<StackFrameInfo> > &stack_frame_info) { const vector< linked_ptr<WindowsFrameInfo> > &stack_frame_info) {
if (!memory_ || !stack) { if (!memory_ || !stack) {
BPLOG(ERROR) << "Can't get caller frame without memory or stack"; BPLOG(ERROR) << "Can't get caller frame without memory or stack";
return NULL; return NULL;
@ -96,7 +96,7 @@ StackFrame* StackwalkerX86::GetCallerFrame(
StackFrameX86::FrameTrust trust = StackFrameX86::FRAME_TRUST_NONE; StackFrameX86::FrameTrust trust = StackFrameX86::FRAME_TRUST_NONE;
StackFrameX86 *last_frame = static_cast<StackFrameX86*>( StackFrameX86 *last_frame = static_cast<StackFrameX86*>(
stack->frames()->back()); stack->frames()->back());
StackFrameInfo *last_frame_info = stack_frame_info.back().get(); WindowsFrameInfo *last_frame_info = stack_frame_info.back().get();
// This stackwalker sets each frame's %esp to its value immediately prior // This stackwalker sets each frame's %esp to its value immediately prior
// to the CALL into the callee. This means that %esp points to the last // to the CALL into the callee. This means that %esp points to the last
@ -133,10 +133,10 @@ StackFrame* StackwalkerX86::GetCallerFrame(
int frames_already_walked = stack_frame_info.size(); int frames_already_walked = stack_frame_info.size();
u_int32_t last_frame_callee_parameter_size = 0; u_int32_t last_frame_callee_parameter_size = 0;
if (frames_already_walked >= 2) { if (frames_already_walked >= 2) {
StackFrameInfo *last_frame_callee_info = WindowsFrameInfo *last_frame_callee_info =
stack_frame_info[frames_already_walked - 2].get(); stack_frame_info[frames_already_walked - 2].get();
if (last_frame_callee_info && if (last_frame_callee_info &&
last_frame_callee_info->valid & StackFrameInfo::VALID_PARAMETER_SIZE) { last_frame_callee_info->valid & WindowsFrameInfo::VALID_PARAMETER_SIZE) {
last_frame_callee_parameter_size = last_frame_callee_parameter_size =
last_frame_callee_info->parameter_size; last_frame_callee_info->parameter_size;
} }
@ -153,7 +153,7 @@ StackFrame* StackwalkerX86::GetCallerFrame(
dictionary["$esp"] = last_frame->context.esp; dictionary["$esp"] = last_frame->context.esp;
dictionary[".cbCalleeParams"] = last_frame_callee_parameter_size; dictionary[".cbCalleeParams"] = last_frame_callee_parameter_size;
if (last_frame_info && last_frame_info->valid == StackFrameInfo::VALID_ALL) { if (last_frame_info && last_frame_info->valid == WindowsFrameInfo::VALID_ALL) {
// FPO debugging data is available. Initialize constants. // FPO debugging data is available. Initialize constants.
dictionary[".cbSavedRegs"] = last_frame_info->saved_register_size; dictionary[".cbSavedRegs"] = last_frame_info->saved_register_size;
dictionary[".cbLocals"] = last_frame_info->local_size; dictionary[".cbLocals"] = last_frame_info->local_size;
@ -163,7 +163,7 @@ StackFrame* StackwalkerX86::GetCallerFrame(
last_frame_info->saved_register_size; last_frame_info->saved_register_size;
} }
if (last_frame_info && if (last_frame_info &&
last_frame_info->valid & StackFrameInfo::VALID_PARAMETER_SIZE) { last_frame_info->valid & WindowsFrameInfo::VALID_PARAMETER_SIZE) {
// This is treated separately because it can either come from FPO data or // This is treated separately because it can either come from FPO data or
// from other debugging data. // from other debugging data.
dictionary[".cbParams"] = last_frame_info->parameter_size; dictionary[".cbParams"] = last_frame_info->parameter_size;
@ -181,7 +181,7 @@ StackFrame* StackwalkerX86::GetCallerFrame(
string program_string; string program_string;
bool traditional_frame = true; bool traditional_frame = true;
bool recover_ebp = true; bool recover_ebp = true;
if (last_frame_info && last_frame_info->valid == StackFrameInfo::VALID_ALL) { if (last_frame_info && last_frame_info->valid == WindowsFrameInfo::VALID_ALL) {
// FPO data available. // FPO data available.
traditional_frame = false; traditional_frame = false;
trust = StackFrameX86::FRAME_TRUST_CFI; trust = StackFrameX86::FRAME_TRUST_CFI;

View file

@ -68,7 +68,7 @@ class StackwalkerX86 : public Stackwalker {
virtual StackFrame* GetContextFrame(); virtual StackFrame* GetContextFrame();
virtual StackFrame* GetCallerFrame( virtual StackFrame* GetCallerFrame(
const CallStack *stack, const CallStack *stack,
const vector< linked_ptr<StackFrameInfo> > &stack_frame_info); const vector< linked_ptr<WindowsFrameInfo> > &stack_frame_info);
// Scan the stack starting at location_start, looking for an address // Scan the stack starting at location_start, looking for an address
// that looks like a valid instruction pointer. Addresses must // that looks like a valid instruction pointer. Addresses must

View file

@ -27,7 +27,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// stack_frame_info.h: Holds debugging information about a stack frame. // windows_frame_info.h: Holds debugging information about a stack frame.
// //
// This structure is specific to Windows debugging information obtained // This structure is specific to Windows debugging information obtained
// from pdb files using the DIA API. // from pdb files using the DIA API.
@ -35,8 +35,8 @@
// Author: Mark Mentovai // Author: Mark Mentovai
#ifndef PROCESSOR_STACK_FRAME_INFO_H__ #ifndef PROCESSOR_WINDOWS_FRAME_INFO_H__
#define PROCESSOR_STACK_FRAME_INFO_H__ #define PROCESSOR_WINDOWS_FRAME_INFO_H__
#include <string> #include <string>
@ -44,7 +44,7 @@
namespace google_breakpad { namespace google_breakpad {
struct StackFrameInfo { struct WindowsFrameInfo {
public: public:
enum Validity { enum Validity {
VALID_NONE = 0, VALID_NONE = 0,
@ -52,7 +52,7 @@ struct StackFrameInfo {
VALID_ALL = -1 VALID_ALL = -1
}; };
StackFrameInfo() : valid(VALID_NONE), WindowsFrameInfo() : valid(VALID_NONE),
prolog_size(0), prolog_size(0),
epilog_size(0), epilog_size(0),
parameter_size(0), parameter_size(0),
@ -62,7 +62,7 @@ struct StackFrameInfo {
allocates_base_pointer(0), allocates_base_pointer(0),
program_string() {} program_string() {}
StackFrameInfo(u_int32_t set_prolog_size, WindowsFrameInfo(u_int32_t set_prolog_size,
u_int32_t set_epilog_size, u_int32_t set_epilog_size,
u_int32_t set_parameter_size, u_int32_t set_parameter_size,
u_int32_t set_saved_register_size, u_int32_t set_saved_register_size,
@ -80,8 +80,8 @@ struct StackFrameInfo {
allocates_base_pointer(set_allocates_base_pointer), allocates_base_pointer(set_allocates_base_pointer),
program_string(set_program_string) {} program_string(set_program_string) {}
// CopyFrom makes "this" StackFrameInfo object identical to "that". // CopyFrom makes "this" WindowsFrameInfo object identical to "that".
void CopyFrom(const StackFrameInfo &that) { void CopyFrom(const WindowsFrameInfo &that) {
valid = that.valid; valid = that.valid;
prolog_size = that.prolog_size; prolog_size = that.prolog_size;
epilog_size = that.epilog_size; epilog_size = that.epilog_size;
@ -93,7 +93,7 @@ struct StackFrameInfo {
program_string = that.program_string; program_string = that.program_string;
} }
// Clears the StackFrameInfo object so that users will see it as though // Clears the WindowsFrameInfo object so that users will see it as though
// it contains no information. // it contains no information.
void Clear() { void Clear() {
valid = VALID_NONE; valid = VALID_NONE;
@ -123,4 +123,4 @@ struct StackFrameInfo {
} // namespace google_breakpad } // namespace google_breakpad
#endif // PROCESSOR_STACK_FRAME_INFO_H__ #endif // PROCESSOR_WINDOWS_FRAME_INFO_H__