external/google-breakpad/src.git
29 hours agoModify minidump_stackwalk to be more tolerant of overlapping ranges. master
wfh@chromium.org [Sat, 20 Dec 2014 00:47:07 +0000 (00:47 +0000)]
Modify minidump_stackwalk to be more tolerant of overlapping ranges.

These ranges can be seen in some Android minidumps.

BUG=chromium:439531
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/9744002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1412 4c0a9323-5329-0410-9bdc-e9ce6186880e

9 days agoAdd microdump files to project.
jessicag.feedback@gmail.com [Thu, 11 Dec 2014 19:30:37 +0000 (19:30 +0000)]
Add microdump files to project.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1411 4c0a9323-5329-0410-9bdc-e9ce6186880e

10 days agoRemove pointers from serialized file format
mdempsky@chromium.org [Thu, 11 Dec 2014 01:17:43 +0000 (01:17 +0000)]
Remove pointers from serialized file format

BUG=breakpad:621
R=thestig@chromium.org

Review URL: https://breakpad.appspot.com/1764002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1410 4c0a9323-5329-0410-9bdc-e9ce6186880e

10 days agoBreakpad: Fix build with new clang versions.
mark@chromium.org [Wed, 10 Dec 2014 16:08:09 +0000 (16:08 +0000)]
Breakpad: Fix build with new clang versions.

gcc has a single exception setting for all languages. Saying -fno-exceptions
in gcc disables exceptions and cleanups for cc files, but has no effect for mm
files.

In clang, -fno-exceptions only disables c++ exceptions, but keeps objective-c
exceptions and cleanups enabled.

http://llvm.org/viewvc/llvm-project?view=revision&revision=220714 changed
__EXCEPTIONS to be defined for clang when cleanups are enabled, independent of
if c++ exceptions are enabled. (This was necessary to have clang work with
glibc which looks at __EXCEPTIONS to decide if cleanups are enabled.)

Breakpad tried to use __EXCEPTIONS to figure out if c++ exceptions are enabled.
In cc files, this works: -fno-exceptions will disable c++ exceptions and
cleanups. But in mm files, -fno-exceptions will disable c++ exceptions and
objective-c exceptions will still be enabled, and so cleanups must run and hence
__EXCEPTIONS is defined.

To make things work with both old and new compilers, do the try/catch hack in
mm files either if __EXCEPTIONS is not defined (for old compilers) or if the
compiler is clang and __has_feature(cxx_exceptions) isn't set (which will work
for new clangs too, and which cleanly maps to if c++ exceptions are enabled).

Patch by Nico Weber <thakis@chromium.org>

Review URL: https://breakpad.appspot.com/1774002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1409 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 weeks agodump_syms: Fix handling of DW_FORM_ref_addr to work with DWARF 4
mseaborn@chromium.org [Wed, 3 Dec 2014 20:39:55 +0000 (20:39 +0000)]
dump_syms: Fix handling of DW_FORM_ref_addr to work with DWARF 4

Previously, dump_syms did not handle DW_FORM_ref_addr if it appeared
in DWARF 4 debugging info.

Also fix a DW_FORM_ref_addr case so that it doesn't fall through to
the next switch case when assertions are disabled and the DWARF
version isn't recognised.

The following steps will reproduce the problem when using LLVM 3.4:

cat <<END >example1.c
int main() { return 0; }
END
cat <<END >example2.c
void foo(int x) {}
END

clang -emit-llvm -g -c example1.c -o example1.bc
clang -emit-llvm -g -c example2.c -o example2.bc
llvm-link-3.4 example1.bc example2.bc -o combined.bc
clang combined.bc -o executable
./google-breakpad/build/src/tools/linux/dump_syms/dump_syms executable

When using LLVM bitcode linking in this way, LLVM's backend generates
partially-merged DWARF debugging info in which some of the references
to the "int" type go via "DW_FORM_ref_addr".  Since PNaCl uses LLVM
bitcode linking, this dump_syms failure occurs with nexes produced by
the PNaCl toolchain.

BUG= https://code.google.com/p/chromium/issues/detail?id=416368
TEST= see above
R=mark@chromium.org, mcgrathr@chromium.org

Review URL: https://breakpad.appspot.com/5744002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1408 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 weeks agoMicrodumps: support aarch64 and lib mapping from APK
primiano@chromium.org [Tue, 2 Dec 2014 15:31:25 +0000 (15:31 +0000)]
Microdumps: support aarch64 and lib mapping from APK

