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
This commit is contained in:
ted.mielczarek 2011-07-06 17:05:59 +00:00
parent b2f96f314c
commit 3ca4a120de
16 changed files with 958 additions and 228 deletions

View file

@ -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 <iostream>
#include <stdio.h>
#include <string>
@ -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;
}