Commit Graph

877 Commits

Author SHA1 Message Date
mark@chromium.org
60a883212f Fix CalculateStackSize to behave properly when the main thread's stack is
split up into multiple regions.

An older workaround relyied on known fixed stack locations and only filled in
the initial page of the stack if it was in a distinct region. The new approach
looks upwards for additional regions that appear to be part of the same stack.

With PIE on Lion, the stack no longer begins at a fixed address, so the older
workaround became ineffective.

BUG=247, chromium:94107
TEST=Stacks should run through to _main/start and then stop when examining
     Chrome on Lion with PIE and "slid" stacks.
Review URL: http://breakpad.appspot.com/300001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@826 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-25 21:19:29 +00:00
mark@chromium.org
7b8b8632d3 The process_id field is unsigned, so we need this cast in c++0x.
Patch by Rafael Ávila de Espí­ndola <respindola@mozilla.com>

https://bugzilla.mozilla.org/show_bug.cgi?id=677644


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@825 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-11 13:47:38 +00:00
mark@chromium.org
e6c0689091 The first field in a MDLocationDescriptor is a u_int32_t, so change this cast
to the correct type. This fixes an error newer clang versions find in c++ 0x
mode.

Patch by Rafael Ávila de Espí­ndola <respindola@mozilla.com>

https://bugzilla.mozilla.org/show_bug.cgi?id=677641


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@824 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-11 13:45:30 +00:00
mark@chromium.org
8f2b058398 Fix clang warnings.
Review URL: http://breakpad.appspot.com/298002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@823 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-11 13:40:13 +00:00
mark@chromium.org
3c59c247e2 Zero out the entire context on MD5_Final, not just the number of bytes in a
pointer.
Review URL: http://breakpad.appspot.com/298001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@822 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-11 13:39:44 +00:00
mark@chromium.org
ba5ee2c8f5 Remove a bogus const.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@821 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-08-10 15:29:52 +00:00
ted.mielczarek
1b9920afa7 Fix a typo in r817
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@820 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-27 18:29:37 +00:00
mark@chromium.org
e919fdd63b Wean Mac Breakpad off of its OpenSSL libcrypto dependency.
This libcrypto dependency sucks. Linking against OpenSSL is sort of broken in
certain Mac OS X SDKs. libcrypto was only being used to provide an MD5
implementation. Breakpad already has its own MD5 implementation, so just use
that instead.

To be perfectly honest, on modern systems, nothing should be making MD5
hashes of modules anyway, because everything has an embedded LC_UUID.

The project file changes just remove libcrypto and add md5.c as needed.

A bonus (and untested) fix for on_demand_symbol_supplier.mm is included to
account for changes in r794.
Review URL: http://breakpad.appspot.com/296001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@819 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-27 14:30:58 +00:00
ted.mielczarek
48550041f9 Switch mac DumpSymbols::WriteSymbolFile to take an ostream instead of a FILE* to match the changes to Module::Write
R=mark at http://breakpad.appspot.com/294001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@818 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-26 14:03:09 +00:00
ted.mielczarek@gmail.com
d01a9f8bc4 Fix compilation using the OS X 10.7 SDK by #ifdefing out PPC support when targeting 10.7, as PPC support has been removed from the 10.7 SDK
A=Rafael Ávila de Espíndola <respindola@mozilla.com>, R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=673789

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@817 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-26 12:00:20 +00:00
jessicag.feedback@gmail.com
1cbdeae78d Fix a sizeof(pointer) vs sizeof(pointee) issue caught by client.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@815 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-21 21:38:01 +00:00
ted.mielczarek
32d04cdbbc Remove curl/types.h include, since this header has been deprecated for a long time and removed in a recent curl release.
P=Evan Shaw <edsrzf@gmail.com> R=ted

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@814 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-21 17:44:48 +00:00
ted.mielczarek
69607b678f Remove NetworkSourceLine{Resolver,Server} and related code. It never wound up being useful enough to use in production, so let's drop the maintenence burden
R=jessicag at http://breakpad.appspot.com/292001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@795 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-07 20:53:52 +00:00
ted.mielczarek
3ca4a120de 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
2011-07-06 17:05:59 +00:00
ted.mielczarek
b2f96f314c Dump PUBLIC + CFI records from libraries without debug info on Linux, use .dynsym for symbol names if there are no usable debug symbols.
R=jimb at http://breakpad.appspot.com/275001/show

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@793 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-06 17:05:49 +00:00
mmentovai
be55cc8cf0 Fix an assertion encountered in UntypedMDRVA::Copy().
Fix an assertion where a zero-length buffer was being passed to
UntypedMDRVA::Copy().  This occurred when WriteFile() was given a file whose
size was a multiple of the temporary buffer size.  In this issue's case, the
procfs file "environ" happened to be 2032 bytes, while the temporary buffer
was 1016 bytes.