- Filter modules by prot flags (only +x) not extensions. It wouldn't
  otherwise catch the case of Chrome mapping the library from the
  apk (which is mapped r-x but doesn't end in .so).
- Use compile-time detection of target arch, in order to cope with
  multilib OSes, where uname() doesn't reflect the run-time arch.
- Add OS information and CPU arch / count.
- Add support for aarch64.
- Add tests and stackwalk expectations for aarch64.
- Fix a potential overflow bug in the processor.
- Rebaseline the tests using smaller symbols.
- Fix microdump_writer_unittest.cc on 32-bit host.

BUG=chromium:410294

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1407 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 weeks agoSurfacing the process create time in google_breakpad::ProcessState
ivanpe@chromium.org [Tue, 25 Nov 2014 22:45:23 +0000 (22:45 +0000)]
Surfacing the process create time in google_breakpad::ProcessState
and updating minidump_stackwalk to show process uptime.

I tested this with a minidump from Chrome and I got a result that
is inline with what the Windows debugger is showing for that dump:

minidump_stackwalk output:
--------------------------
Process uptime: 601 seconds

WinDBG output:
--------------
Process Uptime: 0 days 0:10:01.000

I didn't update the machine readable output of minidump_stackwalk
on purpose in order to avoid breaking someone that uses it.
It can be added later to the machine output if needed.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/7754002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1406 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 weeks agoIntroduce microdump_stackwalk comand line executable
primiano@chromium.org [Tue, 25 Nov 2014 11:36:38 +0000 (11:36 +0000)]
Introduce microdump_stackwalk comand line executable

This introduces the microdump_stackwalk binary which takes advantage
of the MicrodumpProcessor to symbolize microdumps.
Its operation is identical to the one of minidump_stackwalk.
This CL, in fact, is also refactoring most of the common bits into
stackwalk_common.

BUG=chromium:410294
R=mmandlis@chromium.org

Review URL: https://breakpad.appspot.com/4704002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1405 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 weeks agoFix microdump_writer and add unittest.
primiano@chromium.org [Tue, 25 Nov 2014 10:35:53 +0000 (10:35 +0000)]
Fix microdump_writer and add unittest.

This adds some small fixes to the microdump writer and introduces
a unittest.

BUG=chromium:410294
R=mmandlis@chromium.org

Review URL: https://breakpad.appspot.com/2814002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1404 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 weeks agoMicrodump processing implementation
mmandlis@chromium.org [Wed, 19 Nov 2014 21:33:26 +0000 (21:33 +0000)]
Microdump processing implementation

According to design document: http://goo.gl/B3wIRN
This is an initial implementation version, support ARM architecture only.

BUG=chromium:410294
R=primiano@chromium.org

Review URL: https://breakpad.appspot.com/5714003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1403 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 weeks agoAdd parameter --product to symupload.exe
ivanpe@chromium.org [Mon, 17 Nov 2014 22:47:05 +0000 (22:47 +0000)]
Add parameter --product to symupload.exe

Adding an optional parameter --product to symupload.exe.  If specified it will be passed to the symbol server as POST parameter 'product'.

As part of this, I'm also fixing:
 - Removed the .vcproj file as it can be generated from the .gyp file on demand.
 - error C4335: Mac file format detected.  Fixed the line endings for omap.cc and dia_util.cc.
 - warning C4003: not enough actual parameters for macro 'max'

Symupload.exe was compiled using MSVS 2013 and DIA SDK 12.0.

Review URL: https://breakpad.appspot.com/9734002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1402 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 weeks agoFix UMR and potential crash in Mac dump_syms.
mark@chromium.org [Wed, 5 Nov 2014 17:40:47 +0000 (17:40 +0000)]
Fix UMR and potential crash in Mac dump_syms.

Patch by Robert Sesek <rsesek@chromium.org>

BUG=https://code.google.com/p/google-breakpad/issues/detail?id=614
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/9724002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1401 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 weeks agoRead dynamic symbols table even if binary contains debug info
ted.mielczarek@gmail.com [Mon, 3 Nov 2014 18:25:43 +0000 (18:25 +0000)]
Read dynamic symbols table even if binary contains debug info
A=Wander Lairson Costa <wcosta@mozilla.com>. R=ted at https://breakpad.appspot.com/9684002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1400 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 weeks agoFix Windows client compilation on mingw.
ted.mielczarek@gmail.com [Mon, 3 Nov 2014 17:05:39 +0000 (17:05 +0000)]
Fix Windows client compilation on mingw.
A=Jacek Caban <jacek@codeweavers.com>, R=ted at http://breakpad.appspot.com/548002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1399 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 weeks agoIntroduce microdump writer class.
primiano@chromium.org [Tue, 28 Oct 2014 16:45:14 +0000 (16:45 +0000)]
Introduce microdump writer class.

Microdumps are a very lightweight variant of minidumps. They are meant
to dump a minimal crash report on the system log (logcat on Android),
containing only the state of the crashing thread.
This is to deal with cases where the user has opted out from crash
uploading but we still want to generate meaningful information on the
device to pull a stacktrace for development purposes.
Conversely to conventional stack traces (e.g. the one generated by
Android's debuggerd or Chromium's base::stacktrace) microdumps do NOT
require unwind tables to be present in the target binary. This allows
to save precious binary size (~1.5 MB for Chrome on Arm, ~10 MB on
arm64).
More information and design doc on crbug.com/410294

BUG=chromium:410294

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1398 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 weeks agoFix breakpad on mips and x86_64 for the NDK r10c update.
primiano@chromium.org [Fri, 24 Oct 2014 10:58:38 +0000 (10:58 +0000)]
Fix breakpad on mips and x86_64 for the NDK r10c update.

This change introduces the necessary glue typedefs to deal with the
mismatch introduced by the latest Android NDK (w.r.t. desktop Linux):
- [x86_64] Rename fpregs mxcr_mask -> .mxcsr_mask
- [mips] uc_mcontext.fpregs.fp_r.fp_dregs -> uc_mcontext.fpreg
- [mips] restore the forked user.h

Submitting this on behalf of fdegans@chromium.org

TBR=mark@chromium.org

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1397 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 weeks agoUpdate breakpad to support Android NDK r10c
primiano@chromium.org [Tue, 21 Oct 2014 13:50:27 +0000 (13:50 +0000)]
Update breakpad to support Android NDK r10c

Prior to NDK r10c, Breakpad was privately backporting these system
headers. This change is now unforking and removing those headers and
using the ones from the NDK.
Rationale:
 - They are finally available in the NDK, so there is no need to keep
   maintaining a fork (which was necessary up until recently to support
   arm64).
 - These forked headers, as they are today, are not compatible with the
   latest NDK (i.e. this change is required to roll NDK r10c).
   The forked ucontext.h, being removed by this CL, depends on some
   transitional features which are not compatible with the NDK release
   being targeted here.

After this change, the NDK r10c is now required to build Breakpad on
Android. Note that NDK releases are backwards compatible and contain all
the previous API levels, so this change is NOT effectively enforcing to
build against any particular Android SDK.

Submitting this on behalf of fdegans@chromium.org

BUG=chromium:358831
R=mark@chromium.org, primiano@chromium.org, rmcilroy@chromium.org

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1396 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 weeks agoRevert "Remove unecessary headers following NDK r10c update."
primiano@chromium.org [Tue, 21 Oct 2014 10:20:41 +0000 (10:20 +0000)]
Revert "Remove unecessary headers following NDK r10c update."

This reverts r1394.
Reason for the revert: r1394 is breaking compatibility with previous
NDK (< r10c).

BUG=chromium:358831
R=rmcilroy@chromium.org

Review URL: https://breakpad.appspot.com/6754003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1395 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoRemove unecessary headers following NDK r10c update.
primiano@chromium.org [Tue, 21 Oct 2014 08:30:28 +0000 (08:30 +0000)]
Remove unecessary headers following NDK r10c update.

BUG=chromium:358831
R=primiano@chromium.org, rmcilroy@chromium.org

Review URL: https://breakpad.appspot.com/10694002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1394 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoFixing the Mac Inspector build by adding the launch_report dependency to the breakpad...
ivanpe@chromium.org [Fri, 17 Oct 2014 17:44:09 +0000 (17:44 +0000)]
Fixing the Mac Inspector build by adding the launch_report dependency to the breakpadUtilities dylib project after it got pulled out from Inspector.mm

This fix was provided by Thomas Schweitzer.

R=mark@chromium.org, mmandlis@chromium.org

Review URL: https://breakpad.appspot.com/6754002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1393 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoRefactor .so name detection logic in minidump/linux_dumper.
primiano@chromium.org [Fri, 17 Oct 2014 10:58:23 +0000 (10:58 +0000)]
Refactor .so name detection logic in minidump/linux_dumper.

This is a refactoring of the logic which determines the
module name and path for a given MappingInfo in minidump_writer.cc.
Such logic, which will be soon shared also with the upcoming
microdump_writer.cc, is simply being moved to linux_dumper.cc,
extracting a GetMappingEffectiveNameAndPath method.
No behavioral change is intended.

BUG=chromium:410294
R=thestig@chromium.org

Review URL: https://breakpad.appspot.com/7734002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1392 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoThe process uptime computation when the Windows out-of-process Crash Generation
ivanpe@chromium.org [Wed, 15 Oct 2014 17:15:55 +0000 (17:15 +0000)]
The process uptime computation when the Windows out-of-process Crash Generation
Server is used is done by subtracting the crashing process creation time from
the current time when the crash is generated:

  uptime = now - process_creation_time

There was a bug and instead of the process creation time the code was using the
time when the process was registered with the Crash Generation Server.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1744002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1391 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoLinux multiprocess crash reporter: use pipe instead of socketpair in the client
ted.mielczarek@gmail.com [Thu, 9 Oct 2014 19:34:31 +0000 (19:34 +0000)]
Linux multiprocess crash reporter: use pipe instead of socketpair in the client
A=Jed Davis <jld@mozilla.com> R=ted at https://breakpad.appspot.com/1724002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1390 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoRemove workaround for Linux credential-passing bug
ted.mielczarek@gmail.com [Thu, 9 Oct 2014 19:34:27 +0000 (19:34 +0000)]
Remove workaround for Linux credential-passing bug
A=Jed Davis <jld@mozilla.com> R=ted at https://breakpad.appspot.com/7724002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1389 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoMicrodumps: refactor out common parts of minidump_writer.cc
primiano@chromium.org [Wed, 1 Oct 2014 09:51:23 +0000 (09:51 +0000)]
Microdumps: refactor out common parts of minidump_writer.cc

This change is a pure refactoring of the common bits of minidump_writer.cc
that will be shared soon with the upcoming microdump_writer.cc.
In particular, this CL is extracting the following classes:
- ThreadInfo: handles the state of the threads in the crashing process.
- RawContextCPU: typedef for arch-specific CPU context structure.
- UContextReader: Fills out a dump RawContextCPU structure from the
  ucontext struct provided by the kernel (arch-dependent).
- SeccompUnwinder: cleans out the stack frames of the Seccomp sandbox
  on the supported architectures.
- MappingInfo: handles information about mappings

BUG=chromium:410294
R=mmandlis@chromium.org

Review URL: https://breakpad.appspot.com/4684002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1388 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoFix some nits raised by Timur for r1385.
thestig@chromium.org [Wed, 24 Sep 2014 18:44:38 +0000 (18:44 +0000)]
Fix some nits raised by Timur for r1385.

R=ivanpe@chromium.org

Review URL: https://breakpad.appspot.com/1734002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1387 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoIWYU in minidump_writer.cc to fix building with libc++ after r1385.
thestig@chromium.org [Wed, 24 Sep 2014 18:44:29 +0000 (18:44 +0000)]
IWYU in minidump_writer.cc to fix building with libc++ after r1385.

R=ivanpe@chromium.org

Review URL: https://breakpad.appspot.com/6744002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1386 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoLinux: Call memset() in a couple places in ExceptionHandler to avoid uninit memory...
thestig@chromium.org [Tue, 23 Sep 2014 20:30:09 +0000 (20:30 +0000)]
Linux: Call memset() in a couple places in ExceptionHandler to avoid uninit memory reads under Valgrind.

Also move private static variables into the .cc file.

BUG=chromium:332335
R=ivanpe@chromium.org

Review URL: https://breakpad.appspot.com/5734002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1385 4c0a9323-5329-0410-9bdc-e9ce6186880e

2 months agoFix clang compilation error introduced in r1380.
rmcilroy@chromium.org [Mon, 22 Sep 2014 16:56:20 +0000 (16:56 +0000)]
Fix clang compilation error introduced in r1380.

Fixes:
  .../linux_dumper.cc:308:25: error: address of array 'module->name' will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                module->name && module->name[0] == '/' &&
                ~~~~~~~~^~~~

BUG=chromium:394703
R=rmcilroy@chromium.org

Review URL: https://breakpad.appspot.com/5724002

Patch from Simon Baldwin <simonb@chromium.org>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1384 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoAdd inttypes for windows in dump_context
mmandlis@chromium.org [Fri, 19 Sep 2014 16:19:18 +0000 (16:19 +0000)]
Add inttypes for windows in dump_context

BUG=https://code.google.com/p/google-breakpad/issues/detail?id=606
R=primiano@chromium.org

Review URL: https://breakpad.appspot.com/6734002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1381 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoExtend mapping merge to include reserved but unused mappings.
rmcilroy@chromium.org [Fri, 19 Sep 2014 15:00:04 +0000 (15:00 +0000)]
Extend mapping merge to include reserved but unused mappings.

When parsing /proc/pid/maps, current code merges adjacent entries that
refer to the same library and where the start of the second is equal to
the end of the first, for example:

  40022000-40025000 r-xp 00000000 b3:11 827        /system/lib/liblog.so
  40025000-40026000 r--p 00002000 b3:11 827        /system/lib/liblog.so
  40026000-40027000 rw-p 00003000 b3:11 827        /system/lib/liblog.so

When the system linker loads a library it first reserves all the address
space required, from the smallest start to the largest end address, using
an anonymous mapping, and then maps loaded segments inside that reservation.
If the loaded segments do not fully occupy the reservation this leaves
gaps, and these gaps prevent merges that should occur from occurring:

  40417000-4044a000 r-xp 00000000 b3:11 820        /system/lib/libjpeg.so
4044a000-4044b000 ---p 00000000 00:00 0
  4044b000-4044c000 r--p 00033000 b3:11 820        /system/lib/libjpeg.so
  4044c000-4044d000 rw-p 00034000 b3:11 820        /system/lib/libjpeg.so

Where the segments that follow this gap do not contain executable code
the failure to merge does not affect breakpad operation.  However, where
they do then the merge needs to occur.  Packing relocations in a large
library splits the executable segment into two, resulting in:

  73b0c000-73b21000 r-xp 00000000 b3:19 786460     /data/.../libchrome.2160.0.so
73b21000-73d12000 ---p 00000000 00:00 0
  73d12000-75a90000 r-xp 00014000 b3:19 786460     /data/.../libchrome.2160.0.so
  75a90000-75c0d000 rw-p 01d91000 b3:19 786460     /data/.../libchrome.2160.0.so

Here the mapping at 73d12000-75a90000 must be merged into 73b0c000-73b21000
so that breakpad correctly calculates the base address for text.

This change enables the full merge by also merging anonymous maps which
result from unused reservation, identified as '---p' with offset 0, and
which follow on from an executable mapping, into that executable mapping.

BUG=chromium:394703
R=rmcilroy@chromium.org, thestig@chromium.org

Review URL: https://breakpad.appspot.com/7714003

Patch from Simon Baldwin <simonb@chromium.org>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1380 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoGoogleCrashdumpUploader: adds Upload(string*) API to get the HTTP response.
gunsch@chromium.org [Thu, 18 Sep 2014 16:48:49 +0000 (16:48 +0000)]
GoogleCrashdumpUploader: adds Upload(string*) API to get the HTTP response.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1379 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoFixes common_unittests build.
thestig@chromium.org [Wed, 17 Sep 2014 22:09:21 +0000 (22:09 +0000)]
Fixes common_unittests build.

Original CL: https://breakpad.appspot.com/5704002/
A=gunsch@chromium.org
R=gunsch@chromium.org

Review URL: https://breakpad.appspot.com/8674002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1378 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoFix Windows client unittests build: add missing code files
mmandlis@chromium.org [Tue, 16 Sep 2014 19:17:19 +0000 (19:17 +0000)]
Fix Windows client unittests build: add missing code files

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1377 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoMaking the Mac build of crash_report work again after the last SVN sync
mmandlis@chromium.org [Tue, 16 Sep 2014 19:15:08 +0000 (19:15 +0000)]
Making the Mac build of crash_report work again after the last SVN sync

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1376 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoMac: Add support for in-process crash reporting to Breakpad.
andresantoso@chromium.org [Mon, 15 Sep 2014 22:48:18 +0000 (22:48 +0000)]
Mac: Add support for in-process crash reporting to Breakpad.

Add new option BREAKPAD_IN_PROCESS.
If YES, Breakpad will write the dump file in-process and then launch the reporter
executable as a child  process.

Originally reviewed at https://codereview.chromium.org/571523004/

BUG=chromium:414239
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1714002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1375 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoThis CL initialize NSData in HTTPMultipartUpload.m to nil.
qsr@chromium.org [Fri, 12 Sep 2014 07:50:35 +0000 (07:50 +0000)]
This CL initialize NSData in HTTPMultipartUpload.m to nil.

Problem introduced by issue 2764002.

R=qsr@chromium.org

Review URL: https://breakpad.appspot.com/2794002

Patch from Oliver Robin <olivierrobin@chromium.org>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1374 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoUpdate processor.gyp file with new files added as part of microdump
mmandlis@chromium.org [Wed, 10 Sep 2014 22:16:29 +0000 (22:16 +0000)]
Update processor.gyp file with new files added as part of microdump
processing upcoming implementation.

dump_context.cc and dump_object.cc added in r/1370
microdump_processor.cc and microdump_processor_unittest.cc added in
r/1372

BUG=chromium:410294

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1373 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoIntroduce stub microdump processor classes.
mmandlis@chromium.org [Wed, 10 Sep 2014 19:12:30 +0000 (19:12 +0000)]
Introduce stub microdump processor classes.

Adds the interfaces for MicrodumpProcessor (very similar to
MinidumpProcessor) and corresponding unittest stubs.
These stubs are required for multi-side integration and to start
rolling the updated processor library into the dependent projects.

BUG=chromium:410294

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1372 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoRename gyp variable use_titlecase_in_grd_files -> use_titlecase_in_grd.
mark@chromium.org [Wed, 10 Sep 2014 12:47:46 +0000 (12:47 +0000)]
Rename gyp variable use_titlecase_in_grd_files -> use_titlecase_in_grd.

The name changes in https://codereview.chromium.org/552203002/

Patch by Jacek Oleksy <joleksy@opera.com>.

Review URL: https://breakpad.appspot.com/5694002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1371 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoRefactoring in preparation for microdump processing
mmandlis@chromium.org [Mon, 8 Sep 2014 19:10:42 +0000 (19:10 +0000)]
Refactoring in preparation for microdump processing

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1370 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoBack out trunk r1367.
mark@chromium.org [Wed, 3 Sep 2014 13:40:40 +0000 (13:40 +0000)]
Back out trunk r1367.

Compile error: https://bugzilla.mozilla.org/show_bug.cgi?id=1048091#c15

Review URL: https://breakpad.appspot.com/9694002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1369 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoAdding possibility for client to upload the file
blundell@chromium.org [Mon, 1 Sep 2014 11:02:57 +0000 (11:02 +0000)]
Adding possibility for client to upload the file

This CL adds three features that will allow the client to upload the report
file.
Three main modifications are made :
- Allow upload url to have a file:// scheme, and write the HTTP request to file
  in that case
- Split the request in two parts in case of a file:// scheme, the request
  time and the response time. A new API [handleNetworkResponse] is added.
- Give the opportunity to the client to get the configuration NSDictionary
  to be able to recreate the breakpad context at response time.

Patch by Olivier Robin <olivierrobin@chromium.org>

Review URL: https://breakpad.appspot.com/2764002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1368 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoSupport for multiple upload files in CrashReportSender/HTTPUpload
ted.mielczarek@gmail.com [Thu, 28 Aug 2014 15:26:59 +0000 (15:26 +0000)]
Support for multiple upload files in CrashReportSender/HTTPUpload
A=David Major <dmajor@mozilla.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=1048091

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1367 4c0a9323-5329-0410-9bdc-e9ce6186880e

3 months agoconstructor init list in wrong order in CrashGenerationServer
ted.mielczarek@gmail.com [Thu, 28 Aug 2014 15:23:39 +0000 (15:23 +0000)]
constructor init list in wrong order in CrashGenerationServer
A=Robert Longson <longsonr@gmail.com> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=1054632

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1366 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoSet 32 bits iOS app to use vm_region_recurse_64.
blundell@chromium.org [Mon, 11 Aug 2014 12:55:23 +0000 (12:55 +0000)]
Set 32 bits iOS app to use vm_region_recurse_64.

Using the vm_region_recurse API with a vm_region_submap_info_64
structure leads to a deviation in the structure when reading the user_tag
field.
Switching to the vm_region_recurse_64 API.

Patch by Olivier Robin <olivierrobin@chromium.org>

BUG=crbug/397133

Review URL: https://breakpad.appspot.com/4664002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1363 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoupdate svn:ignore lists
vapier@chromium.org [Mon, 11 Aug 2014 01:20:00 +0000 (01:20 +0000)]
update svn:ignore lists

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1362 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoUpdate lss from r24 to r31.
thestig@chromium.org [Fri, 1 Aug 2014 02:32:17 +0000 (02:32 +0000)]
Update lss from r24 to r31.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1361 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoupload_system_symbols: Use the Go1.3 improvements to debug/macho.
rsesek@chromium.org [Thu, 31 Jul 2014 19:11:29 +0000 (19:11 +0000)]
upload_system_symbols: Use the Go1.3 improvements to debug/macho.

This removes the custom MachO header reading functionality, since the stdlib can
now read Fat files.

R=andybons@chromium.org, mark@chromium.org

Review URL: https://breakpad.appspot.com/10684002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1360 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoIn Mac dump_syms, allow reading debug data out of both the Mach-O file and the dSYM.
rsesek@chromium.org [Fri, 25 Jul 2014 18:18:59 +0000 (18:18 +0000)]
In Mac dump_syms, allow reading debug data out of both the Mach-O file and the dSYM.

This adds a new |-g <dSYM path>| flag to dump_syms, to specify the dSYM path for
the target Mach-O argument. The UUIDs and architectures of the two paths must
match in order to dump symbols for this "split module."

This reason for this is that for x86_64 binaries on OS X, the CFI data is stored
in the __TEXT,__eh_frame segment of the Mach-O file, and the data is not copied
into the dSYM by dsymutil.  Therefore, just dumping the dSYM doesn't yield CFI
data for x86_64 files, and both the dSYM and the Mach-O file must be dumped in
order to produce a complete Breakpad symbol file. For i386 binaries, the CFI data
is stored in the __DWARF,__debug_frame segment, which is part of the dSYM, so
this isn't necessary.

BUG=https://code.google.com/p/chromium/issues/detail?id=393594
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/6704002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1359 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoAdd GYP build for the src/tools directory on Mac and Linux.
rsesek@chromium.org [Thu, 24 Jul 2014 15:22:51 +0000 (15:22 +0000)]
Add GYP build for the src/tools directory on Mac and Linux.

This GYP-ifies the src/processor and src/common directories on those platforms
as well. The Makefile build uses much more granular unittest executables, so
the new processor_unittests does not yet link because of multiple main() symbols,
but this will be fixed later.

Update issue 575

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/10674002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1358 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoAnnotate PageAllocator for MSan.
mark@chromium.org [Tue, 22 Jul 2014 14:24:21 +0000 (14:24 +0000)]
Annotate PageAllocator for MSan.

PageAllocator maps memory via sys_mmap(), implemented in
linux_syscall_support.h. We need to explicitly inform MSan that this memory is
initialized.

Patch by Sergey Matveev <earthdok@chromium.org>

BUG=chromium:394028

Review URL: https://breakpad.appspot.com/2744002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1356 4c0a9323-5329-0410-9bdc-e9ce6186880e

4 months agoChrome on Android now supports loading the shared library directly from the APK file.
rmcilroy@chromium.org [Tue, 22 Jul 2014 11:34:11 +0000 (11:34 +0000)]
Chrome on Android now supports loading the shared library directly from the APK file.

This patch makes two changes to breakpad to enable crash reporting to work correctly when the library is inside another file (an archive):

- Do not filter mappings which map an executable at a non-zero offset.
- If such an executable is mapped look in the ELF information for the
shared object name and use that name in the minidump.

Note this change doesn't care about the archive format and isn't Android
specific (though loading the shared library this way is currently only done on Android).

BUG=390618
R=thestig@chromium.org

Review URL: https://breakpad.appspot.com/7684002

Patch from Anton Carver <anton@chromium.org>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1355 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoBoth std::tr1::unordered_set and std::unordered_set are not allowed in
ivanpe@chromium.org [Mon, 21 Jul 2014 18:27:43 +0000 (18:27 +0000)]
Both std::tr1::unordered_set and std::unordered_set are not allowed in
Google at this moment.  This change is implementing a workaround that
allows switching to hash_set and hash_map.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/6694002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1354 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months ago[Android]: Remove __system_property_get(ro.build.fingerprint) from WriteOSInformation.
rmcilroy@chromium.org [Fri, 18 Jul 2014 13:14:37 +0000 (13:14 +0000)]
[Android]: Remove __system_property_get(ro.build.fingerprint) from WriteOSInformation.

__system_property_get has been removed from the Android NDK for 'L' so Breakpad
no longer links. This CL just removes the call in WriteOSInformation because
Chrome already passes the build fingerprint as a crash key called "android_build_fp" in the crash report HTTP POST message.

BUG=394841,393903
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1694002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1351 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoAdd frame pointer recovery to the AMD64 Stackwalker.
rsesek@chromium.org [Fri, 18 Jul 2014 00:27:49 +0000 (00:27 +0000)]
Add frame pointer recovery to the AMD64 Stackwalker.

BUG=https://code.google.com/p/chromium/issues/detail?id=393594
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/10664002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1350 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoChange some ELF utils to return the length as a size_t.
thestig@chromium.org [Thu, 17 Jul 2014 18:34:18 +0000 (18:34 +0000)]
Change some ELF utils to return the length as a size_t.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/7694002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1349 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoEnsure C:/Dumps/ exists in crash_generation_app
ted.mielczarek@gmail.com [Fri, 11 Jul 2014 18:48:41 +0000 (18:48 +0000)]
Ensure C:/Dumps/ exists in crash_generation_app
A=j.turney
R=ted at https://breakpad.appspot.com/1134002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1348 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoStringify minidump stream_type constants in minidump_dump output
ted.mielczarek@gmail.com [Fri, 11 Jul 2014 10:57:30 +0000 (10:57 +0000)]
Stringify minidump stream_type constants in minidump_dump output
R=mark at https://breakpad.appspot.com/3704002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1347 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoDon't free pointer in BasicCodeModules::BasicCodeModules before possibly using it
ted.mielczarek@gmail.com [Thu, 10 Jul 2014 19:16:43 +0000 (19:16 +0000)]
Don't free pointer in BasicCodeModules::BasicCodeModules before possibly using it
A=Jim Chen <nchen@mozilla.com>
R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=1033006

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1346 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoFix compilation error in Linux libc++ builds due to use of tr1/.
mark@chromium.org [Mon, 7 Jul 2014 19:23:20 +0000 (19:23 +0000)]
Fix compilation error in Linux libc++ builds due to use of tr1/.

Patch by Sergey Matveev <earthdok@chromium.org>

BUG=chromium:391792

Review URL: https://breakpad.appspot.com/7674002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1345 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoUnhook current Breakpad object after handling uncaught NSException.
qsr@chromium.org [Mon, 7 Jul 2014 08:13:23 +0000 (08:13 +0000)]
Unhook current Breakpad object after handling uncaught NSException.

After handling an uncaught NSException, release the Breakpad object
so there will not be a second crash dump logged.

Prior to this change, for every uncaught NSException handled through
the Breakpad::UncaughtExceptionHandler(), a second crash without
any useful information (generally __cxa_rethrow and std::__terminate)
is recorded.

R=qsr@chromium.org

Review URL: https://breakpad.appspot.com/9664002

Patch from Peter Lee <pkl@chromium.org>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1344 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoMake crash_handler volatile to prevent compiler optimizing it away.
rmcilroy@chromium.org [Wed, 2 Jul 2014 10:27:39 +0000 (10:27 +0000)]
Make crash_handler volatile to prevent compiler optimizing it away.

This bug manifests itself on Android x64 (in ExceptionHandlerTest::ExternalDumper), but is possible on any platform.

The compiler is unaware of the code which runs in the signal handler which reads this variable. Without volatile the compiler is free to optimise away writes to this variable which it believes are never read.

BUG=381142, 346626
R=thestig@chromium.org

Review URL: https://breakpad.appspot.com/8664002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1343 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoCleanup: hide undefined behavior from the compiler better.
ivanpe@chromium.org [Tue, 1 Jul 2014 17:50:05 +0000 (17:50 +0000)]
Cleanup: hide undefined behavior from the compiler better.

Submitting this on behalf of Paul Pluzhnikov.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/6674002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1342 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agodump_syms: use unordered_set<> instead of set<> for speed.
mark@chromium.org [Thu, 26 Jun 2014 12:37:15 +0000 (12:37 +0000)]
dump_syms: use unordered_set<> instead of set<> for speed.

dump_syms spends a lot of time trying to compare strings.
This change speeds up processing of libwebviewchromium.so by 30% on my linux
machine.

Patch by Junichi Uekawa <uekawa@chromium.org>

Review URL: https://breakpad.appspot.com/2714002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1341 4c0a9323-5329-0410-9bdc-e9ce6186880e

5 months agoUpdate output for test minidump_dump_test.
ivanpe@chromium.org [Wed, 25 Jun 2014 00:24:01 +0000 (00:24 +0000)]
Update output for test minidump_dump_test.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/10654002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1340 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agominidump_dump: bug fixes.
mark@chromium.org [Tue, 17 Jun 2014 18:03:31 +0000 (18:03 +0000)]
minidump_dump: bug fixes.

 - Convert time_t values to UTC correctly. It is incorrect to cast a uint32_t*
   to time_t* because the two types may have different widths. This is the
   case on many 64-bit systems, where time_t is a 64-bit signed integer.
   Conversion is unified in a single function, and additional uses of time_t
   in minidump files not previously displayed in UTC are now displayed.
 - Interpret the IMAGE_DEBUG_MISC structure correctly.
 - When printing MINIDUMP_SYSTEM_INFO structures, always show the "x86" side
   of the union, and state whether it's expected to be valid. (Existing
   Breakpad-produced non-Windows minidumps for x86_64 use the "x86" side of
   union, but Windows minidumps for x86_64 use the "other" side, so I want to
   print both.)

