aboutsummaryrefslogtreecommitdiff
path: root/src/common/testdata
diff options
context:
space:
mode:
authorjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-05-05 17:09:20 +0000
committerjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-05-05 17:09:20 +0000
commitb0ec96cee2ab186c9e7e480d03751588f0640bf1 (patch)
tree40fc8df4fbbf5542c27cad2919c025fe3881457f /src/common/testdata
parentBreakpad symbol dumper: Define the ByteBuffer and ByteCursor classes. (diff)
downloadbreakpad-b0ec96cee2ab186c9e7e480d03751588f0640bf1.tar.xz
Breakpad Linux dumper: Make StabsReader independent of endianness and word size.
StabsReader simply applies a reinterpret_cast to treat the stab entry data as an array of 'struct nlist' structures, making the parser specific on the host endianness, word size, and alignment rules. On Mac OS X, a single fat binary file may contain object files of different ABIs, of which the user chooses one at run time. This patch changes the parser to read the data using the google_breakpad:: ByteCursor class, which can handle different endiannesses and word sizes. The StabsReader constructor now takes arguments indicating the endianness of the data and the size of each entry's value field. The patch changes src/common/linux/dump_symbols.cc to pass the new argument. This patch changes the StabsReader unit tests to use the google_breakpad:: TestAssembler classes to generate test data, rather than reading it from a file. This makes it easy to generate test data in various endiannesses and word sizes. It also adds tests for the new parser behaviors. a=jimblandy, r=thestig git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@583 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/testdata')
-rw-r--r--src/common/testdata/stabs_reader_unittest.input119
-rw-r--r--src/common/testdata/stabs_reader_unittest.input21
-rw-r--r--src/common/testdata/stabs_reader_unittest.input32
-rw-r--r--src/common/testdata/stabs_reader_unittest.input41
-rw-r--r--src/common/testdata/stabs_reader_unittest.input52
-rw-r--r--src/common/testdata/stabs_reader_unittest.input68
6 files changed, 0 insertions, 33 deletions
diff --git a/src/common/testdata/stabs_reader_unittest.input1 b/src/common/testdata/stabs_reader_unittest.input1
deleted file mode 100644
index 44b3d0a3..00000000
--- a/src/common/testdata/stabs_reader_unittest.input1
+++ /dev/null
@@ -1,19 +0,0 @@
-SO 10 11 0x02 builddir/
-FUN 20 21 0x12 not the SO with source file name we expected
-SO 30 31 0x22
-SO 40 41 0x32 builddir1/
-SO 50 51 0x42 file1.c
-LSYM 60 61 0x52 not the FUN we're looking for
-FUN 70 71 0x62 fun1
-BINCL 80 81 0x72 something to ignore in a FUN body
-SLINE 90 91 0x82
-SOL 100 101 0x92 header.h
-SLINE 110 111 0x102
-FUN 120 121 0x112 fun2:some stabs type info here, to trim from the name
-SLINE 130 131 0x122
-SOL 140 141 0x132 file1.c
-SLINE 150 151 0x142
-SO 160 161 0x152
-LSYM 170 171 0x162
-SO 180 181 0x182 file3.c
-SO 190 191 0x192
diff --git a/src/common/testdata/stabs_reader_unittest.input2 b/src/common/testdata/stabs_reader_unittest.input2
deleted file mode 100644
index 82efeb92..00000000
--- a/src/common/testdata/stabs_reader_unittest.input2
+++ /dev/null
@@ -1 +0,0 @@
-SO 10 11 0x12 file2-1.c
diff --git a/src/common/testdata/stabs_reader_unittest.input3 b/src/common/testdata/stabs_reader_unittest.input3
deleted file mode 100644
index 73e6a302..00000000
--- a/src/common/testdata/stabs_reader_unittest.input3
+++ /dev/null
@@ -1,2 +0,0 @@
-SO 10 11 0x12 file3-1.c
-FUN 20 21 0x22 fun3_1
diff --git a/src/common/testdata/stabs_reader_unittest.input4 b/src/common/testdata/stabs_reader_unittest.input4
deleted file mode 100644
index dfdbf677..00000000
--- a/src/common/testdata/stabs_reader_unittest.input4
+++ /dev/null
@@ -1 +0,0 @@
-SO 10 11 0x12 build-directory/
diff --git a/src/common/testdata/stabs_reader_unittest.input5 b/src/common/testdata/stabs_reader_unittest.input5
deleted file mode 100644
index 7a447c88..00000000
--- a/src/common/testdata/stabs_reader_unittest.input5
+++ /dev/null
@@ -1,2 +0,0 @@
-SO 10 11 0x12 file5-1.c
-SO 20 21 0x22 file5-2.c
diff --git a/src/common/testdata/stabs_reader_unittest.input6 b/src/common/testdata/stabs_reader_unittest.input6
deleted file mode 100644
index 54c2c9d4..00000000
--- a/src/common/testdata/stabs_reader_unittest.input6
+++ /dev/null
@@ -1,8 +0,0 @@
-cu-boundary antimony
-SO 10 11 0x12 antimony
-FUN 20 21 0x22 arsenic
-SO 30 31 0x32
-cu-boundary aluminum
-SO 40 41 0x42 aluminum
-FUN 50 51 0x52 selenium
-SO 60 61 0x62