Patch by Michael Krebs <mkrebs@chromium.org>


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@792 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-07-01 01:20:27 +00:00
jessicag.feedback@gmail.com
df33e47bb4 Delete OS failing test cases and note failure in relevant .h file.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@791 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-06-21 18:34:01 +00:00
ted.mielczarek@gmail.com
dcebaf42ba Add some headers necessary to build the Linux client code with the Android NDK r5
P=Alon Zakai <azakai@mozilla.com>, R=ted

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@790 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-05-31 12:12:30 +00:00
cdn@chromium.org
94074a84d0 Fix null derefs in x86 dissasembler code.
BUG=428
TEST=N/A
Review URL: http://breakpad.appspot.com/285001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@789 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-05-12 19:11:26 +00:00
ted.mielczarek
1807e385d7 Fix linux-gate handling in LinuxDumper so it gets a valid debug ID
A=ted R=nealsid at http://breakpad.appspot.com/284001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@788 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-05-06 23:23:31 +00:00
vitalybuka@chromium.org
04023b1f6a Fixed message about unregistered msdia*dll. Builds with different DiaSDK need different dll.
Rebuilt with Visual Studio 2008.
Slightly improved refresh_binaries.bat.

BUG=none
TEST=none
Review URL: http://breakpad.appspot.com/281001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@787 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-04-26 20:52:48 +00:00
mmentovai
fd557e4a97 Use task_info(..., TASK_DYLD_INFO, ...) on 10.6 and later in preference to
looking up the _dyld_all_image_infos symbol in /usr/lib/dyld.
Review URL: http://breakpad.appspot.com/276001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@786 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-04-05 16:05:17 +00:00
jessicag.feedback@gmail.com
23c82999a8 Another attempt at signed / unsigned int resolution for linux minidump writer.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@785 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-30 21:42:27 +00:00
jessicag.feedback@gmail.com
3b3f0c3f61 Adding header files at the request of Chrome.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@784 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-22 02:50:41 +00:00
jessicag.feedback@gmail.com
322818287c Add trusted check
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@783 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-22 00:29:37 +00:00
jimblandy
a4a9922512 Issue 417: update unit tests after adding unnamed function detection
In r779, at the last moment, I added a default call count expectation for
the UnnamedFunction warning to the CUFixtureBase constructor, but didn't
re-run the tests. This patch adjusts all affected tests.

a=jimblandy, r=ted.mielczarek


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@782 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-14 17:35:26 +00:00
ted.mielczarek
b0201df935 Merge adjacent mappings with the same name into one module in LinuxDumper.
A=Mike Hommey <mh+mozilla@glandium.org> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=637316

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@781 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-14 17:04:09 +00:00
SiyangXie@gmail.com
88fa7cfc6b Protect "std::max", "std::min" against MACROs defined in WinDef.h.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@780 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-11 22:47:07 +00:00
jimblandy
fd18beeb5c Google Breakpad Issue 417: Handle DWARF that omits function names.
This patch makes sure dump_syms behaves properly when presented with
malformed DWARF data that provides no name for a function. We print a
warning message to stderr, and subsitute "<name omitted>" for the empty
string, so that the "FUNC" record written to the symbol file for the
function is still well-formed. (We may have line number data covering the
function, so it would be a shame to omit the function altogether.)

