aboutsummaryrefslogtreecommitdiff
path: root/src/common/module.h
diff options
context:
space:
mode:
authorted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-07-06 17:05:59 +0000
committerted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-07-06 17:05:59 +0000
commit3ca4a120de8ec3f35e972e4b23f527bb8f65c479 (patch)
tree0186b36bf01d54c7700c00c3c2cec21fbb382268 /src/common/module.h
parentDump PUBLIC + CFI records from libraries without debug info on Linux, use .dy... (diff)
downloadbreakpad-3ca4a120de8ec3f35e972e4b23f527bb8f65c479.tar.xz
Add some unit tests for Linux WriteSymbolFile
This patch adds synth_elf::{StringTable,SymbolTable,ELF} classes to produce in-memory ELF files to properly test the Linux symbol dumping code. It also uses those classes to add some basic tests for the WriteSymbolFile function. R=jimb at http://breakpad.appspot.com/277001/show git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@794 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/module.h')
-rw-r--r--src/common/module.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/common/module.h b/src/common/module.h
index 8e6a05e2..55f260f1 100644
--- a/src/common/module.h
+++ b/src/common/module.h
@@ -38,8 +38,7 @@
#ifndef COMMON_LINUX_MODULE_H__
#define COMMON_LINUX_MODULE_H__
-#include <stdio.h>
-
+#include <iostream>
#include <map>
#include <set>
#include <string>
@@ -264,7 +263,7 @@ class Module {
// - the functions added via AddFunctions, each with its lines.
// Addresses in the output are all relative to the load address
// established by SetLoadAddress.
- bool Write(FILE *stream);
+ bool Write(std::ostream &stream);
private:
@@ -275,7 +274,7 @@ class Module {
// Write RULE_MAP to STREAM, in the form appropriate for 'STACK CFI'
// records, without a final newline. Return true if all goes well;
// if an error occurs, return false, and leave errno set.
- static bool WriteRuleMap(const RuleMap &rule_map, FILE *stream);
+ static bool WriteRuleMap(const RuleMap &rule_map, std::ostream &stream);
// Module header entries.
string name_, os_, architecture_, id_;