aboutsummaryrefslogtreecommitdiff
path: root/src/processor/source_line_resolver.h
diff options
context:
space:
mode:
authorbryner <bryner@4c0a9323-5329-0410-9bdc-e9ce6186880e>2006-09-07 17:26:17 +0000
committerbryner <bryner@4c0a9323-5329-0410-9bdc-e9ce6186880e>2006-09-07 17:26:17 +0000
commit39716226cf6ffcfaa37c991f82c3f2b19354413f (patch)
tree6319a6aa5f32e275db8f615e1d77385e7336f591 /src/processor/source_line_resolver.h
parentConform to style guidelines. (diff)
downloadbreakpad-39716226cf6ffcfaa37c991f82c3f2b19354413f.tar.xz
Make SourceLineResolver fill a StackFrame rather than using its own struct (#16), r=mmentovai.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@17 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor/source_line_resolver.h')
-rw-r--r--src/processor/source_line_resolver.h27
1 files changed, 6 insertions, 21 deletions
diff --git a/src/processor/source_line_resolver.h b/src/processor/source_line_resolver.h
index 0d193894..9d67553f 100644
--- a/src/processor/source_line_resolver.h
+++ b/src/processor/source_line_resolver.h
@@ -19,7 +19,6 @@
#ifndef PROCESSOR_SOURCE_LINE_RESOLVER_H__
#define PROCESSOR_SOURCE_LINE_RESOLVER_H__
-#include "config.h"
#include <string>
#include <ext/hash_map>
@@ -28,25 +27,12 @@ namespace google_airbag {
using std::string;
using __gnu_cxx::hash_map;
+class StackFrame;
+
class SourceLineResolver {
public:
typedef unsigned long long MemAddr;
- // A struct that gives source file information for a memory address.
- struct SourceLineInfo {
- // Resets all fields to their default empty values
- void Reset();
-
- // The function name, for example Foo::Foo()
- string function_name;
-
- // The source file, for example C:\foo\bar.cc
- string source_file;
-
- // The line number within the source file (1-based)
- int source_line;
- };
-
SourceLineResolver();
~SourceLineResolver();
@@ -58,11 +44,10 @@ class SourceLineResolver {
// map_file should contain line/address mappings for this module.
bool LoadModule(const string &module_name, const string &map_file);
- // Determines the source line for the given address, and fills info
- // with the result. module_name must match a module name that was
- // passed to LoadModule(). The address should be module-relative.
- void LookupAddress(MemAddr address, const string &module_name,
- SourceLineInfo *info) const;
+ // Fills in the function_base, function_name, source_file_name,
+ // and source_line fields of the StackFrame. The instruction and
+ // module_name fields must already be filled in.
+ void FillSourceLineInfo(StackFrame *frame) const;
private:
template<class T> class MemAddrMap;