Commit Graph

1372 Commits

Author SHA1 Message Date
mark@chromium.org
91f746ec81 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@1336 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-06-03 19:35:41 +00:00
ted.mielczarek@gmail.com
dfdc7d2966 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@1335 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-30 10:51:16 +00:00
thestig@chromium.org
a57c70484d 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@1334 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-28 18:01:22 +00:00
thestig@chromium.org
3cef0e5645 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@1333 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-28 16:51:52 +00:00
rmcilroy@chromium.org
5421a942f0 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@1332 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-14 12:19:50 +00:00
rmcilroy@chromium.org
222ef005ed 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@1331 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-14 09:49:24 +00:00
gordana.cmiljanovic@imgtec.com
412b68396c [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@1330 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-14 09:11:35 +00:00
mark@chromium.org
9eb13afd54 [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@1329 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-12 19:42:34 +00:00
thestig@chromium.org
31845f2bce 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@1328 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-12 19:36:46 +00:00
wfh@chromium.org
f05e1037b5 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@1327 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-08 21:17:04 +00:00
rsesek@chromium.org
40cd690901 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@1326 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-06 19:52:55 +00:00
rmcilroy@chromium.org
a789d1d26b 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@1325 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-06 09:18:30 +00:00
rsesek@chromium.org
44ba0b2050 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@1324 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-05 20:36:06 +00:00
mmandlis@chromium.org
c96f4d7e01 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@1323 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-05-01 23:31:44 +00:00
rmcilroy@chromium.org
c2f9501755 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@1322 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-29 09:45:46 +00:00
chrisha@chromium.org
4463365304 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@1321 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-28 21:16:52 +00:00
thestig@chromium.org
3d023a3472 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@1320 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-23 20:52:28 +00:00
wfh@chromium.org
9aaae65466 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@1319 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-23 17:27:01 +00:00
rmcilroy@chromium.org
1c8e155b3a 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@1318 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-23 10:20:00 +00:00
thestig@chromium.org
d4f5ca2275 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@1317 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-18 20:59:16 +00:00
wfh@chromium.org
c83a81450c 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@1316 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-16 22:50:28 +00:00
wfh@chromium.org
7cc286a5a7 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@1315 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-16 16:03:57 +00:00
thestig@chromium.org
be38be57e1 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@1314 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-15 18:29:15 +00:00
rmcilroy@chromium.org
32031a9136 [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@1313 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-15 10:07:50 +00:00
rmcilroy@chromium.org
eebdc96430 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@1312 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-15 09:52:37 +00:00
rmcilroy@chromium.org
6594ac922c 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@1311 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-11 16:09:12 +00:00
rmcilroy@chromium.org
a2245d6744 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@1310 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-11 14:41:14 +00:00
ivan.penkov@gmail.com
6b0703a093 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@1309 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-10 17:54:52 +00:00
ivan.penkov@gmail.com
7dbca422d4 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@1308 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-10 17:37:20 +00:00
rmcilroy@chromium.org
347f7a10dd 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@1307 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-09 17:35:44 +00:00
rmcilroy@chromium.org
543cf832e6 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@1306 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-09 09:08:19 +00:00
rmcilroy@chromium.org
fff818514d Add Arm64 support to breakpad unittests.
BUG=354405,335641
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1305 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-08 17:36:11 +00:00
chrisha@chromium.org
611f8b7f32 Move build configuration to root of repository.
This is in preparation for creating GYP build files for each platform.

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

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1304 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-03 18:34:24 +00:00
benchan@chromium.org
66460ce1d9 Fix ElfCoreDumpTest.ValidCoreFile unit test.
The ElfCoreDumpTest.ValidCoreFile unit test assumed that the number of
NT_FPREGSET / NT_PRXFPREG notes in the core dump file equals to the number of
threads of the crashed process. This assumption isn't always true as the kernel
skips filling the NT_FPREGSET / NT_PRXFPREG note of a thread if the FPU state
isn't available. The kernel indicates the availability of NT_FPREGSET /
NT_PRXFPREG via the pr_fpvalid field of the NT_PRSTATUS note. This CL modifies
the ElfCoreDumpTest.ValidCoreFile unit test to verify the number of NT_FPREGSET
and NT_PRXFPREG notes based on the pr_fpvalid field of the NT_PRSTATUS notes.

BUG=577
TEST=Run unit tests on x86 and x86_64 Linux platform.
R=vapier@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1303 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-03 16:50:06 +00:00
rmcilroy@chromium.org
410b7024e3 Add Arm64 version of breakpad_getcontext for Android.
This CL adds breakpad_getcontext support for Arm64 to Android. The assembly
is based on getcontext.S in glibc.

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

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1302 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-03 13:15:37 +00:00
rmcilroy@chromium.org
83b9a28cf9 First cut at adding arm64 Linux / Android support to Breakpad.
This is an initial attempt to add Arm64 (aarch64) support to Breakpad for
Linux / Android platforms.  This CL adds the Arm64 data structures, but does
not yet implement the Android getcontext support or CPUFillFromThreadInfo /
CPUFillFromUContext.

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

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1301 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-02 23:12:40 +00:00
rmcilroy@chromium.org
46aba5a43a Remove some unecessary Android system header definitions.
Newer NDKs include some additional headers needed by Breakpad, so we can remove these redefinitions.

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

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1300 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-02 23:02:31 +00:00
vapier@chromium.org
0ac94ba617 fix races in CrashGenerator::CreateChildCrash
The current CreateChildCrash logic is racy when it comes to creating a
crash dump for two reasons:

The main thread that calls kill() on a different thread is guaranteed
the signal will be *queued* when it returns, but not *delivered*.  If
the kernel doesn't automatically schedule the receiving thread, but
instead lets the main thread run to the exit() call, then the signal
never triggers a coredump and the whole process simply exits.

The main thread is using kill() to try to deliver a signal to a
specific thread, but that function is for sending signals to a
process.  That means the kernel is free to deliver the signal to
any thread in the process and not just the one requested.  This
manifests itself as the pr_pid in the coredump not being the one
expected.  Instead, we must use tkill() with the tid (which we
already took care of gathering) to deliver to a specific thread.

These are a lot easier to see on a UMP system as contention is heavier.

BUG=chromium:207918
TEST=`dumper_unittest` still passes, and doesn't flake out in a UMP system
TEST=`linux_client_unittest` still passes
R=benchan@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1299 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-02 22:55:12 +00:00
thestig@chromium.org
ad37f5aabd Terminating FileID path when at maximum length. (Coverity)
If FileID was constructed with a path that was >= PATH_MAX then path_ was not terminated resulting in a possible buffer overrun when reading.

BUG=573
A=cmumford@chromium.org
Original code review: https://breakpad.appspot.com/1324002/

R=cmumford@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1295 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-01 20:18:53 +00:00
thestig@chromium.org
482df94a07 GoogleCrashdumpUploader would leak instances of LibcurlWrapper (Coverity)
The GoogleCrashdumpUploader would create, but never destroy it's instance of LibcurlWrapper.

BUG=574
A=cmumford@chromium.org
Original code review: https://breakpad.appspot.com/1314002/

R=cmumford@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1294 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-01 20:18:23 +00:00
mark@chromium.org
0decfdb042 Make ARM64 detection consistent in chromium.
This is to uniform ARM64 detection code in chromium.
Use only __aarch64__ and don't look for __arm64__ at all.

Patch by Primiano Tucci <primiano@chromium.org>

BUG=chromium:354405, chromium:358092

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1293 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-04-01 18:20:36 +00:00
wfh@chromium.org
3e12c58449 Ignore warning 4702 to avoid unreachable code error on
VS2013 stl when compiling with _HAS_EXCEPTIONS=0

See also https://crbug.com/346399 for background.

BUG=540
R=mark@chromium.org, thestig@chromium.org
TEST=update gyp to HEAD, generate MSVS2013 build files, verify breakpad compiles in Release.

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1292 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-03-26 21:02:12 +00:00
wfh@chromium.org
acd538baf8 Check in new Windows binaries.
These binaries include recent changes to pdb_source_line_writer for emitting
STACK CFI lines for 64bit PDBs. They were built using the GYP build files,
MSVS 2013 and DIA SDK 12.0.

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

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1291 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-03-26 20:45:52 +00:00
wfh@chromium.org
213a0698cb Add support for Win64 stack unwind data as STACK CFI
This is a copy of https://breakpad.appspot.com/1264002/ where code review took place.

See https://bugzilla.mozilla.org/show_bug.cgi?id=548035 and https://code.google.com/p/chromium/issues/detail?id=115922

Credit to Mikhail I. Izmestev <izmmishao5@gmail.com> for original patch in https://breakpad.appspot.com/345002/

BUG=572
TEST=Run dump_syms_unittest after compiling dump_syms_regtest.cc with x64 toolchain
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1290 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-03-24 12:12:17 +00:00
thestig@chromium.org
b764582a53 Fix crash in Windows CrashGenerationServer from r1274.
R=cdn@chromium.org, mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1289 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-03-19 19:12:56 +00:00
ivan.penkov@gmail.com
cc3542dc44 Fix a bug in BreakpadController that prevented multiple report uploads per call to sendStoredCrashReports.
Submitting this patch on behalf of Asher Segel-Brown.

R=blundell@chromium.org, mark@chromium.org, qsr@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1288 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-03-19 18:58:36 +00:00
thestig@chromium.org
c5ae79b3f2 Trim unintentional whitespace and fix style nits
Original review: https://breakpad.appspot.com/1204002/
A=mdempsky@chromium.org
R=mdempsky@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1287 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-03-18 18:06:10 +00:00
ivan.penkov@gmail.com
1df13fed15 Fixing compiler warnings:
- Building Breakpad in Xcode with arm64 architecture.
 - iOS
Patches provided by: Ian Hickson and Greg Vance.

R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1286 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-02-28 10:21:20 +00:00
mark@chromium.org
3e76b4a74b Initialize file descriptors to -1, not 0, in MachoWalker.
R=ivan.penkov@gmail.com

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1284 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-02-26 18:59:48 +00:00
dmaclach
334b2c70f0 Update GTM and enable -Wundef and strict C++11 flags.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1283 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-02-26 16:14:04 +00:00
dmaclach
47585f7dee Fixup breakpad compile for Xcode 5.1 iOS release
(https://breakpad.appspot.com/1154002/)



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1282 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-02-24 21:35:40 +00:00
dmaclach
9315301a56 Fix up ~14 warnings about 'Implicit conversion loses integer precision' on iOS.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1281 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-02-18 22:52:02 +00:00
dmaclach
0c18b07255 When the Breakpad.h header gets compiled by standard C compilers
(instead of C++) it gets upset about the default argument. Instead of
using a default argument I split the function up into two separate
functions.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1280 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-02-18 21:34:43 +00:00
ted.mielczarek@gmail.com
5fcdc4f567 Make Linux ExceptionHandler::HandleSignal public
A=Jed Davis <jld@mozilla.com> R=ted at https://breakpad.appspot.com/1114003/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1279 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-02-05 12:11:48 +00:00
rsesek@chromium.org
299683dba6 Create a new tool to upload Mac system library symbols.
R=andybons@chromium.org, mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1278 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-02-03 22:52:49 +00:00
mattdr.breakpad@gmail.com
9dd2ab720e Support statically-linked libcurl for HTTP uploads in Linux
https://breakpad.appspot.com/1064002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1277 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-01-29 20:34:07 +00:00
thestig@chromium.org
c590a7f322 Windows: Fix 64-bit compitation of crash_generation_app.
BUG=560
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1276 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-01-21 19:22:37 +00:00
thestig@chromium.org
0864f0afaa Fix missing semi-colons from r1267.
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1275 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-01-17 23:20:24 +00:00
cdn@chromium.org
8b65346242 Refactor the Windows MinidumpGenerator interface to get rid of the overloads when generating dumps.
All required params are now passed to the constructor and the various options are set through new methods.

BUG=N/A
TEST=Existing minidump generation tests
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1274 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-01-17 22:39:11 +00:00
cdn@chromium.org
d9f582edce Fix VS project generation for the crash generation app.
BUG=N/A
TEST=N/A
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1273 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-01-17 21:57:47 +00:00
ivan.penkov@gmail.com
2b0db12678 Submitting on bahalf of Michele Aiello.
Fix Xcode 5.1 compilation issues.
Moving a couple of variable under #ifdef to avoid build warnings.

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

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1272 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-01-13 19:30:06 +00:00
blundell@chromium.org
12528d19bd Add -[BreakpadController setParametersToAddAtUploadTime:] for iOS.
This provides the ability to add server parameters to a crash report when the
report is uploaded.

Patch by KiYun Roe <kiyun@chromium.org>

BUG=558
R=blundell@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1271 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-01-13 10:40:07 +00:00
mark@chromium.org
3ea04ec479 Don't do work inside assert(). Ever.
The Mac crash key manipulation code was intended to be thread-safe through the
provision of a mutex. The mutex operations were done inside an assert().
assert() is a no-op in NDEBUG (release) builds. Therefore, in release builds,
these operations were occurring without being protected by any mutex at all,
and were nowhere near thread-safe.

BUG=chromium:331268
R=rsesek@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1270 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-01-10 19:54:20 +00:00
mark@chromium.org
1e99113fbe Fix #include order from r1268.
R=ted.mielczarek@gmail.com

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1269 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-01-10 19:53:33 +00:00
ted.mielczarek@gmail.com
6f045df4f0 Fix compilation with macos-target=10.9
A=Nomis101, R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=952623

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1268 4c0a9323-5329-0410-9bdc-e9ce6186880e
2014-01-03 12:32:55 +00:00
thestig@chromium.org
4a0f9bf030 Windows: Fix remaining level 4 warnings.
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1267 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-18 22:43:56 +00:00
thestig@chromium.org
74f640a92e Use a proper ignore_result() to fix a ftruncate warn_unused_result warning with GCC 4.8.
BUG=492
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1266 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-18 19:52:36 +00:00
thestig@chromium.org
15873e0016 Switch scoped_ptr.h to a compatible google3 implementation.
This is Chromium's base/memory/scoped_ptr.h at r98718, which split off
from the google3 version at a later point than Breakpad's copy. It is a
drop in replacement and the only changes are:
- removal of WARN_UNUSED_RESULT.
- moving it into the google_breakpad namespace.

BUG=534
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1265 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-18 19:49:55 +00:00
thestig@chromium.org
6199766d99 Fix warnings from the Windows build.
These warnings are fatal in my GYP-generated debug build.
The warnings can be seen on Linux/Mac with -Wshorten-64-to-32.

R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1264 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-17 22:21:40 +00:00
thestig@chromium.org
53a689933f Run svn propdel svn:executable on source code files.
Review URL: https://breakpad.appspot.com/934002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1263 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-17 21:40:50 +00:00
thestig@chromium.org
a4d055f1c2 Fix error r1258.
BUG=556
R=cdn@chromium.org, mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1262 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-17 19:04:11 +00:00
ivan.penkov@gmail.com
d6d6230272 Making the Mac build of crash_report work again after the last SVN sync. This includes correction of a method definition signature and adding missing code files to the project.
I'm commiting this on behalf of Thomas Schweitzer.
Review URL: https://breakpad.appspot.com/914002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1261 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-17 00:10:25 +00:00
thestig@chromium.org
3c613e7bdb Fix gcc vs clang cpuid.h discrepency.
For r1254, gcc defines bit_FXSAVE while clang defines bit_FXSR.

R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1260 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-14 19:17:42 +00:00
digit@chromium.org
ba1f54c093 Misc Android-related fixes.
- src/common/android/testing/mkdtemp.h:
  Fixes a compilation error when using the (recent) NDK r9b,
  see comments in the source file for details.

- android/test-driver, Makefile.am, Makefile.in:
  Autotools 1.12 changed the way tests are run during "make check"
  so add a new "custom test driver" to run tests on Android, and
  modify Makefile.am / Makefile.in accordingly. Otherwise,
  'make check' tried to run the tests on the host.

- android/test-shell.sh:
  Allow several tests to run in parallel on the device, by
  creating a custom test directory for each test process.
  This allows running "make check -j8" reliably.

- src/common/linux/file_id_unittest.cc:
  Disable the SelfStrip test on Android, since it assumes a 'strip'
  executable is available on the target system where the test runs.

BUG=NONE
R=mark@chromium.org, ted.mielczarek@gmail.com
TEST=android/run-checks.sh --ndk-dir=/path/to/android-ndk-r9b

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1259 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-13 16:49:11 +00:00
cdn@chromium.org
4bcf51dc79 Expose the ability to supply additional user streams in the windows dump generator.
BUG=N/A
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1258 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-12 20:04:42 +00:00
altse@chromium.org
b5e5d8bd30 Remove usage of gDebugLog and DEBUGLOG from Mac and iOS client code.
The inconsistent and duplicated references to gDebugLog caused
problems building on iOS and the current logging implementation
had little utility because it was never activated in debug builds.



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1257 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-12 19:58:00 +00:00
blundell@chromium.org
88b8ac6182 Add -[BreakpadController resetConfiguration] for iOS.
Add a resetConfiguration method to BreakpadController for iOS. The new method
resets the controller configuration to its initial value, which is the
infoDictionary of the bundle of the application.

Patch by KiYun Roe <kiyun@chromium.org>

BUG=554

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1256 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-12 14:52:37 +00:00
vapier@chromium.org
4c048c9764 disable unittests under ASAN that use memory crashes
There are a bunch of tests that use invalid memory acesses (on purpose)
to trigger a crash so that we can detect things are dumped correctly.
When we run under ASAN, it catches those accesses and the breaks the
testing flow.

For now, use the existing ADDRESS_SANITIZER symbol to disable more tests.
Ideally we'd use a compile-time attribute to disable ASAN on a few funcs,
but that seems to be broken atm.

BUG=chromium:293519
BUG=chromium:304575
TEST=ran unittests under ASAN and they now pass
TEST=ran unittests w/out asan/clang and they still pass
R=benchan@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1255 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-11 05:38:34 +00:00
thestig@chromium.org
7f05071e8b Address additional comments from r1248. Fix the register to check and fix some style nits.
BUG=495
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1254 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-10 21:17:12 +00:00
mcgrathr@chromium.org
cd272586ee Conditionalize use of <cpuid.h> header
This header only exists for x86 environments, but was included
unconditionally.  That broke the builds for all non-x86 environments.

R=mark@chromium.org
BUG=

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1253 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-10 18:25:45 +00:00
ted.mielczarek@gmail.com
07bb2311f8 Use AM_MAINTAINER_MODE so configure supports --enable-maintainer-mode
A=mcgrathr
R=bradnelson at https://breakpad.appspot.com/864003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1251 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-10 12:28:11 +00:00
vapier@chromium.org
302124aff1 check for and enable Large File Support automatically
If you try to process a file using a 32bit build that is larger than
2GiB in size, the linux kernel will reject things:
$ strace -eopen dump_syms ./chrome ./ > chrome.sym
...
open(".//chrome.debug", O_RDONLY)       = -1 EOVERFLOW (Value too large for defined data type)

So let's use the existing autoconf macro to check for and enable support
as need be.

We have to shift the existing m32 logic up to before we start doing
feature test macros though otherwise a simple configure won't work:
$ ./configure --enable-m32
This is because it first tests LFS and such w/out the -m32 flags.

BUG=chromium:266064
TEST=`./configure --enable-m32 && make && make check` passes
R=benchan@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1250 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-10 06:28:08 +00:00
thestig@chromium.org
8d22ec9227 Fix Windows release build error due to unreferenced variables.
BUG=544
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1249 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-09 21:59:48 +00:00
thestig@chromium.org
0348c801bd Add MMX detection when getting registers in Linux.
For CPUs that don't support the MMX instruction set, such pre-Pentium III or industrial x86 embedded PCs, the minidump fails when it tries to retrieve MMX specific registers.

This patch adds MMX detection for that call.

Tested on Ubuntu 12.04 with i686, and on a custom Linux distro on a Vortex86DX microcontroller.

Original review: https://breakpad.appspot.com/455002/
A=aras.vaichas
BUG=495

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1248 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-09 20:22:43 +00:00
mark@chromium.org
cca536ba9d Back out r1244
------------------------------------------------------------------------
r1244 | mark@chromium.org | 2013-12-05 18:13:18 -0500 (Thu, 05 Dec 2013) | 7 lines

Avoid redefinition of global static debug flag and remove unneeded
#import "GTMDefines.h

Patch by Alistair Tse <altse@chromium.org>

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

------------------------------------------------------------------------

Breakage documented at https://breakpad.appspot.com/824002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1247 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-09 14:08:10 +00:00
mark@chromium.org
186f1cb206 Switch armv7 setting to arm_version==7.
Patch by Mostyn Bramley-Moore <mostynb@opera.com>

BUG=chromium:234135

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1246 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-08 19:28:36 +00:00
mark@chromium.org
616400ed2f Add include guards and avoid redefinition of false/true in convert_UTF.
Patch by Alistair Tse <altse@chromium.org>

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1245 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-05 23:16:03 +00:00
mark@chromium.org
31a477e889 Avoid redefinition of global static debug flag and remove unneeded
#import "GTMDefines.h

Patch by Alistair Tse <altse@chromium.org>

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1244 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-05 23:13:18 +00:00
qsr@chromium.org
d9d0a61f97 Do not read CFI section when not outputing CFI information.
This revert revision 1182 and fix setting the module load address
whether CFI information is needed or not.

R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1243 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-04 14:05:23 +00:00
ivan.penkov@gmail.com
08ce8e35eb Fix unused method warning.
Review URL: https://breakpad.appspot.com/814002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1242 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-03 22:27:01 +00:00
ivan.penkov@gmail.com
b91429acb0 Fixing several instances of wrong printf format specifiers.
Review URL: https://breakpad.appspot.com/794002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1241 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-03 21:13:59 +00:00
mark@chromium.org
8a0b196e22 Add missing #include of eintr_wrapper.h to auto_testfile.h. Since it's
Linux-specific, shuffle the files around a bit.

(The implementation is actually POSIX-specific, but it's currently only used
on Linux.)

R=blundell@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1240 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-03 19:01:17 +00:00
mark@chromium.org
036dec3ecc Don't HANDLE_EINTR(close). Either IGNORE_EINTR(close) or just close.
It is incorrect to wrap close in HANDLE_EINTR on Linux.

Unnecessary #includes of eintr_wrapper.h are also removed. The variable naming
within the macro is also updated per Chromium r178174.

einter_wrapper.h contains a non-mechanical change. Mechanical changes were
generated by running:

sed -E -i '' \
    -e 's/((=|if|return|CHECK|EXPECT|ASSERT).*)HANDLE(_EINTR\(.*close)/\1IGNORE\3/' \
    -e 's/(ignore_result|void ?)\(HANDLE_EINTR\((.*close\(.*)\)\)/\2/' \
    -e 's/(\(void\) ?)?HANDLE_EINTR\((.*close\(.*)\)/\2/' \
    $(grep -rl HANDLE_EINTR.*close . --exclude-dir=.svn)

sed -E -i '' -e '/#include.*eintr_wrapper\.h"/d' \
    $(grep -EL '(HANDLE|IGNORE)_EINTR' \
        $(grep -Elr '#include.*eintr_wrapper\.h"' . --exclude-dir=.svn))

BUG=chromium:269623
R=ted.mielczarek@gmail.com

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1239 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-03 14:12:08 +00:00
blundell@chromium.org
b303174e32 Re-enable ios_exception_minidump_generator being built on non-ARM.
This file gets built on x86 as part of building Chromium for the iOS simulator,
which I had forgotten in the course of https://breakpad.appspot.com/664002/.

R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1238 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-12-02 16:02:48 +00:00
qsr@chromium.org
f546e072ce In iOS, BREAKPAD_OUTPUT_DUMP_FILE value contains a malformed full path to the dump file.
The std::string dumpFilename already contains the full pathname to the dump file.  Appending it to the dumpDirAsNSString creates a string with the path portion duplicated, e.g.:

/var/mobile/Applications/516BE756-DFD4-4F9B-85D5-85966B0038F7/Library/Caches/Breakpad/var/mobile/Applications/516BE756-DFD4-4F9B-85D5-85966B0038F7/Library/Caches/Breakpad/0A406D28-437D-48EE-9989-23F7F871818E.dmp

Instead of this:

/var/mobile/Applications/516BE756-DFD4-4F9B-85D5-85966B0038F7/Library/Caches/Breakpad/0A406D28-437D-48EE-9989-23F7F871818E.dmp

R=markus@chromium.org, qsr@chromium.org

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

Patch from Akiva <scirsw@gmail.com>.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1237 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-11-26 10:38:55 +00:00
mark@chromium.org
e9165f4353 Process minidumps generated on ARM64 in iOS apps.
Patch by Colin Blundell <blundell@chromium.org>

BUG=542

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1236 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-11-23 01:45:20 +00:00
mark@chromium.org
77022ac0df Generate minidumps for 64-bit ARM apps on iOS.
Adds an ARM64-specific definition of MDRawContext and support for writing out a
minidump when running on ARM64. Additionally, extends the iOS minidump generator
for NSExceptions to work on ARM64 as well as ARM.

Patch by Colin Blundell <blundell@chromium.org>

BUG=542

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1235 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-11-21 17:44:57 +00:00
mark@chromium.org
8e28cb3898 Provide BreakpadGetCrashReportCount() and -[BreakpadController
getCrashReportCount:]

This provides the ability for clients to query the number of crash reports
that are waiting to upload.

Patch by KiYun Roe <kiyun@chromium.org>

BUG=547

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1234 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-11-20 16:34:13 +00:00
thestig@chromium.org
46821f78b1 Allow SIGABRT to abort the program.
SIGABRT can be generated internally, usually by calling abort(),
or externally by another process.  When the signal is generated
by the kernel, info->si_pid is 0 and the signal is treated in the
same way as an exception (SIGSEGV, etc.), but the assumption
that the exception happens again upon return from the handler
is wrong, so we must have a special case for this.

Original CL: https://breakpad.appspot.com/734002/

BUG=chromium:303075
TEST=tested with Alt-VolumeUp-X on Chrome OS
A=semenzato@chromium.org
R=semenzato@google.com

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1233 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-11-07 22:50:13 +00:00
ivan.penkov@gmail.com
fd9f3d8b17 Use register %ebp (instead of %esp) when calculating the value of
.raSearchStart in the cases where there are alignment operators in
the program string.

If alignment operators are found in the program string, the current
value of %ebp must be valid and it is the only reliable data point
that can be used for getting to the previous frame.  Previously, the
.raSearchStart calculation was based on %esp and when %esp is aligned
in the current frame (which is a lossy operation) the resulting
.raSearchStart cannot was incorrect.  There is code that is trying to
work around this problem (scanning of up to 3 words for a return
address) which is unreliable and it doesn't work in many cases (e.g.
when the alignment is on a 64-byte boundary).

This fix is already deployed in Google and it was measured to reduce
the number of wrong stack traces (for Windows crashes) by 45%. No
regressions have been found so far.

Here is an example of an issue that was fixed by this change (where
register %esp is aligned on the 64-byte boundary and the workarounds
that we already had didn't work):

https://code.google.com/p/chromium/issues/detail?id=311359

0:013> uf chrome_59630000!base::MessagePumpForIO::DoRunLoop
  518 59685c39 55      push    ebp
  518 59685c3a 8bec    mov     ebp,esp
  518 59685c3c 83e4c0  and     esp,0FFFFFFC0h  <== 64-byte boundary
  518 59685c3f 83ec34  sub     esp,34h
  518 59685c42 53      push    ebx
  518 59685c43 56      push    esi

Program string contains 64-byte alignment:
$T1 .raSearch = $T0 $T1 4 - 64 @ = $ebp $T1 4 - ^ = $eip $T1 ^ = 
$esp $T1 4 + = $20 $T0 56 - ^ =  $23 $T0 60 - ^ =  $24 $T0 64 - ^ =
Review URL: https://breakpad.appspot.com/694002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1232 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-11-05 23:50:49 +00:00
mark@chromium.org
c7a1674f16 Add support for configuring the minimum log level at compile time
The minimum log level can be set by defining to macro BPLOG_MINIMUM_SEVERITY
to one of google_breakpad::LogStream::Severity values. The default is
SEVERITY_INFO.

BUG=none
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1231 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-11-05 19:43:48 +00:00
mark@chromium.org
4b6e0bb952 NSLocalizedString compatibility (10.8 SDK and clang trunk -Wformat-extra-args)
Apparently, as of the 10.8 SDK, Apple has quietly decided that the first
argument to NSLocalizedString is supposed to be usable as-is as a format
string, instead of simply being the key to obtain a usable format string.
The recent clang trunk enforces this, resulting in build breaks like

crash_report_sender.m:560:14: error: data argument not used by format string [-Werror,-Wformat-extra-args]
             displayName];
             ^

Breaking the result of NSLocalizedString into a temporary NSString* is enough
to suppress the warning.

BUG=chromium:314109
R=thakis@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1230 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-11-05 16:53:55 +00:00
vapier@chromium.org
bf139abc7d map_serializers_unittest: fix unused variable warning
Building with clang triggers warnings (which for us breaks the build):
src/processor/map_serializers_unittest.cc:52:11: error: 
      unused variable 'kSizeOfInt' [-Werror,-Wunused-const-variable]
1 error generated.

Fix by Yunlian Jiang.

BUG=chromium:311720 (http://crbug.com/311720)
TEST=FEATURES="test" emerge-lumpy google-breakpad passes


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1229 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-10-30 17:16:38 +00:00
mattdr.breakpad@gmail.com
32cbf9fc88 Print response code when sym_upload fails.
https://breakpad.appspot.com/631003/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1228 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-10-29 23:28:16 +00:00
mattdr.breakpad@gmail.com
667991e25f Add some symbols missing from my last commit.
https://breakpad.appspot.com/622002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1227 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-10-29 20:16:46 +00:00
mattdr.breakpad@gmail.com
502f23211b Add simple exploitability analysis for Linux crashes.
https://breakpad.appspot.com/622002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1226 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-10-29 20:03:39 +00:00
jessicag.feedback
6689f24d1a Switch to scoped_array instead of inappropriate scoped_ptr.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1225 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-10-28 23:39:43 +00:00
vapier@chromium.org
8586f6e288 increase exception handler stack size for dumping thread
When running unittests under ASAN, we see that these code paths can
slightly smash the stack.  Double it to avoid that.

[ RUN      ] ExceptionHandlerTest.InstructionPointerMemoryMinBound
=================================================================
==12775== ERROR: AddressSanitizer: stack-buffer-overflow on address 0xf6787614 at pc 0xf7516b29 bp 0xf6786d38 sp 0xf6786d30
READ of size 4 at 0xf6787614 thread T0
    #0 0xf7516b28 (/build/x86-generic/tmp/portage/chromeos-base/google-breakpad-1181-r66/work/google-breakpad-1181/build/src/client/linux/linux_client_unittest_shlib+0x69eb28)
Shadow byte and word:
  0x3ecf0ec2: f2
  0x3ecf0ec0: f2 f2 f2 f2
More shadow bytes:
  0x3ecf0eb0: f2 f2 f2 f2
  0x3ecf0eb4: 04 f4 f4 f4
  0x3ecf0eb8: f2 f2 f2 f2
  0x3ecf0ebc: 04 f4 f4 f4
=>0x3ecf0ec0: f2 f2 f2 f2
  0x3ecf0ec4: 04 f4 f4 f4
  0x3ecf0ec8: f2 f2 f2 f2
  0x3ecf0ecc: 04 f4 f4 f4
  0x3ecf0ed0: f2 f2 f2 f2
Stats: 0M malloced (0M for red zones) by 2757 calls
Stats: 0M realloced by 0 calls
Stats: 0M freed by 2229 calls
Stats: 0M really freed by 0 calls
Stats: 3M (899 full pages) mmaped in 7 calls
  mmaps   by size class: 7:4095; 8:2047; 9:1023; 10:511; 14:32; 16:16;
  mallocs by size class: 7:1831; 8:590; 9:85; 10:233; 14:3; 16:15;
  frees   by size class: 7:1459; 8:437; 9:84; 10:232; 14:2; 16:15;
  rfrees  by size class:
Stats: malloc large: 15 small slow: 25
==12775== ABORTING

BUG=chromium:293519
TEST=ran unittests under ASAN and they now pass
R=benchan@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1224 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-10-23 05:12:37 +00:00
qsr@chromium.org
6f3426a156 Remove define of mach_vm_region from mach_vm_compatibility.h.
mach_vm_region() is not called in the Breakpad codebase.

Patch by: blundell@chromium.org

R=qsr@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1223 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-10-17 11:03:26 +00:00
qsr@chromium.org
6fa386bfc6 Support symbol dumping for ARMV8 iOS apps.
In my testing, ARM V8 object files and ARM V8 slices of universal binaries do
not contain debug_frame sections (at least at this time), and hence dump_syms
does not output CFI for ARM V8 even in the absence of the "-c" flag.

Patch by:blundell@chromium.org

BUG=542
R=qsr@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1222 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-10-15 10:24:21 +00:00
qsr@chromium.org
404c684751 Remove unittest from sources list of iOS client xcodeproj.
This unittest has a main(), which causes linker errors when the library is
linked into an application.

Patch by:blundell@chromium.org

R=qsr@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1221 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-10-15 08:34:02 +00:00
qsr@chromium.org
c00999fa2c Fix missing include in ios_exception_minidump_generator.mm.
R=qsr@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1220 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-10-11 09:17:13 +00:00
rsesek@chromium.org
0453082dbe In NonAllocatingMap, remove asserts around key/value length.
Since the data is stored using strncpy they are merely advisory in debug mode.

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

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1219 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-10-01 21:32:16 +00:00
gordana.cmiljanovic@imgtec.com
b7acb2a56a This patch adds required change for stackwalker_mips_unittest to pass on 64bit
platforms.

One test from stackwalker_mips_unittest was failing as mentioned in:
https://breakpad.appspot.com/632002/
https://breakpad.appspot.com/633002/

BUG=none
TEST=stackwalker_mips_unittest (run on x86-64 and mips)

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



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1218 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-09-30 09:34:55 +00:00
ivan.penkov@gmail.com
bd71bdd742 Adding stricter validation checks to various symbol parser functions.
More specifically, the validation of the following record types is improved:
 - FILE records
 - FUNC records
 - Line record
 - PUBLIC records

Adding unittests.
Review URL: https://breakpad.appspot.com/632003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1217 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-09-25 18:25:13 +00:00
digit@chromium.org
5bce3b4d77 Fix the Android/MIPS build.
This patch fixes the build for Android on MIPS when
using the latest official Android NDK (r9):

- Update src/common/android/include/elf.h to add a missing
  definition for SHT_MIPS_DWARF.

- Add src/common/android/include/sgidefs.h required by LSS
  when compiling for MIPS.

- Update android/run-checks.sh to work properly with
  the --abi=mips option. All tests were passed succesfully
  with an emulator system image running Android 4.2.

- Update other Android-specific files.

R=Petar.Jovanovic@imgtec.com, mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1216 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-09-25 13:47:44 +00:00
gordana.cmiljanovic@imgtec.com
db877a13bb Adding mips support for Android.
Mips linux support has been added previously in r1212. Some additional changes
are required to make breakpad functional on Android.

BUG=none
TEST=build, unittests, chrome test application

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



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1215 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-09-25 08:18:03 +00:00
ivan.penkov@gmail.com
ab52ca7d6e Handle block helper functions in Breakpad symbol parser. Block helper functions are associated with a source file but not associated with any line number. For such functions, the Breakpad symbol file contains 0 for the line numbers. Hence, 0 should be threated as valid line number. For more information on block helper functions, please, take a look at http://clang.llvm.org/docs/Block-ABI-Apple.html.
Here is the symbol parser output:

E0906 11:27:06.051507 22535 basic_source_line_resolver.cc:76] Line 380187: ParseLine failed
E0906 11:27:06.051614 22535 basic_source_line_resolver.cc:76] Line 380188: ParseLine failed
E0906 11:27:06.051648 22535 basic_source_line_resolver.cc:76] Line 380190: ParseLine failed
E0906 11:27:06.051679 22535 basic_source_line_resolver.cc:76] Line 380191: ParseLine failed
E0906 11:27:06.200814 22535 basic_source_line_resolver.cc:76] Line 446729: ParseLine failed