R=ivanpe@chromium.org

Review URL: https://breakpad.appspot.com/5674002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1339 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoUse PAGE_MAX_SIZE. PAGE_SIZE is now a variable size.
qsr@chromium.org [Fri, 6 Jun 2014 16:20:15 +0000 (16:20 +0000)]
Use PAGE_MAX_SIZE. PAGE_SIZE is now a variable size.

This fixes exception_handler.cc:77:8: error: fields must have a constant size:
'variable length array in structure' extension will never be supported
  char protected_buffer[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE)));

BUG=None
TEST=breakpad builds on ios8
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/9654002

Patch from Justin Cohen <justincohen@chromium.org>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1338 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoAdd virtual dtor to LibcurlWrapper.
pbos@chromium.org [Wed, 4 Jun 2014 08:54:07 +0000 (08:54 +0000)]
Add virtual dtor to LibcurlWrapper.

LibcurlWrapper is deleted but contains no virtual destructor, triggering
warnings with -Wdelete-non-virtual-dtor in clang++.

R=ivanpe@chromium.org

Review URL: https://breakpad.appspot.com/7664002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1337 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoAdd missing MD_MISCINFO_FLAGS1_BUILDSTRING. Revise documentation to clarify
mark@chromium.org [Tue, 3 Jun 2014 19:35:41 +0000 (19:35 +0000)]
Add missing MD_MISCINFO_FLAGS1_BUILDSTRING. Revise documentation to clarify
that it is not enough to check the size of an MDRawMiscInfo stream to verify
member validity, the flags1 field needs to be consulted as well. Update
minidump_dump to correctly consider the validity of all fields in this
structure.

