aboutsummaryrefslogtreecommitdiff
path: root/src/common/stabs_reader_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Use stdint types everywhereted.mielczarek@gmail.com2013-03-061-3/+3
| | | | | | R=mark at https://breakpad.appspot.com/535002/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix compiler warnings on Ubuntu Precise. Pull in gmock r408 in the process.thestig@chromium.org2012-09-101-13/+13
| | | | | | | BUG=490 Review URL: https://breakpad.appspot.com/448002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1034 4c0a9323-5329-0410-9bdc-e9ce6186880e
* This change allows compiling the google-breakpad code using a global ↵ivan.penkov@gmail.com2012-06-281-3/+4
| | | | | | ::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
* Put PUBLIC lines in Mac symbol files.ted.mielczarek2011-03-041-1/+51
| | | | | | | | Exported symbols on Mach-O binaries are defined in a STABS section. This patch makes stabs_reader handle them, adds support for Extern symbols in the Module class (which are output as PUBLIC lines in symbol files), and the proper processing in stabs_to_module to hook it all up. A=mark R=jimb at http://breakpad.appspot.com/163001 and http://breakpad.appspot.com/267001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@778 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Mac symbol dumper: Add new Mach-O reader class.ted.mielczarek2010-06-251-4/+4
| | | | | | | | | | | | | | | | This patch adds files defining new classes in the google_breakpad::Mach_O namespace for parsing fat binaries and Mach-O files. These are used in the new dumper to handle STABS debugging information, DWARF call frame information, and .eh_frame exception handling stack walking information. These new classes are independent of endianness and word size, and therefore can be used on binaries of all the relevant architectures: x86, x86_64, ppc, and ARM. The patch adds a complete set of unit tests for the new classes. A=jimb R=mark (http://breakpad.appspot.com/93001/show, http://breakpad.appspot.com/115001/show) git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@610 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: Handle STABS-in-symbol-table, and line number records ↵jimblandy2010-05-051-9/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | outside functions. This patch addresses two differences between Linux and Macintosh OS X STABS data: - StabsReader assumes that the STABS entries follow the conventions for storing STABS data in object file sections (that is, .stabs and .stabstr), rather than in the object files's linker symbol table. On Mac OS X, STABS entries live in the Mach-O file's LC_SYMTAB load command, along with all the other linker symbols; they are not grouped into units by N_UNDF entries. This patch adds a boolean argument to the StabsReader constructor indicating whether the parser should treat N_UNDF entries as unit boundaries; this argument should be true on Linux, and false on Mac. The patch changes src/common/linux/dump_symbols.cc to pass this new argument. - Mac OS X STABS place SLINE (line number) records immediately before the FUN record for the function to which they belong, and the values of such records are absolute, not relative to the function start. This patch extends the parser to queue up such records and report them to the handler when we do see the FUN record. The meaning of StabsHandler::Line remains unchanged; existing handlers do not need to be adjusted. This patch also adds unit tests for the new parser behaviors. a=jimblandy, r=mark git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@587 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad STABS parser: Use a test fixture in StabsReader unit tests.jimblandy2010-05-051-56/+42
| | | | | | | | | | This patch factors out some of the common code in the StabsReader unit tests into a fixture class. Pretty mechanical. a=jimblandy, r=thestig git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@586 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad STABS reader: Properly compute function end addresses.jimblandy2010-05-051-0/+43
| | | | | | | | | | | | | An N_FUN stabs with no name is an explicit end-of-function marker, whose value is the size of the function. This patch changes the stabs reader to recognize these and use them to compute the function's ending address, instead of treating them as functions with no names and mysterious addresses. It also adds appropriate unit tests. a=jimblandy, r=thestig git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@585 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: Make StabsReader independent of endianness and word size.jimblandy2010-05-051-476/+251
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Breakpad symbol dumper: Move Linux dumping classes into src/common.jimblandy2010-04-051-0/+685
The Linux symbol dumper's classes are reasonably portable, and should be usable for the Mac dumper as well. Move them to src/common, along with their unit tests. Update #include directives and Makefile. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@567 4c0a9323-5329-0410-9bdc-e9ce6186880e