aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/minidump_writer/linux_ptrace_dumper.cc
Commit message (Collapse)AuthorAgeFilesLines
* [MIPS]: Use mcontext_t structure for MIPSrmcilroy@chromium.org2015-04-211-15/+23
| | | | | | | | | | | | | | This change removes user_regs_struct and user_fpregs_struct structures for mips and uses mcontext_t instead. R=fdegans@chromium.org, mark@chromium.org, rmcilroy@chromium.org Review URL: https://breakpad.appspot.com/3744002 Patch from Gordana Cmiljanovic <Gordana.Cmiljanovic@imgtec.com>. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1452 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Handle failures of copying process data from a core file.benchan@chromium.org2015-02-021-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | When LinuxCoreDumper fails to copy process data from a core file, it fills the return buffer with a repeated sequence of a special marker. However, MinidumpWriter doesn't know about that and may incorrectly interpret the data. In many cases, MinidumpWriter simply copies the gibberish data to the minidump, which isn't too bad. However, the gibberish data may cause MinidumpWriter to behave badly in some other cases. For example, when MinidumpWriter tries to iterate through the linked list of all loaded DSOs via the r_map field of a r_debug struct, if the linked list is filed with the special marker, the code keeps iterating through the same address. This CL addresses the issue by having LinuxCoreDumper::CopyFromProcess() returns a Boolean value to indicate if the expected data is found from the core file. MinidumpWriter can then decide how to handle that. BUG=chromium:453484 TEST=Run core2md with the test data attached to chromium:453484. R=mark@chromium.org Review URL: https://breakpad.appspot.com/4724002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1420 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Stop calling memmove when unnecessaryhashimoto@chromium.org2015-01-271-2/+4
| | | | | | | | | BUG=chromium:450137 R=mark@chromium.org git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1416 4c0a9323-5329-0410-9bdc-e9ce6186880e
* First cut at adding arm64 Linux / Android support to Breakpad.rmcilroy@chromium.org2014-04-021-0/+18
| | | | | | | | | | | | | | 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
* Fix gcc vs clang cpuid.h discrepency.thestig@chromium.org2013-12-141-1/+4
| | | | | | | | | | 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
* Address additional comments from r1248. Fix the register to check and fix ↵thestig@chromium.org2013-12-101-5/+5
| | | | | | | | | | | 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
* Conditionalize use of <cpuid.h> headermcgrathr@chromium.org2013-12-101-1/+4
| | | | | | | | | | | | 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
* Add MMX detection when getting registers in Linux.thestig@chromium.org2013-12-091-2/+11
| | | | | | | | | | | | | | | | 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
* Adding support for mips.gordana.cmiljanovic@imgtec.com2013-09-111-0/+14
| | | | | | | | | | | | | 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
* Don't bail if a thread's stack pointer is invalidmkrebs@chromium.org2012-10-081-2/+2
| | | | | | | | | | | | | | Currently, if a thread's stack pointer is not within a valid memory page, the minidump writing will fail with an error. This change allows an invalid stack pointer by simply setting the memory size to zero in the minidump. The processing code already checks for the size being zero, although it currently just gives an error (see https://breakpad.appspot.com/413002/). BUG=google-breakpad:499, chromium-os:34880 TEST=make check, manually ran minidump-2-core and core2md Review URL: https://breakpad.appspot.com/478002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1065 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Make my_str_len/my_itos take uintmax_tted.mielczarek@gmail.com2012-09-171-2/+2
| | | | | | R=digit at https://breakpad.appspot.com/452004/ git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1038 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Improve Android supportdigit@chromium.org2012-08-211-2/+0
| | | | | | | | | | | | | | | | | | This patch remove many Android-specific #ifdefs from the Breakpad source code. This is achieved by providing "fixed-up" platform headers (e.g. <signal.h> or <sys/user,h>), in the new directory src/common/android/include/, which masks differences between the NDK and GLibc headers. The old "android_link.h" and "android_ucontext.h" are moved and renamed. This also requires putting this directory as the first include path during Android-hosted builds, hence the modification of Makefile.am and configure.ac Review URL: https://breakpad.appspot.com/434002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1017 4c0a9323-5329-0410-9bdc-e9ce6186880e
* SORRY. It seems I've screwed up my commit for ↵digit@chromium.org2012-08-031-8/+8
| | | | | | | | | | http://breakpad.appspot.com/411002/, since revision 1001 only contains the new src/client/linux/linux_libc_support.cc and none of the other required files. I'm not sure what happened, but I'm re-uploading the patch has another issue. Review URL: https://breakpad.appspot.com/426002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1002 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Fix file descriptor leak in GetThreadInfoByIndexbenchan@chromium.org2012-04-181-0/+1
| | | | | | | Patch by Chris Dearman <chris@mips.com> Review URL: http://breakpad.appspot.com/376001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@954 4c0a9323-5329-0410-9bdc-e9ce6186880e
* Implement core dump to minidump conversion.benchan@chromium.org2012-01-191-0/+292
This patch is part of a bigger patch that helps merging the breakpad code with the modified version in Chromium OS. Specifically, this patch makes the following changes: 1. Turn the LinuxDumper class into a base class and move ptrace related code into a new derived class, LinuxPtraceDumper. 2. Add a LinuxCoreDumper class, which is derived from LinuxDumper, to extract information from a crashed process via a core dump file instead of ptrace. 3. Add a WriteMinidumpFromCore function to src/client/linux/minidump_writer/minidump_writer.h, which uses LinuxCoreDumper to extract information from a core dump file. 4. Add a core2md utility, which simply wraps WriteMinidumpFromCore, for converting a core dump to a minidump. BUG=455 TEST=Tested the following: 1. Build on 32-bit and 64-bit Linux with gcc 4.4.3 and gcc 4.6. 2. Build on Mac OS X 10.6.8 with gcc 4.2 and clang 3.0 (with latest gmock). 3. All unit tests pass. 4. Run Chromium OS tests to test core2md. Review URL: http://breakpad.appspot.com/343001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@905 4c0a9323-5329-0410-9bdc-e9ce6186880e