R=ivanpe@chromium.org

Review URL: https://breakpad.appspot.com/3694002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1336 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoPrint more x86-64 registers in minidump_stackwalk
ted.mielczarek@gmail.com [Fri, 30 May 2014 10:51:16 +0000 (10:51 +0000)]
Print more x86-64 registers in minidump_stackwalk

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/7654002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1335 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoLinux: Fix a memory leak in ExceptionHandler.
thestig@chromium.org [Wed, 28 May 2014 18:01:22 +0000 (18:01 +0000)]
Linux: Fix a memory leak in ExceptionHandler.

BUG=592
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/3684002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1334 4c0a9323-5329-0410-9bdc-e9ce6186880e

6 months agoFix a memory leak in DwarfCUToModule::FuncHandler::Finish().
thestig@chromium.org [Wed, 28 May 2014 16:51:52 +0000 (16:51 +0000)]
Fix a memory leak in DwarfCUToModule::FuncHandler::Finish().

BUG=591
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/2704002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1333 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoFix minor typo in a comment in r1331.
rmcilroy@chromium.org [Wed, 14 May 2014 12:19:50 +0000 (12:19 +0000)]
Fix minor typo in a comment in r1331.

R=qsr@google.com

Review URL: https://breakpad.appspot.com/3674002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1332 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoFix x86_64 Android build after user_fpregs_struct was added to /sys/user.h in newer...
rmcilroy@chromium.org [Wed, 14 May 2014 09:49:24 +0000 (09:49 +0000)]
Fix x86_64 Android build after user_fpregs_struct was added to /sys/user.h in newer NDKs