Here are the contents of the Breakpad symbol file:

FUNC 440d60 49 0 __copy_helper_block_
440d60 b 0 3160    <<<-----------  the third number is the line number
440d6b 3e 0 3160    <<<----------------------------   same here
FUNC 440db0 36 0 __destroy_helper_block_
440db0 a 0 3160    <<<----------------------------   same here
440dba 2c 0 3160    <<<----------------------------   same here
Review URL: https://breakpad.appspot.com/629002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1214 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-09-19 21:37:49 +00:00
gordana.cmiljanovic@imgtec.com
8c037de0b2 Fix for a clang error which is introduced by change r1212.
BUG=none
TEST=build

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



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1213 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-09-13 16:32:58 +00:00
gordana.cmiljanovic@imgtec.com
f78839c157 Adding support for mips.
Support for mips cpu is added to all breakapad targets including unittests.

BUG=none
TEST=unittests

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



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1212 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-09-11 11:37:04 +00:00
bradnelson@chromium.org
ae35566b8d Fixing minidump_dump to handle nacl dumps.
Since nacl was not listed in decoding the code identifier, minidump_dump
produces errors like this (and non-zero return code):
2013-09-05 13:41:04: minidump.cc:2044: ERROR: MinidumpModule code_identifier
requires known platform, found 0x8205

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3424
TEST=tested with minidumps from nacl locally
R=mark@chromium.org,mseaborn@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1211 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-09-05 22:04:05 +00:00
mseaborn@chromium.org
24c6c0aaef Update to build against the latest revision of linux_syscall_support.h
The prctl() calls must be updated following this LSS change:
https://code.google.com/p/linux-syscall-support/source/detail?r=24

