aboutsummaryrefslogtreecommitdiff
path: root/src/common
Commit message (Collapse)AuthorAgeFilesLines
* Breakpad Linux dumper: Add file comments as required by the style guide.jimblandy2010-02-0923-17/+116
| | | | | | | | | | | | | | | | | | | | | | This also includes some comments I promised Cary Coutant I'd write about the appropriateness of processing attributes in EndAttributes calls. The Google C++ Style Guide requires each file to have an author notice and a comment explaining the file's general purpose. For the record, I don't think putting an author notice on the files is a good idea; it's odd to have the original author retain prominence even if the file has been heavily edited by others; the version control system answers this question more accurately. This is only for Style Guide compliance. The Apache group decided to discourage author annotations, partially for these reasons: http://mail-archives.apache.org/mod_mbox/jakarta-jmeter-dev/200402.mbox/%3C4039F65E.7020406@atg.com%3E a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@518 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad: Update copyright notice years on all files changed in 2010.jimblandy2010-02-0930-30/+30
| | | | | | | | | | We've gotten mixed advice from the lawyery types about whether this matters. But it's easy enough to do. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@517 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Refactor Chrome's out-of-process Linux code into ↵ted.mielczarek2010-02-051-0/+47
| | | | | | CrashGeneration{Server,Client} classes. Upstreamed from the Mozilla repository. Patch by Chris Jones <jones.chris.g@gmail.com> r=me at https://bugzilla.mozilla.org/show_bug.cgi?id=516759 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@515 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: Recognize more processor architectures.jimblandy2010-02-021-12/+35
| | | | | | | | | | | | | | This extends the ElfArchitecture function to recognize the architectures it seemed to me that breakpad was most likely to see. Also: the dumper has historically not provided very helpful error messages. This patch adds a few that were convenient, but we should do an audit for this. a=jimblandy, r=ted.mielczarek git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@507 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux Dumper: Rename structure members to follow the Google C++ ↵jimblandy2010-01-289-217/+217
| | | | | | | | | | | | | Style Guide. The Google C++ Style Guide says that members of structures needn't have names ending in underscores. The structure types in google_breakpad::Module don't follow this rule. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@505 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad DWARF parser: Add method to read DWARF "Initial length".jimblandy2010-01-283-27/+31
| | | | | | | | | | | This patch moves the ReadInitialFunction from dwarf2reader.cc, where it was a static function, to being a member function of google_breakpad::ByteReader. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@504 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux Dumper: Add DWARF support.jimblandy2010-01-2310-27/+3941
| | | | | | | | | | | | | | | | | | | | | | | | This adds DWARF support to the Breakpad Linux dumper. This is implemented as two handler classes: google_breakpad::DwarfCUToModule accepts data from dwarf2reader::CompilationUnit, and google_breakpad::DwarfLineToModule accepts data from a dwarf2reader::LineInfo, each populating a google_breakpad::Module with the results. Behaviors specific to particular source languages are handled by instances of a new class, google_breakpad::Language. An input executable may contain both STABS and DWARF debugging information: the dumper automatically recognizes what sorts of information are available, and integrates the data into a single output file. All classes have unit tests, providing line and branch coverage of all interesting code. Unit tests are written using the Google C++ Testing Framework, and the Google C++ Mocking Framework where appropriate. a=jimblandy, r=ccoutant git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@497 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Typo: "An" -> "A".jimblandy2010-01-231-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@496 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad DWARF Parser: Improved DWARF-processing interface.jimblandy2010-01-233-0/+1084
| | | | | | | | | | | | | | | | | | dwarf2reader::CompilationUnit is a simple and direct parser for DWARF data, but its handler interface is not convenient to use. In particular, the same handler object receives data about all DIEs processed. One can't use distinct classes to separate the information needed to handle different kinds of data. This patch defines a new adapter type, dwarf2reader::DIEHandler, which implements the existing DWARF parser's handler interface, given a handler written to a more comfortable, object-orient interface. The comments in dwarf2diehandler.h provide more detail. a=jimblandy, r=ccoutant git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@495 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad DWARF Reader: Change LineInfoHandler::AddLine to provide the line's ↵jimblandy2010-01-224-28/+50
| | | | | | | | | | | | | | | | | | | | length. Breakpad's DWARF line number info parser provides a code address, file, and line number for each code/source pairing, but doesn't provide the length of the machine code. This makes that change, as discussed in the following thread: http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/ed8d2fde79319368p This patch also makes the corresponding changes to the functioninfo.cc module, used by the Mac dumper. This patch has no effect on the Mac dumper's output. a=jimblandy, r=ccoutant git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@494 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad DWARF Reader: Also look for DWARF in sections with the proper names.jimblandy2010-01-221-6/+18
| | | | | | | | | | | | The DWARF specification specifices which names the sections containing DWARF information should have. OSX uses slightly different names. This patch changes the DWARF reader to look for the sections under both sets of names. a=jimblandy, r=ccoutant git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@493 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add new file missed in r490.jimblandy2010-01-141-0/+8
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@492 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: STABS reader incorrectly assumes a single compilation ↵jimblandy2010-01-143-35/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | unit The stabs reading code in google-breakpad incorrectly assumes that the stabs data is a single compilation unit. Specifically, it ignores N_UNDF stabs and assumes that all string indices are relative to the beginning of the .stabstr section. This is true when linking with the GNU linker by default, because the GNU linker optimizes stabs debug info. The gold linker does not do this optimization. It can be disabled when using the GNU linker with the --traditional-format command line option. For more details of the problem, see: http://sourceware.org/bugzilla/show_bug.cgi?id=10338 http://code.google.com/p/google-breakpad/issues/detail?id=359 This patch adds unit tests that reproduce the failure, and fixes the stabs parser. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@490 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad: Fix Emacs mode settings mingled with copyright notice text. jimblandy2010-01-123-3/+9
| | | | | | | a=jimblandy, r=mmentovai git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@484 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Google Breakpad DWARF reader: Add a handler function for DIE references.jimblandy2010-01-124-31/+70
| | | | | | | | | | | | | | | Add a new member function to dwarf2reader::Dwarf2Handler, ProcessAttributeReference, for reporting attribute values that are references to other DIEs. This handler member function always receives an absolute offset (that is, relative to the start of the .debug_info section, not to the start of the compilation unit), regardless of the form the attribute uses. (Some forms are CU-relative, some are absolute.) a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@482 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad DWARF Reader: Add DWARF language enumeration values.jimblandy2010-01-111-0/+36
| | | | | | | a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@479 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix solaris build breaknealsid2010-01-081-1/+1
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@476 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux Dumper: Fix up comments in google_breakpad::Module interface.jimblandy2009-12-231-7/+7
| | | | | | | | | Use the term "own", since ownership is the concept at work here. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@468 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 49003: Breakpad Linux Dumper: Add unit tests for STABS dumper.jimblandy2009-12-231-0/+175
| | | | | | | | | | | | Previous patches added unit tests for the STABS parser and the Breakpad symbol file writer; this adds unit tests for the "dumper" class that sits between them, receiving data from the parser and handing it to the writer. So now the whole pathway has coverage. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@467 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: Add unit tests for google_breakpad::Module.jimblandy2009-12-233-11/+331
| | | | | | | | | | | | | Adjust Module's interface a bit to facilitate testing: - Make AssignSourceIds something a client can call --- it's perfectly well-defined, so this is an okay change. - Add GetFunctions, GetFiles and FindExistingfile member functions, which the test harness will use to get results to examine. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@466 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux Dumper: Use proper sizes and radixes when writing Breakpad ↵jimblandy2009-12-231-7/+7
| | | | | | | | | | | | | | symbol files. A FUNC record's parameter size is also hexadecimal, and all values are 64 bits wide. A line record's address and size are 64 bits wide. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@465 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad Linux dumper: move DumpStabsHandler into its own file, for testing.jimblandy2009-12-233-211/+304
| | | | | | | | | This will make it easier to write unit tests for DumpStabsHandler. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@464 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 357: New Linux file_id code doesn't persist across strip. ↵ted.mielczarek2009-12-233-16/+162
| | | | | | r=agl,nealsid at http://breakpad.appspot.com/49008 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@461 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad DWARF parser: Fix up documentation for DWARF reader classes.jimblandy@gmail.com2009-12-182-33/+34
| | | | | | | | | | | | | | | | | | | | | | | Fix typos. For CompilationUnit::Start, I was confused by the '-' in the original comment, taking it for a parenthetic clause marker, assuming an implicit "of the next compilation unit" at the end of the sentence. The comments should refer to the ".debug_info" section, not the "debug_info" section. The latter is not the section name actually used on any system (ELF or Mach-O), and the former is the name prescribed by the DWARF spec. Some of the comments for ProcessAttribute* member functions claim that OFFSET is from the start of the compilation unit, but that's not so: the code has always passed an offset relative to the start of the .debug_info section. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@453 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 41004: Breakpad DWARF parser: fixes to compile without warnings under ↵jimblandy@gmail.com2009-12-152-1/+7
| | | | | | | | | GNU C++ 4.3.3. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@450 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 41003: Breakpad DWARF parser: Include <cstdio>, since we use itjimblandy@gmail.com2009-12-151-2/+2
| | | | | | | | | | | | | | | | src/common/dwarf/dwarf2reader.cc uses the old-fashioned <stdio.h> facilities to report errors. Ideally, we would add a 'Warning' message to the handler and make the client responsible for dealing with the errors, but this at least allows us to compile. Ubuntu 9.10 uses GCC 4.4.1; under older versions of GCC, this wasn't a problem, probably because stdio.h was being brought in inadvertently somewhere else. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@449 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 42002: Breakpad DWARF parser: avoid using <stdint.h> typejimblandy@gmail.com2009-12-153-3/+11
| | | | | | | | | | | | | | | | | | | | | It seems that a use of the <stdint.h> type uintptr_t has crept into the DWARF parser. This defines a workaround for the GNU compilers (tested on both Mac and Linux) which will raise an error if it doesn't work. My personal preference would be just to assume that the <stdint.h> header is available and use the standard types everywhere, but 1) that would be a large change, likely to make merges with the other branches of the DWARF parser more difficult, and 2) it would make it quite difficult to build under Microsoft Visual Studio, which doesn't have the <stdint.h> header; Microsoft has said they have no plans to provide it, as they would rather "focus their efforts" on C++ and .NET. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@448 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 42001: Breakpad Linux Dumper: remove compilation warnings in ↵jimblandy@gmail.com2009-12-151-4/+18
| | | | | | | | | | | | | | | | | | guid_creator.cc. Building on Ubuntu 9.10 with the distributed compiler (GCC 4.4.1), we get warnings like the following: guid_creator.cc:56: warning: dereferencing type-punned pointer will break strict-aliasing rules It doesn't matter in this case, but there's no crying need to use reinterpret casts in an endian-dependent way when there are plenty of well-defined ways to get the same effect. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@447 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 39002: Breakpad DWARF parser: Move DWARF parser to ↵jimblandy@gmail.com2009-12-1512-34/+34
| | | | | | | | | | | | | | | | platform-independent directory. Move the DWARF parser, and the functioninfo.cc DWARF consumer, from src/common/mac/dwarf to src/commmon/dwarf, so that it can be shared between the Mac and Linux dumpers. Fix up #include directives, multiple inclusion protection macros, and Xcode build files. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@446 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 26001: Linux dumper: fix comments in STABS readerjimblandy@gmail.com2009-12-152-24/+28
| | | | | | | | | | Typos; ambiguities; dangling references to arguments whose names got changed. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@445 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux dumper: Add unit tests for google_breakpad::StabsReader.jimblandy@gmail.com2009-12-156-0/+573
| | | | | | | | | | | | | | | | | | | | | | The test system is based on Google C++ Testing Framework and the Google C++ Mocking Framework. This includes a parser that turns human-readable input files ("mock stabs") into .stab and .stabstr section contents, which we can then pass to a StabsReader instance, using a handler object written with GoogleMock. The 'make check' target in src/tools/linux/dump_syms runs this. The supplied input file is pretty small, but I've done coverage testing, and it does cover the parser. I thought the mock stabs parser would be less elaborate than it turned out to be. Lesson learned. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@444 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 25003: Linux dumper: Fix infinite loop in stabs parser.jimblandy@gmail.com2009-12-151-1/+6
| | | | | | | | | | | | If the input passed to a StabsReader instance contains a compilation unit whose first entry is an N_SO with no name, the parser enters an infinite loop. Since such entries mark the end of a compilation unit, ProcessCompilationUnit should skip them. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@443 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 25002: Linux symbol dumper: Require STABS consumers to provide a ↵jimblandy@gmail.com2009-12-152-1/+9
| | | | | | | | | | | | | Warning member. The StabsHandler class should not provide a fallback definition for its Warning member function that just throws away warning messages. It should require the consumer to provide an appropriate definition. a=jimblandy, r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@442 4c0a9323-5329-0410-9bdc-e9ce6186880e
* issue 330 - linux_syscall_support.h has extra semicolons causing compilation ↵ted.mielczarek2009-12-031-3/+3
| | | | | | to fail with certain gcc options. Patch by Josh Aas <joshmoz@gmail.com>, r=me git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@436 4c0a9323-5329-0410-9bdc-e9ce6186880e
* issue 336 - Look for libcurl-gnutls in addition to libcurl.so. Patch by Karl ↵ted.mielczarek2009-12-031-0/+7
| | | | | | Tomlinson <karlt@mozbugz.karlt.net>, r=me git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@435 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Upstreaming several patches from Chrome:nealsid2009-12-014-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Build fix for systems where sys/user.h needs sys/types.h.... http://breakpad.appspot.com/40002 MDRawSystemInfo.processor_level refers to the CPU family, not the cpuid level.. http://breakpad.appspot.com/40003 Use MD_MODULE_SIZE in place of sizeof(MDRawModule). http://breakpad.appspot.com/39003 Linux x64 compile fix. http://breakpad.appspot.com/40004 Include linux_syscall_support.h to get definition of NT_PRXFPREG. This is Chromium commit 23659. http://breakpad.appspot.com/40005 Build breakpad / crash reporting on Linux 64-bit. This is Chromium commit 23396. http://breakpad.appspot.com/40006 Fix #includes in a couple unit tests. http://breakpad.appspot.com/41001 Clean up unused headers / files for Linux dump_syms. http://breakpad.appspot.com/40002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@432 4c0a9323-5329-0410-9bdc-e9ce6186880e
* don't output duplicate filenames in PDBSourceLineWriter. r=mark at ↵ted.mielczarek2009-11-232-3/+54
| | | | | | http://breakpad.appspot.com/43001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@431 4c0a9323-5329-0410-9bdc-e9ce6186880e
* output function names for PGO-optimized cold function blocks. r=mark at ↵ted.mielczarek2009-11-202-5/+67
| | | | | | http://breakpad.appspot.com/40007 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@430 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Issue 32002: Breakpad DWARF parser: Update char decls to be signedjimblandy@gmail.com2009-10-081-17/+23
| | | | | | | | a=jimblandy r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@410 4c0a9323-5329-0410-9bdc-e9ce6186880e
* 10.6 SDK compatibility fixes. No bug.mmentovai2009-10-064-2/+8
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@407 4c0a9323-5329-0410-9bdc-e9ce6186880e
* New uploader for Linux with unit tests, and gflags/glog librariesnealsid2009-09-295-0/+751
| | | | | | | | | | | http://breakpad.appspot.com/29004 A=nealsid R=chris masone at chromium org git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@403 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Breakpad: Don't use the deprecated __gnu_cxx::hash_map container.jimblandy@gmail.com2009-09-035-46/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Modern GNU compilers warn about the #inclusion of <ext/hash_map>; that container is deprecated, and code should use <tr1/unordered_map> instead. However, to stay within the boundaries of C++ '98, it's probably fine just to use plain old std::map. Breakpad uses hash_map in three cases: o The DWARF reader's SectionMap type maps object file section names to data. This map is consulted once per section kind per DWARF compilation unit; it is not performance-critical. o The Mac dump_syms tool uses it to map machine architectures to section maps in Universal binaries. It's hard to imagine there ever being more than two entries in such a map. o The processor's BasicSourceLineResolver uses a hash_map to map file numbers to file names. This is the map that will probably have the most entries, but it's only accessed once per frame, after we've found the frame's line entry. a=jimblandy r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@393 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Provide a real std::string hash, not just a forward declaration for somethingmmentovai2009-08-201-8/+19
| | | | | | | | | | | that doesn't exist. TBR=nealsid Code review URL: http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/292f9ed79dfdbdde git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@391 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Merge of Breakpad Chrome Linux forknealsid2009-08-178-83/+3450
| | | | | | | | | A=agl, Lei Zhang R=nealsid, agl git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@384 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux dumper: fix comments in src/common/linux/module.hjimblandy@gmail.com2009-08-071-13/+15
| | | | | | | | | | | Fix some typos and references to member functions that didn't make the final cut. a=jimblandy r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@381 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux dumper: Move the data structures representing the breakpad data into ↵jimblandy@gmail.com2009-08-073-446/+574
| | | | | | | | | | | | | | | | | | | | | | | their own class. src/linux/common/module.h defines a new class, google_breakpad::Module, that can represent the contents of a breakpad symbol file. Module::Write writes a well-formed symbol file to the given stream. src/linux/common/dump_symbols.cc can now lose its symbol-file-writing code, and change DumpStabsHandler to populate a Module object, rather than the old SymbolInfo/SourceFileInfo/... collection of types. The code to compute function and line sizes, even in the absence of reliable size data in STABS, is moved into a new Finalize method of DumpStabsHandler, which is responsible for completing the Module's contents. a=jimblandy r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@380 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Add files left behind by previous commit.jimblandy@gmail.com2009-08-072-0/+383
| | | | git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@379 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux dumper: Move STABS parsing into its own class.jimblandy@gmail.com2009-08-071-135/+107
| | | | | | | | | | | | | With this patch, dump_symbols.cc no longer knows about the details of the STABS debugging format; that is handled by the StabsReader class. dump_symbols.cc provides a subclass of StabsHandler that builds dump_symbols' own representation of the data. a=jimblandy r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@378 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux dumper: Make the 'name' field of FuncInfo a std::string instead of a ↵jimblandy@gmail.com2009-08-051-10/+13
| | | | | | | | | | | | | | | | | | | char *. Because the actual N_FUN strings in the .stabstr section contain type information after the mangled name, representing this information using a pointer into .stabstr, while efficient with memory, makes the FuncInfo data structure STABS-specific: one must know the details of a STABS N_FUN string's syntax to interpret FuncInfo::name. This patch removes this STABS dependency from the data structure, and moves us closer to having an appropriate structure for representing unified STABS and DWARF data. a=jimblandy r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@375 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Linux dumper: Properly separate function names from STABS type data.jimblandy@gmail.com2009-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | STABS strings for N_FUN entries contain a mangled function name, followed by a colon, followed by type information. The type information itself may contain colons; mangled names never contain colons (they need to be legal assembly-language identifiers). So the current code in src/common/linux/dump_symbols.cc:WriteOneFunction that attempts to separate the mangled name from the STABS junk will incorrectly include STABS junk in the name, causing demangling to fail. Applying the patch below results in changes like these in the symbol file produced, where an unmangled name followed by STABS junk becomes a properly demangled name: ## --- base/libxul.so.syms 2009-07-13 21:46:33.000000000 -0700 ## +++ tip/libxul.so.syms 2009-07-13 21:51:04.000000000 -0700 ## @@ -3907,7 +3907,7 @@ ## FILE 3905 /home/jimb/mc/in/gfx/cairo/libpixman/src/pixman-region.c ## FILE 3906 combine.inc ## FILE 3907 /home/jimb/mc/in/gfx/cairo/libpixman/src/pixman-edge-imp.h ## -FUNC 19898c 54 0 _Z20NS_GetCaseConversionv:F(0,1201)=*(0,1202)=xsnsICaseConvers ## ion ## +FUNC 19898c 54 0 NS_GetCaseConversion() ## 19898c 12 54 1 ## 19899e 9 56 1 ## 1989a7 6 60 1 ## @@ -214776,7 +214776,7 @@ ## 3847c9 9 57 506 ## 3847d2 13 58 506 ## 3847e5 7 59 506 ## -FUNC 387e89 27 0 _ZN20nsGenericHTMLElement11FromContentEP10nsIContent:F(0,8117) ## =*(0,8118)=xsnsGenericHTMLElement ## +FUNC 387e89 27 0 nsGenericHTMLElement::FromContent(nsIContent*) ## 387e89 7 80 2584 ## 387e90 3 80 2584 ## 387e93 e 82 2584 ## @@ -250473,7 +250473,7 @@ ## 3d0d88 7 82 548 ## 3d0d8f 25 84 548 ## 3d0db4 5 85 548 ## -FUNC 3d0e0c 40 0 _ZL21GetEnclosingListFrameP8nsIFrame:f(0,7182)=*(0,7183)=xsnsL ## istControlFrame ## +FUNC 3d0e0c 40 0 GetEnclosingListFrame(nsIFrame*) ## 3d0e0c 5 146 549 ## 3d0e11 3 722 2645 ## 3d0e14 d 146 549 a=jimblandy r=nealsid git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@374 4c0a9323-5329-0410-9bdc-e9ce6186880e