BUG=346626
TBR=mark@chromium.org

Review URL: https://breakpad.appspot.com/2694002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1331 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months ago[MIPS] Fix core dump related unit tests for Android on MIPS
gordana.cmiljanovic@imgtec.com [Wed, 14 May 2014 09:11:35 +0000 (09:11 +0000)]
[MIPS] Fix core dump related unit tests for Android on MIPS

This change fixes failing unittests in Android on MIPS:
LinuxCoreDumperTest.VerifyDumpWithMultipleThreads
ElfCoreDumpTest.ValidCoreFile

BUG=None
TEST=Running breakpad_unittests on MIPS Android device

Review URL: https://breakpad.appspot.com/3664002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1330 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months ago[Mac] Remove unused host_info call and supporting calls.
mark@chromium.org [Mon, 12 May 2014 19:42:34 +0000 (19:42 +0000)]
[Mac] Remove unused host_info call and supporting calls.

R=blundell@chromium.org

Review URL: https://breakpad.appspot.com/2684002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1329 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoFix the documentation for MinidumpFileWriter::Open().
thestig@chromium.org [Mon, 12 May 2014 19:36:46 +0000 (19:36 +0000)]
Fix the documentation for MinidumpFileWriter::Open().

BUG=581
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/6654002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1328 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoAdd required build options to correctly target XP
wfh@chromium.org [Thu, 8 May 2014 21:17:04 +0000 (21:17 +0000)]
Add required build options to correctly target XP