BUG=none
TEST=build

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1210 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-09-05 21:34:38 +00:00
chrisha@chromium.org
b097e31d92 Make StackWalkerAddressList use FRAME_TRUST_PREWALKED trust level.
Review URL: https://breakpad.appspot.com/624002/




git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1209 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-09-04 20:43:10 +00:00
chrisha@chromium.org
16a880e135 Create StackFrame::FRAME_TRUST_PREWALKED trust type.
This creates a new frame trust type for prewalked stack frames, as suggested in
the review of https://breakpad.appspot.com/620002/.

R=ted.mielczarek@gmail.com, mark@chromium.org

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



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1208 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-08-23 19:41:36 +00:00
chrisha@chromium.org
1e57990cee Create StackwalkerAddressList.
This creates a pseudo stack-walker which does nothing except symbolize an
already walked array of addresses. Will be used for adding 'additional stack
trace' support to MinidumpProcessor.

R=mark@chromium.org, ivan.penkov@gmail.com

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



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1207 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-08-23 14:38:36 +00:00
ted.mielczarek@gmail.com
0510e34cbf Allow setting a limit on the number of frames to be recovered by stack scanning.
Patch by Julian Seward <jseward@acm.org> R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=894264

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1206 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-08-19 18:31:51 +00:00
ted.mielczarek@gmail.com
aaeb7e4f13 Enable the SIGABRT handler on desktop OS X
R=mark at https://breakpad.appspot.com/618002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1205 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-08-14 17:14:18 +00:00
ivan.penkov@gmail.com
1d1b36d371 Updating MDRawMiscInfo to support verions 3 and 4 of the MINIDUMP_MISC_INFO_N structure. Added the necessary code for swapping and string conversion from UTF-16. Found and fixed a bug in MinidumpAssertion::Read where the max string length passed to UTF16codeunits was in bytes instead of UTF-16 chars.
Tested with a minidump containing a version 3 structure to validate the string conversion routines.  Interestingly enough the time_zone names does not appear to be abbreviation as the documentation was suggesting but full names, e.g. Eastern Standard Time:

MDRawMiscInfo
  size_of_info                 = 232
  flags1                       = 0xf7
  process_id                   = 0x54c4
  process_create_time          = 0x51a9323c
  process_user_time            = 0x1
  process_kernel_time          = 0x0
  processor_max_mhz            = 3100
  processor_current_mhz        = 1891
  processor_mhz_limit          = 3100
  processor_max_idle_state     = 0x1
  processor_current_idle_state = 0x1

The new fileds follow:
  process_integrity_level      = 0x1000
  process_execute_flags        = 0x4d
  protected_process            = 0
  time_zone_id                 = 2
  time_zone.bias               = 300
  time_zone.standard_name      = Eastern Standard Time
  time_zone.daylight_name      = Eastern Daylight Time
Review URL: https://breakpad.appspot.com/617002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1204 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-08-02 18:15:57 +00:00
thestig@chromium.org
9c1dc68a2f Fix erronoius address of crashinfo.auxv in minidump-2-core.
BUG=537
A=ajwong@chromium.org
Original review: https://breakpad.appspot.com/615002/

R=ajwong@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1203 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-07-19 00:58:48 +00:00
yuwu@google.com
437706b60a Fix a memory leak, using stringWithUTF8String instead.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1202 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-07-17 18:31:24 +00:00
yuwu@google.com
fce16c1856 Check env var BreakpadMinidumpLocation first, if set, use it as BREAKPAD_DUMP_DIRECTORY.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1201 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-07-15 18:33:10 +00:00
ivan.penkov@gmail.com
8819ab0844 Detect corrupt symbol files during minidump processing. Recover from the errors and use the good data if possible.
More specifically:
 - Detect corrupt symbols during minidump processing and provide the list of modules with corrupt symbols in the ProcessState.  This will allow listing the corrupt symbol files in the final crash report.
 - Skip and recover from symbol data parse errors - don't give up until 100 parse errors are seen.
 - In order to recover from '\0' (null terminator) in the middle of a symbol file, a couple of methods have to be updated to require both buffer pointer and length.  Previously they required only a buffer pointer (char *) and the size of the buffer was evaluated using strlen which is not reliable when the data is corrupt.  Most of the changes are due to these signature updates.
 - Added and updated unittests.

