From 3ca4a120de8ec3f35e972e4b23f527bb8f65c479 Mon Sep 17 00:00:00 2001 From: "ted.mielczarek" Date: Wed, 6 Jul 2011 17:05:59 +0000 Subject: 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 --- src/tools/linux/dump_syms/dump_syms.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/tools/linux/dump_syms') diff --git a/src/tools/linux/dump_syms/dump_syms.cc b/src/tools/linux/dump_syms/dump_syms.cc index 7d721a8c..f4c05cfc 100644 --- a/src/tools/linux/dump_syms/dump_syms.cc +++ b/src/tools/linux/dump_syms/dump_syms.cc @@ -27,6 +27,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +#include #include #include @@ -46,7 +47,7 @@ int main(int argc, char **argv) { if (argc == 3) debug_dir = argv[2]; - if (!WriteSymbolFile(binary, debug_dir, stdout)) { + if (!WriteSymbolFile(binary, debug_dir, std::cout)) { fprintf(stderr, "Failed to write symbol file.\n"); return 1; } -- cgit v1.2.1