BUG=588
R=chrisha@chromium.org

Review URL: https://breakpad.appspot.com/5664002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1327 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoFD leaks and handle errors better.
rsesek@chromium.org [Tue, 6 May 2014 19:52:55 +0000 (19:52 +0000)]
FD leaks and handle errors better.

Patch from Matthew Dempsky <mdempsky@chromium.org>.
Original review: https://breakpad.appspot.com/5654002/

Review URL: https://breakpad.appspot.com/1674002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1326 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoAdd support for CFI based stack walking on Arm64.
rmcilroy@chromium.org [Tue, 6 May 2014 09:18:30 +0000 (09:18 +0000)]
Add support for CFI based stack walking on Arm64.

This CL adds CFI based stack walking support for Arm64 to BreakPad along with
unit tests.  The Arm64 CFI stack walker is based on the Arm CFI stack walker

BUG=367367,335641,354405
R=blundell@chromium.org, mark@chromium.org

Review URL: https://breakpad.appspot.com/1664002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1325 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoMake the Linux CrashGenerationClient an interface.
rsesek@chromium.org [Mon, 5 May 2014 20:36:06 +0000 (20:36 +0000)]
Make the Linux CrashGenerationClient an interface.

Also allow it to be set on the ExceptionHandler. This will allow Chromium's
implementation to be properly treated as an out-of-process handler.