Also, updated minidump_stackwalk to show a WARNING for corrupt symbols.  Output looks like this:
...
Loaded modules:
0x000da000 - 0x000dafff  Google Chrome Canary  ???  (main)
0x000e0000 - 0x0417dfff  Google Chrome Framework  0.1500.0.3  (WARNING: Corrupt symbols, Google Chrome Framework, 4682A6B4136436C4BFECEB62D498020E0)
0x044a8000 - 0x04571fff  IOBluetooth  0.1.0.0
...
Review URL: https://breakpad.appspot.com/613002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1200 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-07-11 01:36:06 +00:00
thestig@chromium.org
92537aa818 Linux: Fix builds on systems without PR_SET_PTRACER in linux/prctl.h.
R=thakis@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1199 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-07-02 02:11:18 +00:00
thestig@chromium.org
7b5811eaac Fix Android build more.
Android doesn't have the Yama LSM, so this line isn't needed. (It doesn't
compile either.)

Original CL: https://breakpad.appspot.com/610002/
A=thakis@chromium.org
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1198 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-07-01 22:18:18 +00:00
mark@chromium.org
8965a51b2c Fix build on Android.
Patch by Nico Weber <thakis@chromium.org>
Review URL: https://breakpad.appspot.com/609002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1197 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-06-28 22:54:18 +00:00
mark@chromium.org
bbd0e39801 Fix a clang warning:
../../breakpad/src/processor/tokenize.cc:65:7: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
  if (!remaining > 0) {
      ^          ~
../../breakpad/src/processor/tokenize.cc:65:7: note: add parentheses after the '!' to evaluate the comparison first
  if (!remaining > 0) {
      ^
       (            )
../../breakpad/src/processor/tokenize.cc:65:7: note: add parentheses around left hand side expression to silence this warning
  if (!remaining > 0) {
      ^
      (         )

R=thakis@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1196 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-06-28 20:45:10 +00:00
mark@chromium.org
f33dd18fd2 Fix a clang warning.
Since explanatoryDialogText returns something that migth be user input, this
looks like a good change anyhow.

../../breakpad/src/client/mac/sender/crash_report_sender.m:269:38:
error: format string is not a string literal (potentially insecure)
    [-Werror,-Wformat-security]
                                     [self explanatoryDialogText],
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Patch by Nico Weber <thakis@chromium.org>
Review URL: https://breakpad.appspot.com/607002


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1195 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-06-27 20:55:45 +00:00
ivan.penkov@gmail.com
d394434a93 This change is addressing a particularly nasty issue where the stackwalker
doesn't see the correct thread stack memory.  Instead, it loads garbage
(from offset 0 of the minidump file - well that's not garbage, but it is
not the stack memory region either) and attempts to walk it.  A typical
symptom of this issue is when you get a single stack frame after
processing - the context frame - for which you don't need stack memory.

This issue is caused by an invalid RVA in the memory descriptor stored
inside the MINIDUMP_THREAD structure for the thread.  Luckily, the
invalid RVA is 0, and the start_of_memory_region appears to be correct,
so this issue can be easily detected and the correct memory region can be
loaded using an RVA specified in the MinidumpMemoryList.

I couldn't find a reasonable description on MSDN regarding
MINIDUMP_MEMORY_DESCRIPTOR.MINIDUMP_LOCATION_DESCRIPTOR having RVA of 0
except maybe for full dumps where the 64-bit version of the structure
(MINIDUMP_MEMORY_DESCRIPTOR64) is used and it has no RVA at all.  It has
a 64-bit DataSize which if interpreted as the 32-bit structure will very
likely result in 0 for the RVA:
  http://msdn.microsoft.com/en-us/library/windows/desktop/ms680384(v=vs.85).aspx 

Anyways, the dump that I looked at was not a full dump so 0 for RVA is a
bit puzzling (at least easily detectable):
...
Microsoft (R) Windows Debugger Version 6.2.9200.20512 X86
Copyright (c) Microsoft Corporation. All rights reserved.
...
User Mini Dump File: Only registers, stack and portions of memory are available
...
MINIDUMP_HEADER:
Version         A793 (62F0)
NumberOfStreams 11
Flags           160
                0020 MiniDumpWithUnloadedModules
                0040 MiniDumpWithIndirectlyReferencedMemory
                0100 MiniDumpWithProcessThreadData
Review URL: https://breakpad.appspot.com/606002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1194 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-06-27 20:34:30 +00:00
ivan.penkov@gmail.com
374e8dcfa7 More robust stack walks when the IP address in the context frame is invalid (or not in a known module).
This is achieved by:
1. Extending the span of the scan for return address in the conext frame.  Initially, I wanted to extend the span of the scan for all frames but then I noticed that there is code for ARM already that is extending the search only for the context frame.  This kind of makes sense so I decided to reuse the same idea everywhere.
2. Attempting to restore the EBP chain after a successful scan for return address so that the stackwalker can switch back to FRAME_TRUST_CFI for the rest of the frames when possible.

I also fixed the lint errors in the files touched.
Review URL: https://breakpad.appspot.com/605002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1193 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-06-26 00:16:11 +00:00
mark@chromium.org
56cf4aa3d9 Eliminate redundant initialization following r1188,
https://breakpad.appspot.com/599002

R=ivan.penkov@gmail.com

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1192 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-06-20 18:20:48 +00:00
cdn@chromium.org
8041deee0c add interface for WriteMinidump which allows the caller to supply file handles instead of paths where the minidumps should be written.
BUG=N/A
TEST=N/A
R=ivan.penkov@gmail.com, mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1191 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-06-06 17:20:34 +00:00
ted.mielczarek@gmail.com
e10e9ac7ca Make all linux ptrace dumper tests use a subprocess
Patch by Mike Hommey <mh@glandium.org>, R=ted at https://breakpad.appspot.com/550002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1190 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-06-06 13:15:54 +00:00
ivan.penkov@gmail.com
6b46d4e872 Treat warnings as error and fix most level 4 warnings in the breakpad windows client projects.
Some of the lint errors in the files touched by this change were also fixed.

BUG=533
Review URL: https://breakpad.appspot.com/601002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1189 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-06-04 16:51:01 +00:00
ivan.penkov@gmail.com
5bdee65f7a Thanks to Matthew Riley who noticed this issue and provided the initial proposal for the fix.
There's a bug in the new allocator<T> implementation used by wasteful_vector.  It inherits the base class' implementation of allocator and doesn't implement allocate() so it goes to the heap instead of the PageAllocator -- the very thing wasteful_vector was trying to avoid!  As a side effect it was also leaking heap memory.

Thanks,
-Ivan
Review URL: https://breakpad.appspot.com/599002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1188 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-23 18:47:49 +00:00
ivan.penkov@gmail.com
2b1f82e1c8 Fixing several instances of std::vector::operator[] out of range access
Review URL: https://breakpad.appspot.com/597002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1187 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-21 17:05:35 +00:00
ivan.penkov@gmail.com
e4d3cca3ef Submitting this on behalf of Xiaoling Bao.
Make custom info population before dump generation as an optional operation.  This is part of a security change to move the crash generation and upload out of Google updater process.
Review URL: https://breakpad.appspot.com/586003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1186 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-20 18:55:54 +00:00
ted.mielczarek@gmail.com
ecd727f386 Ensure a proper LinuxDumper::crash_thread_ value
Patch by Mike Hommey <mh@glandium.org>, R=me at https://breakpad.appspot.com/582002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1185 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-17 19:50:00 +00:00
ted.mielczarek@gmail.com
bcf029f333 Use std::vector with a custom allocator wrapping PageAllocator for wasteful_vector
Patch by Mike Hommey <mh@glandium.org>, R=me at https://breakpad.appspot.com/581002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1184 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-17 19:47:10 +00:00
ted.mielczarek@gmail.com
54e75078d6 Avoid gmock warning "Uninteresting mock function call"
Patch by Michael Krebs <mkrebs@chromium.org>, R=me at https://breakpad.appspot.com/397002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1183 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-17 14:51:46 +00:00
qsr@chromium.org
3a59d0586b Always read CFI section, even when not outputing CFI information.
On iOS at least, the CFI section contains information needed to
correctly dump the symbols. Even if the CFI section is not dumped,
reading it is necessary to get correcty symbolication.

R=mark@chromium.org, ted.mielczarek@gmail.com

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1182 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-16 14:06:06 +00:00
ivan.penkov@gmail.com
8695cc0b88 Compile issue when using global string "::string". For more details take a look at src/common/using_std_string.h.
Review URL: https://breakpad.appspot.com/577002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1181 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-11 00:23:41 +00:00
mseaborn@chromium.org
e775f8bb16 Fix a "set but not used" compiler warning in a test
Add a missing assertion whose absence made the test ineffective.
Make the test a little stricter too.

BUG=none
TEST="make check" to run the test + use "-Wall -Werror"

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1180 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-10 20:58:49 +00:00
mseaborn@chromium.org
0daf8175df Fix a "set but not used" compiler warning in libdisasm
BUG=none
TEST=none apart from compiling with "-Wall -Werror"

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1179 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-10 15:49:23 +00:00
mark@chromium.org
09b6b0f8bf Fix following r1175: the section name is __debug_info, not .debug_info.
Review URL: https://breakpad.appspot.com/583003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1178 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-09 21:56:18 +00:00
chrisha@chromium.org
3989dd415b Check in new Windows binaries.
These binaries include recent changes to pdb_source_line_writer for handling
PDBs with OMAP data. They were built using the GYP build files, MSVS 2010 and
DIA SDK 8.0.

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



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1177 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-09 16:29:56 +00:00
thestig@chromium.org
09f8989389 Mac: Fix more errors from clang to get crash_report.xcodeproj close to compiling.
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1176 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-08 20:24:03 +00:00
thestig@chromium.org
7304a2c187 Fix mac dump_syms after r1163.
R=mark@chromium.org

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1175 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-08 17:41:12 +00:00
rsesek@chromium.org
df6f45b04b NULL-check the entry in NonAllocatingMap before setting on it.
Using just an assert will still cause a crash in a release build.

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

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1174 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-08 16:06:33 +00:00
mseaborn@chromium.org
b45b97b2fd Make x86-64 stack walking work for Native Client minidumps
For NaCl, a stack walker should ignore the top 32 bits of %rip, %rsp
and %rbp, otherwise it will try to read from %r15-extended stack
addresses and look up symbol info for %r15-extended code addresses,
which will fail.

BUG=https://code.google.com/p/nativeclient/issues/detail?id=3424
TEST=tested manually with a NaCl minidump

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1173 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-08 02:37:15 +00:00
mseaborn@chromium.org
85c352695f Add MD_OS_NACL platform_id value for identifying NaCl minidumps
Change minidump-2-core to accept minidumps with this platform_id value
rather than rejecting them as non-Linux dumps.

Add a missing "break" for a MD_OS_PS3 case.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3424
TEST= tested with work-in-progress NaCl minidump generator

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1172 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-06 23:33:02 +00:00
mseaborn@chromium.org
b43dacb23a Fix an "unused variable" compiler warning in exploitability_win.cc
BUG=none
TEST=compile with "-Wall -Werror"

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1171 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-06 23:27:28 +00:00
mark@chromium.org
3444ed7cf1 Fix GetLoadingAddress() to work for Native Client executables
NaCl executables have ELF program headers that look like this (for the
original NaCl x86 GCC toolchain):

Program Header:
    LOAD off    0x00010000 vaddr 0x00020000 paddr 0x00020000 align 2**16
         filesz 0x00017ce0 memsz 0x00017ce0 flags r-x
    LOAD off    0x00030000 vaddr 0x10020000 paddr 0x10020000 align 2**16
         filesz 0x00001c98 memsz 0x00001c98 flags r--
    LOAD off    0x00040000 vaddr 0x10030000 paddr 0x10030000 align 2**16
         filesz 0x000025ec memsz 0x00002b88 flags rw-

or this (for the newer NaCl ARM GCC toolchain):

Program Header:
    LOAD off    0x00010000 vaddr 0x00020000 paddr 0x00020000 align 2**16
         filesz 0x000193b0 memsz 0x000193b0 flags r-x
    LOAD off    0x00000000 vaddr 0x10020000 paddr 0x10020000 align 2**16
         filesz 0x00000978 memsz 0x00000978 flags r--
    LOAD off    0x00001000 vaddr 0x10031000 paddr 0x10031000 align 2**16
         filesz 0x00000abc memsz 0x00000fac flags rw-

Fix GetLoadingAddress() to return the start address of the first
segment, 0x20000, in these cases.  Looking at p_offset for this isn't
correct, and the first segment doesn't have p_offset == 0 here because
NaCl can't map the ELF file headers as part of the first segment
(which is for validatable code only).

BUG= https://code.google.com/p/nativeclient/issues/detail?id=3424
TEST= check addresses in output of "dump_syms" when run on NaCl nexe

Patch by Mark Seaborn <mseaborn@chromium.org>
Review URL: https://breakpad.appspot.com/588002/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1170 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-06 19:53:48 +00:00
qsr@chromium.org
e61b76c679 Fix minidump generation from exception.
Review URL: https://breakpad.appspot.com/583002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1169 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-03 15:04:12 +00:00
chrisha@chromium.org
110c99fbd5 Add GYP file for tools\windows\symupload.
This creates a GYP project file for the Windows symupload binary, allowing for
easier building. It also updates the old VC 8.0 project file to reflect recent
changes to PdbSourceLineWriter.

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



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1168 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-01 19:02:32 +00:00
chrisha@chromium.org
8507f63d38 Add explicit OMAP support to dump_syms.
This CL adds new utilities to common/windows for handling OMAP information in
PDB files. It then augments PdbSourceLineWriter with explicit OMAP knowledge so
that symbolization will proceed more cleanly for images whose PDB files contain
OMAP information. This makes breakpad handle OMAPped symbol files as cleanly as
WinDbg.

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



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1167 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-05-01 18:18:46 +00:00
ivan.penkov@gmail.com
5b36fbe088 Fixing a clang warning.
This is a followup change from https://breakpad.appspot.com/569002/

This prevents push_back from ever calling Realloc()
with 0 (which could happen if wasteful_vector was
constructed with size_hint set to 0, causing
allocated_ to be 0.
Review URL: https://breakpad.appspot.com/576002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1166 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-25 21:32:55 +00:00
thestig@chromium.org
0bdc714c20 Add MD_OS_PS3 to breakpad and exception types.
A=Jia Ji <jijia@google.com>
Original review: https://breakpad.appspot.com/571002/

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1165 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-25 20:36:31 +00:00
thestig@chromium.org
affac9413b Cleanup: Use scoped_ptr where appropriate in DwarfCUToModule.
Review URL: https://breakpad.appspot.com/572002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1164 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-24 21:40:27 +00:00
thestig@chromium.org
f7566bd447 Add an option to not handle DWARF inter-compilation unit references in Linux dump_syms.
This saves a lot of memory for dump_syms.

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1163 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-24 21:18:44 +00:00
ivan.penkov@gmail.com
ae3947e123 Fix Clang warning regarding null pointer argument.
This warning was showing up in the Clang static analyzer in Xcode: "Null pointer argument in call to memory copy function"

Fix provided by Ian Wilkinson.
Review URL: https://breakpad.appspot.com/569002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1162 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-24 21:02:55 +00:00
rsesek@chromium.org
77acc6adab Rewrite SimpleStringDictionary with NonAllocatingMap.
NonAllocatingMap has a near-identical interface, but is significantly less code,
more customizable, and has storage that is POD.

BUG=http://code.google.com/p/chromium/issues/detail?id=77656

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1161 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-24 18:15:48 +00:00
digit@chromium.org
593eff42ca Improve ARM CPU info reporting.
This patch improves several things for Linux/ARM:

- Better detection of the number of CPUs on the target
  device. The content of /proc/cpuinfo only matches the
  number of "online" CPUs, which varies over time with
  recent Android devices.

- Reconstruct the CPUID and ELF hwcaps values from
  /proc/cpuinfo, this is useful to better identify
  target devices in minidumps.

- Make minidump_dump display the new information
  in useful ways.

- Write a small helper class to parse /proc/cpuinfo
  and also use it for x86/64.

- Write a small helper class to parse sysfds cpu lists.

- Add a my_memchr() implementation.

- Add unit tests.

Tested on a Nexus S (1 CPU), Galaxy Nexus (2 CPUs)
and a Nexus 4 (4 CPUs).

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1160 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-24 10:06:14 +00:00
thestig@chromium.org
9f45f6b5cf Cleanup: Remove duplicate wording in license headers.
BUG=505

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1159 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-23 23:18:39 +00:00
ivan.penkov@gmail.com
fb22e80229 This change allows compiling sym_upload.cc and minidump_upload.cc using a global ::string class instead of std::string. For more details take a look at common/using_std_string.h
A few other fixes:

 - getopt() returns (int)(-1) when options are exhausted.  This was already sent out for code review by mattdr but only for sym_upload.cc (https://breakpad.appspot.com/561002/).  I'm applying the fix for both files.

 - Fixed a couple of lint warning about improper usage of white-spaces.

Thanks,
-Ivan
Review URL: https://breakpad.appspot.com/567002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1158 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-23 21:04:31 +00:00
ivan.penkov@gmail.com
40c9de4d8d Allow option for efficient and safe opt out of in-proc dump generation for Windows breakpad clients.
https://breakpad.appspot.com/549002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1157 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-23 00:47:53 +00:00
thestig@chromium.org
697da828dc Fix Bigcluster build error with minidump.cc after r1147.
A=Jia Ji <jijia@google.com>
Original review: https://breakpad.appspot.com/563002/

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1156 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-19 22:05:07 +00:00
rsesek@chromium.org
093b8aee9b Get SimpleStringDictionary compiling on Linux.
BUG=http://code.google.com/p/chromium/issues/detail?id=77656

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1155 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-19 19:32:20 +00:00
rsesek@chromium.org
30bb1ab601 Move SimpleStringDictionary from common/mac/ to just common/.
This also cleans up some things like the file name, trailing whitespace,
and making the test use gtest instead of sentest, since there's nothing
Mac specific about this.

BUG=https://code.google.com/p/chromium/issues/detail?id=77656

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

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1154 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-18 20:17:29 +00:00
ted.mielczarek@gmail.com
9d82a70384 Add Android ifdef to fix issue 526
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1153 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-18 13:24:33 +00:00
ted.mielczarek@gmail.com
32ce6dea51 Fix missing result check in Mac exception handler
Patch by Georg Fritzsche <georg.fritzsche@googlemail.com>, R=ted at https://breakpad.appspot.com/554003/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1152 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-18 12:47:08 +00:00
ted.mielczarek@gmail.com
d9c3ad7b88 minidump_stackwalk should display r12 in ARM stack traces
A=torne@google.com, R=ted, http://code.google.com/p/google-breakpad/issues/detail?id=456

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1151 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-17 13:37:39 +00:00
ted.mielczarek@gmail.com
91c9518af2 Don't print an error when a user-set max frames limit has been reached in the stackwalker
Patch by Julian Seward <jseward@acm.org>, R=ted at https://bugzilla.mozilla.org/show_bug.cgi?id=859745

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1150 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-16 17:55:21 +00:00
ted.mielczarek@gmail.com
1974aaba51 ESP is zero in dumps created by CrashGenerationClient::RequestDump on i386 Linux
Patch by Bruce Dawson <bruce.dawson@gmail.com>, R=ted at https://breakpad.appspot.com/533002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1149 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-16 17:51:10 +00:00
thestig@chromium.org
bc54c38679 Change MDRawSystemInfo.processor_architecture value for PPC64 to 0x8002.
Review URL: https://breakpad.appspot.com/559002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1148 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-13 02:24:36 +00:00
thestig@chromium.org
0c759c6f62 Add PPC64 support to breakpad processor.
A=Jia Ji <jijia@google.com>
Original review: https://breakpad.appspot.com/557002/
Review URL: https://breakpad.appspot.com/558002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1147 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-12 23:24:02 +00:00
thestig@chromium.org
d3c4cbd30f Fix build on Android - put the missing NT_GNU_BUILD_ID #define in elf_gnu_compat.h and use it where needed.
Review URL: https://breakpad.appspot.com/554004

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1146 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-10 03:33:09 +00:00
thestig@chromium.org
cff813962a Remove auto_ptr usage in Breakpad. Also fix some lint errors.
Review URL: https://breakpad.appspot.com/553002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1145 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-09 18:58:39 +00:00
jessicag.feedback
2652675ec2 Turn off verbose logging but keep logic for future reference for debug logging.
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1144 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-05 00:53:45 +00:00
ted.mielczarek@gmail.com
b6e66b294f Try to find a build-id through PT_NOTE program headers
A=Mike Hommey <mh@glandium.org>
R=ted at https://breakpad.appspot.com/544003/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1143 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-04 16:24:52 +00:00
ted.mielczarek@gmail.com
6dc56cca44 Support generic Elf notes, with unit tests
A=Mike Hommey <mh@glandium.org>
R=ted at https://breakpad.appspot.com/546002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1142 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-04 16:24:44 +00:00
ted.mielczarek@gmail.com
3a8617eb8c Refactor BasicElf synth_elf unitest
A=Mike Hommey <mh@glandium.org>
R=ted at https://breakpad.appspot.com/544002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1141 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-04 16:24:38 +00:00
mark@chromium.org
b41ad66e93 These are prerequisites needed for a wider effort inside Google to enable
structured logging.  This is basically wrapping std::ostream within a new type. 
No functional differences from this change are expected.

Patch by Ivan Penkov <ivan.penkov@gmail.com>


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1140 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-04-03 18:31:16 +00:00
ivan.penkov@gmail.com
c5ceea7d74 Removing redundant calls to string::c_str().
https://breakpad.appspot.com/539002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1139 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-29 21:37:42 +00:00
ted.mielczarek@gmail.com
bbaca6bc00 Refactor file_id_unittest
A=Mike Hommey <mh@glandium.org>
R=ted at https://breakpad.appspot.com/543003/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1138 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-29 15:10:50 +00:00
ted.mielczarek@gmail.com
704c13e7ab Add tests for section headers in synth_elf unittest
A=Mike Hommey <mh@glandium.org>
R=ted at https://breakpad.appspot.com/542003/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1137 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-29 15:06:43 +00:00
ted.mielczarek@gmail.com
8de2cd2d22 Refactor BasicElf synth_elf unitest
A=Mike Hommey <mh@glandium.org>
R=ted at https://breakpad.appspot.com/544002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1136 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-29 15:06:37 +00:00
ted.mielczarek@gmail.com
637c392d1c Defer adding sections until ELF::Finish in synth_elf
A=Mike Hommey <mh@glandium.org>
R=ted at https://breakpad.appspot.com/543002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1135 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-29 15:06:29 +00:00
ted.mielczarek@gmail.com
ece9df9386 Get the complete linux gate mapping instead of only one page
A=Mike Hommey <mh@glandium.org>
R=ted at https://breakpad.appspot.com/542002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1134 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-29 15:06:24 +00:00
ted.mielczarek@gmail.com
cd0eb0f8dc Fix Windows unittest build on VC2012
R=mark at https://breakpad.appspot.com/539003/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1133 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-29 14:39:55 +00:00
digit@chromium.org
0192fc21b9 Fix three unit tests on recent ARM devices.
Three unit tests were failing on recent ARM devices (e.g. Galaxy Nexus
or Nexus 4), while ran properly on older ones (e.g. Nexus S).

The main issue is that the instruction cache needs to be explicitely
cleared on ARM after writing machine code bytes to a malloc()-ed
page with PROT_EXEC.
Review URL: https://breakpad.appspot.com/540002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1132 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-21 08:22:37 +00:00
ted.mielczarek@gmail.com
4867c9e9d0 Linux MinidumpWriter should properly set number_of_processors on ARM
R=digit at http://breakpad.appspot.com/425002

This doesn't fix this problem in all possible cases, but it makes it
slightly better in some cases, so I think that's a net positive.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1131 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-12 18:08:30 +00:00
ted.mielczarek@gmail.com
e88f61c7ba Remove "library" variable
A=Thiago Farina <tfarina@chromium.org>
BUG=http://code.google.com/p/chromium/issues/detail?id=111541
R=thestig@chromium.org at https://breakpad.appspot.com/537002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1130 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-07 19:02:46 +00:00
ted.mielczarek@gmail.com
8fdf481b7f fix size types w/x32
A=vapier@chromium.org R=ted at https://breakpad.appspot.com/526002/
BUG=chromium-os:36866
TEST=compiled the code for x86_64 (64bit) & x86_64 (x32)

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1129 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-07 19:02:44 +00:00
ted.mielczarek@gmail.com
dc64e106e2 Provide a ReadSymbolData API for Mac dump_syms
R=mark at https://breakpad.appspot.com/522002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1128 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-06 20:14:34 +00:00
ted.mielczarek@gmail.com
7546209ddd Make OOP mac crashreporting exit after writing dump
R=mark at https://breakpad.appspot.com/538002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1127 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-06 20:14:32 +00:00
ivan.penkov@gmail.com
60b5f7c7e9 Keeping track of modules without symbols during crash report processing.
http://breakpad.appspot.com/534002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1126 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-06 19:32:13 +00:00
ted.mielczarek@gmail.com
718ae3284e Allow building symbol dumping without STABS support
R=mark at https://breakpad.appspot.com/536002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1125 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-06 15:33:02 +00:00
ted.mielczarek@gmail.com
983903ee0a Allow reading just CFI data when reading symbols
R=thestig at https://breakpad.appspot.com/517002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1124 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-06 15:32:53 +00:00
ted.mielczarek@gmail.com
46cbbb847e Minor Android fixup for symbol dumping code
Patch by Julian Seward <jseward@acm.org>
R=digit at https://breakpad.appspot.com/521002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1123 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-06 14:43:02 +00:00
ted.mielczarek@gmail.com
93a48343ee Fix some more Win32 compat issues in processor code
R=mark at https://breakpad.appspot.com/535003/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1122 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-06 14:06:52 +00:00
ted.mielczarek@gmail.com
aeffe1056f Use stdint types everywhere
R=mark at https://breakpad.appspot.com/535002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1121 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-06 14:04:42 +00:00
ted.mielczarek@gmail.com
c02002a581 Work around Windows headers #defining ERROR by renaming enum values in StackFrameSymbolizer
Patch by Julian Seward <jseward@acm.org>, R=ted

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1120 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-04 15:42:50 +00:00
ted.mielczarek@gmail.com
cd04fe2c88 Remove unnecessary #include unistd.h
(no review, trivial change)

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1119 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-03-01 17:33:25 +00:00
ted.mielczarek@gmail.com
7d1e1e273a Make CompareStringPtrs::operator() a const method
Patch by Julian Seward <jseward@acm.org>, R=ted

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1118 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-02-28 19:52:51 +00:00
ted.mielczarek@gmail.com
111cce8a88 Add missing "using std::sort" to dwarf_cu_to_module.cc.
Patch by Julian Seward <jseward@acm.org>, R=ted

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1117 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-02-28 19:52:37 +00:00
ted.mielczarek@gmail.com
7a469b1031 Fix DumpSymbols error message when using multiple debug_dirs, followup from r1102.
Patch by Julian Seward <jseward@acm.org>, R=ted

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1116 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-02-27 16:43:26 +00:00
ted.mielczarek@gmail.com
24c9dfed8a size_limit_ member of minidump_descriptor ignored in copy constructor
Patch by Avishai Hendel <avish@fb.com>, R=mkrebs at https://codereview.appspot.com/7305060/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1114 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-02-14 14:03:54 +00:00
ted.mielczarek@gmail.com
0513eeca07 Make MmapWrapper a little less silly
R=thestig at https://breakpad.appspot.com/527002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1113 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-02-14 14:03:51 +00:00
ted.mielczarek@gmail.com
bd6d0964e7 Fix some issues with -Werror=sign-compare on Android builds
R=digit at https://breakpad.appspot.com/524002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1110 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-02-01 19:20:34 +00:00
qsr@chromium.org
00407e09c7 Add API to find out if there is crash reports to send to the server.
Review URL: https://breakpad.appspot.com/518002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1109 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-02-01 09:49:09 +00:00
ted.mielczarek@gmail.com
52925cb9b3 minidump_stackwalk: Show argument registers for ARM stack traces
Patch by Michael Krebs <mkrebs@chromium.org>, R=ted at https://breakpad.appspot.com/497002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1108 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-31 19:49:03 +00:00
ted.mielczarek@gmail.com
015e79275e Remove a call to new[] from WriteDSODebugStream
R=mark at https://breakpad.appspot.com/523002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1107 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-31 16:15:55 +00:00
ted.mielczarek@gmail.com
1f87c4a732 Include the compilation directory for FILE entries, making them absolute instead of relative
A=Ryan Sleevi <rsleevi@chromium.org> R=mark,ted at https://breakpad.appspot.com/385001/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1106 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-23 18:01:28 +00:00
jimblandy
be81ededf8 Print the correct return address, even on architectures where StackFrame::instruction is offset.
a=bruce.dawson, r=jimblandy


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1105 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-22 22:38:41 +00:00
thestig@chromium.org
d2153d7589 Fix remaining processor/scoped_ptr.h references for reals.
Review URL: https://breakpad.appspot.com/516003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1104 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-22 18:49:58 +00:00
thestig@chromium.org
1c4f4a776c Fix remaining processor/scoped_ptr.h references after r1096.
Review URL: https://breakpad.appspot.com/516002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1103 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-22 17:20:42 +00:00
ted.mielczarek@gmail.com
c6f6d9ef30 Make DumpSymbols methods take a vector of debug_dirs
r=thestig at https://breakpad.appspot.com/512002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1102 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-22 13:36:39 +00:00
thestig@chromium.org
834f7ee611 Remove <(library) usage from gyp files.
BUG=chromium:111541

Patch by Thiago Farina <tfarina@chromium.org>.
Original code review: https://breakpad.appspot.com/513002/
Review URL: https://breakpad.appspot.com/515002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1101 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-19 00:19:16 +00:00
ted.mielczarek@gmail.com
7e72c6677a Provide a ReadSymbolData function to get symbol data in a Module instead of just serializing it
R=thestig at https://breakpad.appspot.com/510002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1099 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-18 20:24:16 +00:00
ted.mielczarek@gmail.com
e086f8a9c8 Don't make MmapWrapper's destructor assert
R=mark at https://breakpad.appspot.com/511002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1098 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-18 13:51:05 +00:00
ted.mielczarek@gmail.com
a151d78133 Fix a couple of warnings in stack_frame_symbolizer code
R=SiyangXie at https://breakpad.appspot.com/509003/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1097 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-18 13:40:40 +00:00
ted.mielczarek@gmail.com
63c5d98003 Move scoped_ptr.h to common
R=mark at https://breakpad.appspot.com/509002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1096 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-17 15:53:56 +00:00
mark@chromium.org
44356b590b ExceptionHandler::HandleSignal
(https://code.google.com/searchframe#OAMlx_jo-ck/src/breakpad/src/client/linux/handler/exception_handler.cc&exact_package=chromium&q=SI_USER&type=cs&l=389)
requires si_pid to be equal to getpid() for SI_USER signals.

This is a patch by Lei Zhang (thestig@chromium.org) that fixes the issue with
Chrome+ASan being unable to upload the crash dump to the crash server when the
seccomp sandbox is on.

Patch by Alexander Potapenko <glider@chromium.org>
Review URL: https://codereview.appspot.com/7066068/


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1095 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-14 18:53:18 +00:00
jimblandy
a8426a5c66 DWARF can store DW_AT_high_pc as either an address or a constant. In the latter
case it's the length of the function. breakpad always treats it as an address.

a=mattdr, r=jimb


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1094 4c0a9323-5329-0410-9bdc-e9ce6186880e
2013-01-08 02:14:44 +00:00
qsr@chromium.org
3d451f31d8 Fix typo.
Review URL: https://breakpad.appspot.com/506002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1093 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-12-17 14:48:45 +00:00
qsr@chromium.org
bdd7220794 Updating BreakpadController to allow start and stop being nop.
When BreakpadController is already started or stopped, trying to restart it or
restopping it will now be no-op instead of asserting.
Review URL: https://breakpad.appspot.com/505002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1092 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-12-17 14:20:13 +00:00
mark@chromium.org
6aab1f92bb Remove dead code.
Patch by Rafael Espindola <rafael.espindola@gmail.com>

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1091 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-12-12 04:02:58 +00:00
mkrebs@chromium.org
b7aeb98608 Fix minidump size limit used for MinidumpSizeLimit unittest
If the stack sizes for threads in the MinidumpSizeLimit test are too big,
then subtracting 64KB from the normal minidump file size is not enough to
trigger the size-limiting logic.  Instead of basing the arbitrary limit off
of the normal file size, make it relative to the 8KB stack size the logic
assumes.

BUG=google-breakpad:510
TEST=Ran unittests
Review URL: https://breakpad.appspot.com/504002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1090 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-12-12 02:30:09 +00:00
mark@chromium.org
d4df92aedc Allow the Mac and iOS Breakpad clients to build without exceptions when the C++ standard library is not provided by libstdc++. libc++, for example, does
not provide its own try and catch replacement macros when exceptions are
disabled.

BUG=509
Review URL: https://breakpad.appspot.com/503002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1089 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-12-11 13:46:41 +00:00
ivan.penkov@gmail.com
947ef27362 The Google-breakpad processor rejects (ignores) context records that lack CPU type information in their context_flags fields. Such context records can be valid (e.g. contexts captured by ::RtlCaptureContext).
http://code.google.com/p/google-breakpad/issues/detail?id=493

http://breakpad.appspot.com/500002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1088 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-12-08 03:18:52 +00:00
mark@chromium.org
bf6d350a68 Explicitly include unistd.h for getpagesize().
Patch by Nico Weber <thakis@chromium.org>

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


git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1087 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-12-07 21:31:00 +00:00
ted.mielczarek@gmail.com
0a636257d4 Allow StackwalkerARM to scan much farther to find the caller of the context frame
R=jimb at https://breakpad.appspot.com/501002/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1086 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-12-04 19:30:31 +00:00
qsr@chromium.org
ac9324da7a Add assertion on initialization sequence.
The order at which to call the controller methods is:
1) Any method that change the configuration_ field
2) start
3) Any other method

 This change adds assertion that it is done correctly.
Review URL: https://breakpad.appspot.com/499003

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1085 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-28 17:04:52 +00:00
ivan.penkov@gmail.com
f6864d2ead Fix unused variable warning in optimized build (fix proveded by Matthew Riley)
http://breakpad.appspot.com/499002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1084 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-21 01:38:58 +00:00
ivan.penkov@gmail.com
c937b0ee01 Cleaning up google-breakpad source code of signed-unsigned comparison warnings
http://breakpad.appspot.com/488002/



git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1083 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-21 01:33:08 +00:00
mkrebs@chromium.org
d80f175c1a Add optional file size limit for minidumps
When there are upwards of 200 threads in a crashing process, each having an
8KB stack, this can result in a huge, 1.8MB minidump file.  So I added a
parameter that, if set, can compel the minidump writer to dump less stack.
More specifically, if the writer expects to go over the limit (due to the
number of threads), then it will dump less of a thread's stack after the
first 20 threads.

There are two ways to specify the limit, depending on how you write minidumps:
1) If you call WriteMinidump() directly, there's now a version of the
   function that takes the minidump size limit as an argument.
2) If you use the ExceptionHandler class, the MinidumpDescriptor object you
   pass to it now has a set_size_limit() method you would call before
   passing it to the constructor.

BUG=chromium-os:31447, chromium:154546
TEST=Wrote a size-limit unittest; Ran unittests
Review URL: https://breakpad.appspot.com/487002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1082 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-15 00:01:13 +00:00
mkrebs@chromium.org
1b75bf9f8a Fix assertion failure in WriteMappings() for zero modules
If there were no mappings where ShouldIncludeMapping() returned true,
AllocateObjectAndArray() would die with an assertion failure.

BUG=chrome-os-partner:14914
TEST=Ran unittests
Review URL: https://breakpad.appspot.com/492002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1081 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-14 22:01:35 +00:00
thestig@chromium.org
bbcdd7711f Fix typo from r1079.
TBR=digit
Review URL: https://breakpad.appspot.com/496002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1080 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-13 02:58:56 +00:00
thestig@chromium.org
81885eea47 Linux: Avoid truncating the vendor id.
Review URL: https://breakpad.appspot.com/495002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1079 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-09 19:15:06 +00:00
thestig@chromium.org
d45abdd839 Minor cleanup in src/client/linux/minidump_writer/minidump_writer_unittest.cc.
Review URL: https://breakpad.appspot.com/486002

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1078 4c0a9323-5329-0410-9bdc-e9ce6186880e
2012-11-08 03:12:03 +00:00