Unit tests included.
a=jimblandy, r=ted.mielczarek


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@779 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-11 22:16:12 +00:00
ted.mielczarek
bf25801d83 Put PUBLIC lines in Mac symbol files.
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
2011-03-04 16:08:39 +00:00
jessicag.feedback@gmail.com
68b256aed3 Updating to ints from unsigned ints so -1 will be an acceptable value.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@777 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-03 00:42:11 +00:00
jessicag.feedback@gmail.com
248d340b71 Fix compiler warning.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@776 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-03-01 20:47:27 +00:00
ted.mielczarek
dbf409ca20 Make programs in src/tools/linux build via the automake build system
R=jimb at http://breakpad.appspot.com/265001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@775 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-02-28 14:05:22 +00:00
mmentovai
d2b6b9ae82 Fix breakpad compilation on ubuntu 10.10.
Patch by Marc-Antoine Ruel <maruel@chromium.org>

Review URL: http://breakpad.appspot.com/264001


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@774 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-02-18 19:12:06 +00:00
ted.mielczarek
cff9fdbd94 enable writing INFO CODE_ID line in symbol files
R=mark (originally from http://breakpad.appspot.com/180001)

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@773 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-02-15 13:39:08 +00:00
ted.mielczarek
1530800640 Fix printing of x86_64 registers from minidump_stackwalk
R=mark at http://breakpad.appspot.com/262001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@772 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-02-14 19:23:35 +00:00
SiyangXie@gmail.com
0afda6b2c2 Fix(part II) for r768 about external item "src/third_party/glog".
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@770 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-02-02 22:48:26 +00:00
SiyangXie@gmail.com
5a73dd4a2b Fix(part I) for r768 about external item "src/third_party/glog".
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@769 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-02-02 22:39:50 +00:00
SiyangXie@gmail.com
ee8c48cc20 Update svn:externals property to add glog to correct path.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@768 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-02-01 19:49:48 +00:00
ted.mielczarek
ad35fbc56a Dump MD_LINUX_MAPS from minidump_dump
R=kmixter at http://breakpad.appspot.com/261001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@767 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-28 18:53:02 +00:00
ted.mielczarek
ed1c70b5b8 Expose actual instruction from DisassemblerX86
R=cdn at http://breakpad.appspot.com/260001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@766 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-26 22:13:37 +00:00
ted.mielczarek
d328f2011f Rename duplicate argument names to make it compile with CLang.
P=rafael.espindola R=ted at http://breakpad.appspot.com/248001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@765 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-25 20:01:26 +00:00
ted.mielczarek
eba8cc5172 Add missing constructor to CPPLanguage class to make it compile with CLang.
P=rafael.espindola R=jimb at https://bugzilla.mozilla.org/show_bug.cgi?id=623121

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@764 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-25 20:01:22 +00:00
ted.mielczarek
0df0555e75 Use a MinidumpCallback to force minidumps on Windows to include memory around the faulting instruction pointer. Older versions of DbgHelp don't seem to do this correctly (on Windows XP, for example)
R=mark at http://breakpad.appspot.com/259001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@763 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-25 19:19:19 +00:00
ted.mielczarek
9220e0baf1 Round-trip client/processor unittests for Windows
R=mark at http://breakpad.appspot.com/258001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@762 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-24 19:59:14 +00:00
ted.mielczarek
281d52d944 Fix some apparently longstanding crash bugs in Stackwalker implementations when resolver is NULL.
R=mark at http://breakpad.appspot.com/257001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@761 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-24 19:59:09 +00:00
mmentovai
b904343e14 Fix clang warning / miscompile.
Patch by Nico Weber <thakis@chromium.org>

Review URL: http://breakpad.appspot.com/256001


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@760 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-24 19:20:10 +00:00
ted.mielczarek
b7fdc7396d Add module_serializer.cc to libbreakpad.a. Not sure why it wasn't there in the first place. Trivial patch, landing without review.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@759 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-19 17:02:10 +00:00
ted.mielczarek
7b8e2b7e09 Add MinidumpMemoryInfo / MinidumpMemoryInfoList classes to expose MDRawMemoryInfo / MDRawMemoryInfoList via the Minidump class
R=mark at http://breakpad.appspot.com/255001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@755 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-13 19:05:33 +00:00
ted.mielczarek
80745c59de Add structure definitions for the memory info list, as well as some other new enum values.
R=mark at http://breakpad.appspot.com/254001

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@754 4c0a9323-5329-0410-9bdc-e9ce6186880e
2011-01-13 19:05:29 +00:00