BUG=https://code.google.com/p/chromium/issues/detail?id=349600
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/2664002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1324 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoFixing a build break on Linux.
mmandlis@chromium.org [Thu, 1 May 2014 23:31:44 +0000 (23:31 +0000)]
Fixing a build break on Linux.

R=ivanpe@chromium.org

Review URL: https://breakpad.appspot.com/4654002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1323 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoAdd Arm64 support to dumpsyms.
rmcilroy@chromium.org [Tue, 29 Apr 2014 09:45:46 +0000 (09:45 +0000)]
Add Arm64 support to dumpsyms.

Adds Arm64 support to dumpsyms, enabling support for EM_AARCH64 elf type and
arm64 registers in DwarfCFIToModule.

BUG=367367,335641,354405
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1654002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1322 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoClean up common.gypi.
chrisha@chromium.org [Mon, 28 Apr 2014 21:16:52 +0000 (21:16 +0000)]
Clean up common.gypi.

This removes a handful of redundant variables and GYP includes.

BUG=
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/2654002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1321 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoLinux: Check the CRC32 of the debug link file in the symbol dumper.
thestig@chromium.org [Wed, 23 Apr 2014 20:52:28 +0000 (20:52 +0000)]
Linux: Check the CRC32 of the debug link file in the symbol dumper.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1644002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1320 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoChange PrintFunctions to print functions in address order and not print duplicate...
wfh@chromium.org [Wed, 23 Apr 2014 17:27:01 +0000 (17:27 +0000)]
Change PrintFunctions to print functions in address order and not print duplicate public functions.

BUG=427
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1634002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1319 4c0a9323-5329-0410-9bdc-e9ce6186880e

7 months agoSkip ElfCoreDumpTest and LinuxCoreDumperTest on Android if no core file is dumped.
rmcilroy@chromium.org [Wed, 23 Apr 2014 10:20:00 +0000 (10:20 +0000)]
Skip ElfCoreDumpTest and LinuxCoreDumperTest on Android if no core file is dumped.

On certain versions of Android (specifically JellyBean MR2 on Nexus 7, possibly
others too) no ELF core dump is created for crashing processes.  Check for this
and skip the test if so.

BUG=364943
R=thestig@chromium.org

