aboutsummaryrefslogtreecommitdiff
path: root/src/common/dwarf/functioninfo.h
diff options
context:
space:
mode:
authorivan.penkov@gmail.com <ivan.penkov@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-06-28 22:46:01 +0000
committerivan.penkov@gmail.com <ivan.penkov@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-06-28 22:46:01 +0000
commit6de969a3040fa31ba60302c66613d1d2e6f5a730 (patch)
treeaad9de34e00834709440f01cb0f54e315989490e /src/common/dwarf/functioninfo.h
parentFix Android build of client library (diff)
downloadbreakpad-6de969a3040fa31ba60302c66613d1d2e6f5a730.tar.xz
This change allows compiling the google-breakpad code using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@974 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/dwarf/functioninfo.h')
-rw-r--r--src/common/dwarf/functioninfo.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/common/dwarf/functioninfo.h b/src/common/dwarf/functioninfo.h
index 85a31ff4..f8706369 100644
--- a/src/common/dwarf/functioninfo.h
+++ b/src/common/dwarf/functioninfo.h
@@ -40,17 +40,18 @@
#include <vector>
#include "common/dwarf/dwarf2reader.h"
+#include "common/using_std_string.h"
namespace dwarf2reader {
struct FunctionInfo {
// Name of the function
- std::string name;
+ string name;
// Mangled name of the function
- std::string mangled_name;
+ string mangled_name;
// File containing this function
- std::string file;
+ string file;
// Line number for start of function.
uint32 line;
// Beginning address for this function
@@ -61,13 +62,13 @@ struct FunctionInfo {
struct SourceFileInfo {
// Name of the source file name
- std::string name;
+ string name;
// Low address of source file name
uint64 lowpc;
};
typedef std::map<uint64, FunctionInfo*> FunctionMap;
-typedef std::map<uint64, std::pair<std::string, uint32> > LineMap;
+typedef std::map<uint64, std::pair<string, uint32> > LineMap;
// This class is a basic line info handler that fills in the dirs,
// file, and linemap passed into it with the data produced from the
@@ -77,17 +78,17 @@ class CULineInfoHandler: public LineInfoHandler {
//
CULineInfoHandler(std::vector<SourceFileInfo>* files,
- std::vector<std::string>* dirs,
+ std::vector<string>* dirs,
LineMap* linemap);
virtual ~CULineInfoHandler() { }
// Called when we define a directory. We just place NAME into dirs_
// at position DIR_NUM.
- virtual void DefineDir(const std::string& name, uint32 dir_num);
+ virtual void DefineDir(const string& name, uint32 dir_num);
// Called when we define a filename. We just place
// concat(dirs_[DIR_NUM], NAME) into files_ at position FILE_NUM.
- virtual void DefineFile(const std::string& name, int32 file_num,
+ virtual void DefineFile(const string& name, int32 file_num,
uint32 dir_num, uint64 mod_time, uint64 length);
@@ -103,13 +104,13 @@ class CULineInfoHandler: public LineInfoHandler {
private:
LineMap* linemap_;
std::vector<SourceFileInfo>* files_;
- std::vector<std::string>* dirs_;
+ std::vector<string>* dirs_;
};
class CUFunctionInfoHandler: public Dwarf2Handler {
public:
CUFunctionInfoHandler(std::vector<SourceFileInfo>* files,
- std::vector<std::string>* dirs,
+ std::vector<string>* dirs,
LineMap* linemap,
FunctionMap* offset_to_funcinfo,
FunctionMap* address_to_funcinfo,
@@ -163,7 +164,7 @@ class CUFunctionInfoHandler: public Dwarf2Handler {
virtual void ProcessAttributeString(uint64 offset,
enum DwarfAttribute attr,
enum DwarfForm form,
- const std::string& data);
+ const string& data);
// Called when finished processing the DIE at OFFSET.
// Because DWARF2/3 specifies a tree of DIEs, you may get starts
@@ -173,7 +174,7 @@ class CUFunctionInfoHandler: public Dwarf2Handler {
private:
std::vector<SourceFileInfo>* files_;
- std::vector<std::string>* dirs_;
+ std::vector<string>* dirs_;
LineMap* linemap_;
FunctionMap* offset_to_funcinfo_;
FunctionMap* address_to_funcinfo_;