This extracts the existing objdump-based disassembler engine used in
ExploitabilityLinux into a seperate reusable class, and adds support
for most common address operand formats.
This is a precursor to using DisassemblerObjdump to handle address
resolution for non-canonical address dereferences on amd64.
Bug: 901847
Change-Id: I1a06a86fc2e7c76b4d0e79eca5f8a6c501379f47
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3720740
Reviewed-by: Ivan Penkov <ivanpe@google.com>
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
Previous updates to these were partially done. Rerun with the
right versions of autoconf-2.69 & automake-1.16.5.
Change-Id: Ifd6c8405b0b50c5d3cf4ea536a7db5762d62644e
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3734167
Reviewed-by: George Burgess <gbiv@chromium.org>
This is a reland of commit 0808030bee
Original change's description:
> Support PE modules in core files when running core2md
>
> Core files generated from `wine` contain both ELF and PE modules. Module
> format can be guessed by checking the file contents. If the module
> corresponds to PE-file conditions (has specific fields set up as
> described in https://code.google.com/archive/p/corkami/wikis/PE.wiki)
> we'll create a MDCVInfoPDB70 record in the minidump for it, but if
> the file cannot be opened, is too short or is not a PE file, we'll
> fall back to ELF procedure.
>
> Added /src/client/linux/minidump_writer/pe_file.{cc,h} to
> src_client_linux_libbreakpad_client_a_SOURCES and
> src_client_linux_linux_client_unittest_shlib_SOURCES.
> Makefile.in and aclocal.m4 were generated by running 'aclocal && automake'.
>
> Test: build core2md and use it to convert a core file into dmp, validate
> that the generated dmp file can be opened. Ran './configure & make'.
>
> Change-Id: I225ffeea3f582deed40ecdfe7ab77f5754e90cbe
> Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3629189
> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Change-Id: I09dd067a39a95f81f48656595e811c263561ebf2
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3695863
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This reverts commit 0808030bee.
Reason for revert: Breaks Android Compile
ld.lld: error: undefined symbol: google_breakpad::PEFile::TryGetDebugInfo(char const*, google_breakpad::_RSDS_DEBUG_FORMAT*)
>>> referenced by minidump_writer.cc
>>> client/minidump_writer.o:((anonymous namespace)::MinidumpWriter::FillRawModule(google_breakpad::MappingInfo const&, bool, unsigned int, MDRawModule*, unsigned char const*)) in archive obj/third_party/breakpad/libclient.a
https://ci.chromium.org/ui/p/chromium/builders/try/android-marshmallow-arm64-rel/1188618/overview
Original change's description:
> Support PE modules in core files when running core2md
>
> Core files generated from `wine` contain both ELF and PE modules. Module
> format can be guessed by checking the file contents. If the module
> corresponds to PE-file conditions (has specific fields set up as
> described in https://code.google.com/archive/p/corkami/wikis/PE.wiki)
> we'll create a MDCVInfoPDB70 record in the minidump for it, but if
> the file cannot be opened, is too short or is not a PE file, we'll
> fall back to ELF procedure.
>
> Added /src/client/linux/minidump_writer/pe_file.{cc,h} to
> src_client_linux_libbreakpad_client_a_SOURCES and
> src_client_linux_linux_client_unittest_shlib_SOURCES.
> Makefile.in and aclocal.m4 were generated by running 'aclocal && automake'.
>
> Test: build core2md and use it to convert a core file into dmp, validate
> that the generated dmp file can be opened. Ran './configure & make'.
>
> Change-Id: I225ffeea3f582deed40ecdfe7ab77f5754e90cbe
> Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3629189
> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Change-Id: I7105ed615a338263f112243bd8dc9e86b906fcb1
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3695862
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
Core files generated from `wine` contain both ELF and PE modules. Module
format can be guessed by checking the file contents. If the module
corresponds to PE-file conditions (has specific fields set up as
described in https://code.google.com/archive/p/corkami/wikis/PE.wiki)
we'll create a MDCVInfoPDB70 record in the minidump for it, but if
the file cannot be opened, is too short or is not a PE file, we'll
fall back to ELF procedure.
Added /src/client/linux/minidump_writer/pe_file.{cc,h} to
src_client_linux_libbreakpad_client_a_SOURCES and
src_client_linux_linux_client_unittest_shlib_SOURCES.
Makefile.in and aclocal.m4 were generated by running 'aclocal && automake'.
Test: build core2md and use it to convert a core file into dmp, validate
that the generated dmp file can be opened. Ran './configure & make'.
Change-Id: I225ffeea3f582deed40ecdfe7ab77f5754e90cbe
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3629189
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
To generate the out directory before compiling stackwalk_common.cc.
Makefile.in and aclocal.m4 were generated by running `aclocal &&
automake`.
BUG=chromium:1167503
BUG=b:177451284
TEST=./configure && make
Change-Id: I7a7674aa5f81cf0016eb2f5170ea3676ccfe3bbb
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2659000
Reviewed-by: Mike Frysinger <vapier@chromium.org>
This change updates Makefile.am to include the dwarf2reader lineinfo
unittest to the suite of tests run when make check is invoked. All the
manual changes are limited to the Makefile.am file. The remaining files
contain changes generated by automake.
Change-Id: Ib078391b44235ce430a224713512637ce8e90a36
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2587266
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This struct matches the layout defined by Microsoft and replaces
Breakpad's MDRawContextARM64_Old. This CL updates the processor to
understand either the old or new structs, but clients continue to write
the old structs.
Change-Id: I8dedd9ddb2ec083b802723b9ac87beb18d98edbd
Reviewed-on: https://chromium-review.googlesource.com/1155938
Reviewed-by: Mark Mentovai <mark@chromium.org>
Change a9fca58 made use of the O_CLOEXEC flag, which is not supported on
older Linux kernels. This change makes the use contingent on kernel
support.
Testing: I manually compiled breakpad on CentOS 5.8 running kernel
2.6.18-308.8.2.el5.centos.plusxen.
Bug: 730
Change-Id: I21dff928cfba3c156a56708913f65a0c7b5396a6
Reviewed-on: https://chromium-review.googlesource.com/498528
Reviewed-by: Mike Frysinger <vapier@chromium.org>
This lets us use the flags with clang, and to add more flags easily.
Change-Id: I51bb53ffd5ab6da769cdfb422a2c88442f1ff9ad
Reviewed-on: https://chromium-review.googlesource.com/441864
Reviewed-by: Ivan Penkov <ivanpe@chromium.org>
Rather than manually include m4 files in configure.ac, let aclocal
do its thing and manage aclocal.m4 automatically for us.
Change-Id: I50689ec78a85651949aab104e7f4de46b14bca5a
Reviewed-on: https://chromium-review.googlesource.com/438544
Reviewed-by: Mark Mentovai <mark@chromium.org>
Doing a `make -jN check` from a fresh build breaks (and has probably been
broken for a while). linux_client_unittest_shlib is missing $(TEST_LIBS)
from its _DEPENDENCIES. The automake manual says if _DEPENDENCIES are not
specified they'll be computed from _LDADD, but we are specifying it and just
leaving out $(TEST_LIBS).
R=vapier@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1870733005 .
This adds a minimalistic implementation of getcontext()
for Android/ARM and Android/x86. The provided code is
in assembly and only implements the bare minimum required
by Breakpad to get the current processor state.
Note that:
- The FPU state is not saved to the ucontext_t on ARM.
(that's actually the main difference with a normal
getcontext() implementation).
This is normal. On Linux/ARM, such state must be
obtained with PTRACE_GETVFPREGS instead. This will
be implemented in a future patch.
- On x86, only the 'regular' FPU state is saved, to
mimic the GLibc/i386 implementation. The state of
SSE/SSE2/etc registers is not part of the upstream
getcontext() implementation.
Review URL: https://breakpad.appspot.com/444002
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1024 4c0a9323-5329-0410-9bdc-e9ce6186880e
is no reason not to keep it locally. Implemented a basic disassembler which can be used
to scan bytecode for interesting conditions. This should be pretty easy to add to for
things other than exploitability if there is a desire. This also adds several tests to
the windows exploitability ranking code to take advantage of the disassembler for x86
code.
BUG=None
TEST=DisassemblerX86Test.*
Review URL: http://breakpad.appspot.com/203001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@705 4c0a9323-5329-0410-9bdc-e9ce6186880e
This patch refreshes the build system files to those generated by:
- Libtool 2.2.6
- Automake 1.11
- Autoconf 2.64
a=jimblandy, r=nealsid
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@470 4c0a9323-5329-0410-9bdc-e9ce6186880e
- Introduces a standard API for dealing with modules. MinidumpModule
is now a concrete implementation of this API. Code may interact with
single modules using the CodeModule interface, and collections of
modules using its container, the CodeModules interface.
- CodeModule is used directly by SymbolSupplier implementations and
SourceLineResolver. Reliance on the specific implementation in
MinidumpModule has been eliminated.
- Module lists are now added to ProcessState objects. Module references
in each stack frame are now pointers to objects in these module lists.
- The sample minidump_stackwalk tool prints the module list after printing
all threads' stacks.
http://groups.google.com/group/airbag-dev/browse_frm/thread/a9c0550edde54cf8
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@74 4c0a9323-5329-0410-9bdc-e9ce6186880e
- Eliminate MemAddrMap from source_line_resolver.cc and adapt it to use
RangeMap, also used by minidump.cc.
- RangeMap operates on both a base address and a size, where MemAddrMap
only used a base address, so the dumped symbol file format is modified
to include size information. dump_syms produces these files and
SourceLineResolver consumes them.
- Provide updated test data conforming to the new dumped symbol format.
http://groups.google.com/group/airbag-dev/browse_thread/thread/e9403cf3ad6336a1
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@21 4c0a9323-5329-0410-9bdc-e9ce6186880e
caller-implemented SymbolSupplier object to get a symbol file.
Add a CrashReportProcessor object which provides a simple API for processing
a CrashReport struct, given a SymbolSupplier and a minidump file.
r=mmentovai (#17))
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@18 4c0a9323-5329-0410-9bdc-e9ce6186880e
- Place objects in the appropriate directories, instead of filling up
the root directory.
- Remove namespace macros, which made maintenance troublesome and which
created a dependency on config.h in public headers
- Skip useless Fortran checks at configure time
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@8 4c0a9323-5329-0410-9bdc-e9ce6186880e