Review URL: https://breakpad.appspot.com/1624003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1318 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months agominidump-2-core: Allow user to override shared lib basedir.
thestig@chromium.org [Fri, 18 Apr 2014 20:59:16 +0000 (20:59 +0000)]
minidump-2-core: Allow user to override shared lib basedir.

This CL introduces "--sobasedir" command-line option to minidump-2-core.
By default, paths to shared lib files included in generated core file are
formatted as "/var/lib/breakpad/[GUID]libFoobar.so". By using "--sobasedir",
this will be "[user-supplied-path]libFoobar.so".

This option can be used to ease debugging minidump files from developer's local
builds. By specifying "minidump-2-core --sobasedir `pwd`/out/Debug/lib/
foobar.mdmp", user can load the generated core file in gdb without setting up
the symlinks for "/var/lib/breakpad".

BUG=None
A=kouhei@chromium.org

Original code review: https://breakpad.appspot.com/1214002/

R=kouhei@chromium.org

Review URL: https://breakpad.appspot.com/1584002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1317 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months agoChange the way function and public symbols are obtained to use the findChildren DIA...
wfh@chromium.org [Wed, 16 Apr 2014 22:50:28 +0000 (22:50 +0000)]
Change the way function and public symbols are obtained to use the findChildren DIA function.

This has a substantial performance improvement over using the getSymbolsByAddr iterator, especially on certain 64bit DLLS.  e.g. Time to process chrome_child.dll drops from 51 minutes to 21 secs.

Note: new test data looks different because the ordering of lines is no longer by memory address.  This does not affect processing.  The test data has been manually compared to old data and matches (except additional PUBLIC symbols).  Also, INFO lines are omitted because the source executable files are not checked in, so they are unavailable.

R=ivanpe@chromium.org, mark@chromium.org

Review URL: https://breakpad.appspot.com/1574002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1316 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months agoAllow symupload to upload to multiple URLs on the same command line.
wfh@chromium.org [Wed, 16 Apr 2014 16:03:57 +0000 (16:03 +0000)]
Allow symupload to upload to multiple URLs on the same command line.

R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1554002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1315 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months agoLimit the workaround in r1313 to Android only.
thestig@chromium.org [Tue, 15 Apr 2014 18:29:15 +0000 (18:29 +0000)]
Limit the workaround in r1313 to Android only.

BUG=579
R=rmcilroy@chromium.org, vapier@chromium.org

Review URL: https://breakpad.appspot.com/1564002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1314 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months ago[Android]: Fix hang in CreateChildCrash() on Android.
rmcilroy@chromium.org [Tue, 15 Apr 2014 10:07:50 +0000 (10:07 +0000)]
[Android]: Fix hang in CreateChildCrash() on Android.

After r1299, the LinuxCoreDumperTest::VerifyDumpWithMultipleThreads and
ElfCoreDumpTest::ValidCoreFile would both hang on Android.  This appears to be due to the tkill
signal not being recieved by the thread which is meant to crash, even though tkill returns 0.
This CL retries sending the tkill signal multiple times, which prevents the Hang.

BUG=579
R=thestig@chromium.org

Review URL: https://breakpad.appspot.com/1524002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1313 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months agoUpdate offset of fpregs_mem.
rmcilroy@chromium.org [Tue, 15 Apr 2014 09:52:37 +0000 (09:52 +0000)]
Update offset of fpregs_mem.

Based on testing in the emulator.

BUG=346626
R=thestig@chromium.org

Review URL: https://breakpad.appspot.com/1544002

Patch from Anton Carver <anton@chromium.org>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1312 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months agoAdd x64 version of getcontext.
rmcilroy@chromium.org [Fri, 11 Apr 2014 16:09:12 +0000 (16:09 +0000)]
Add x64 version of getcontext.

Assembly code is derived in part from code in libunwind.
Code tested on desktop linux (Android testing pending emulation
support).

BUG=346626
R=dannyb@google.com, thestig@chromium.org

Review URL: https://breakpad.appspot.com/1454002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1311 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months agoFill in CPU info in mini-dump for Arm64.
rmcilroy@chromium.org [Fri, 11 Apr 2014 14:41:14 +0000 (14:41 +0000)]
Fill in CPU info in mini-dump for Arm64.

Adds Arm64 varients of CPUFillThreadInfo and CPUFillFromUContext and
WriteCPUInformation for the Linux/Android client.

BUG=354405,335641
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1464002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1310 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months agoAdding support for 64-bit Windows modules to ms_symbol_server_converter.
ivan.penkov@gmail.com [Thu, 10 Apr 2014 17:54:52 +0000 (17:54 +0000)]
Adding support for 64-bit Windows modules to ms_symbol_server_converter.

As part of that:
 - Updated MSSymbolServerConverter to also download the executable files from the symbol server and pass them to the PDBSourceLineWriter as it is required for successful conversion of symbols for 64-bit modules.
 - Added a .gyp file and target for the ms_symbol_server_converter library.
 - Updated PDBSourceLineWriter to allow executable files to be in locations different from the locations of the PDB files.
 - Minor style issue:
    * #define guards.
    * No space before ')' and after '('.

R=mark@chromium.org, wfh@chromium.org

Review URL: https://breakpad.appspot.com/1434002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1309 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months agoMoving directory 'build' one level up as it collides with a file named 'BUILD' which...
ivan.penkov@gmail.com [Thu, 10 Apr 2014 17:37:20 +0000 (17:37 +0000)]
Moving directory 'build' one level up as it collides with a file named 'BUILD' which happens to be in that same location in the Google source depot.

R=chrisha@chromium.org, mark@chromium.org

Review URL: https://breakpad.appspot.com/1504002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1308 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months agoIncrease Breakpad's signal handler stack size.
rmcilroy@chromium.org [Wed, 9 Apr 2014 17:35:44 +0000 (17:35 +0000)]
Increase Breakpad's signal handler stack size.

Some unittests fail on Android (both on Arm and Arm64) without this stack
size increase.

BUG=354405,335641
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1484002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1307 4c0a9323-5329-0410-9bdc-e9ce6186880e

8 months agoFix aarch64 ucontext layout on Android
rmcilroy@chromium.org [Wed, 9 Apr 2014 09:08:19 +0000 (09:08 +0000)]
Fix aarch64 ucontext layout on Android

BUG=354405,335641
R=mark@chromium.org

Review URL: https://breakpad.appspot.com/1444002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk/src@1306 4c0a9323-5329-0410-9bdc-e9ce6186880e