16 Commits

Author SHA1 Message Date
Mark Mentovai
20e5aba1af URL cleanups: switch to HTTPS, fix dead ones, use canonical ones
Change-Id: I4b247d7fae1a212350f8ffcf2bf5ba1fa730f5c1
Reviewed-on: https://chromium-review.googlesource.com/780339
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2017-11-20 22:23:39 +00:00
Mark Mentovai
c49da9caef win: Expect uneven symbolic link support
As mentioned at
https://chromium-review.googlesource.com/c/chromium/src/+/735820#message-e8b199498d8b850f2612c46648069d819dd47517,
the typical Windows behavior for symbolic links requires administrative
privileges.

Symbolic links are available to non-administrators in Windows 10.0.15063
and later (1703, Creators Update), provided that developer mode has been
enabled and SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE is passed to
CreateSymbolicLink(). See
https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/.

This adds SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE to uses of
CreateSymbolicLink(), and creates test::CanCreateSymbolicLinks() to
determine whether symbolic link creation is possible. Tests that
exercise symbolic links are adapted to gate all symbolic link operations
on this test.

Test: crashpad_util_test DirectoryReader.*:Filesystem.*
Change-Id: I8250cadd974ffcc7abe32701a0d5bc487061baf0
Bug: crashpad:
Reviewed-on: https://chromium-review.googlesource.com/739472
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
2017-10-26 23:01:14 +00:00
Mark Mentovai
a327c86a52 C++14 is required, don’t pretend to support pre-C++11 or pre-MSVS 2015
Change-Id: Ide835421599480acc63e8e88ce2217433c0d376e
Reviewed-on: https://chromium-review.googlesource.com/719036
Reviewed-by: Leonard Mosescu <mosescu@chromium.org>
2017-10-13 15:49:59 +00:00
Mark Mentovai
4c4e67952c win: 10.0.16299.0 SDK compatibility
This corresponds to Windows 10 version 1709 (Fall Creators Update,
“Redstone 3”).

While compiling util/win/nt_internals.cc:

…\crashpad\crashpad\util\win\nt_internals.cc(22): error C2371: 'CLIENT_ID': redefinition; different basic types
c:\program files (x86)\windows kits\10\include\10.0.16299.0\um\winternl.h(83): note: see declaration of 'CLIENT_ID'

The CLIENT_ID structure, which should have been part of the SDK to begin
with, has been added. Provide a compatible definition in <winternl.h>.

Bug: chromium:773476
Change-Id: Iafc77f8cffd06d1194fc909bad587f1ffd1687a2
Reviewed-on: https://chromium-review.googlesource.com/711415
Reviewed-by: Leonard Mosescu <mosescu@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2017-10-11 22:39:00 +00:00
Pierre-Antoine Manzagol
7d56fd2386 Rely on winsock2.h for timeval
Bug: crashpad:
Change-Id: Iee8ebfaf7c4a1e8e87fcfcbc6ee8a4529a2f7c52
Reviewed-on: https://chromium-review.googlesource.com/493893
Reviewed-by: Scott Graham <scottmg@chromium.org>
Commit-Queue: Pierre-Antoine Manzagol <manzagop@chromium.org>
2017-05-03 17:53:45 +00:00
Mark Mentovai
1382618fbe Provide backup #defines for things introduced in SDK 10.0.10240.0
This follows discussion on
https://chromium-review.googlesource.com/409098/.

Change-Id: Ic82b64a14bb89cfdf1c88b1482cc2c2c9c0c2589
Reviewed-on: https://chromium-review.googlesource.com/409604
Reviewed-by: Scott Graham <scottmg@chromium.org>
2016-11-10 01:50:17 +00:00
Mark Mentovai
dd4859965f Update compat version of winnt.h to 10.0.14393.0 SDK (Windows 10 1607)
This defines PROCESSOR_ARCHITECTURE_ARM64 and
PROCESSOR_ARCHITECTURE_ARM32_ON_WIN64, usable in
MINIDUMP_SYSTEM_INFO::ProcessorArchitecture.

This also defines four new PF_* flags usable in
CPU_INFORMATION::OtherCpuInfo::ProcessorFeatures.

Definitions are provided in compat/non_win, and #ifdef-guarded
definitions in compat/win for compatibility with Windows SDKs older than
Chrome’s minimum requirement.

PROCESSOR_ARCHITECTURE_ARM64 means the same thing that Breakpad used the
value 0x8003 for. At this point, Crashpad aims to use the
officially-defined constant. In the minidump_extensions.h
MinidumpCPUArchitecture enum, 0x8003 remains present and documented as
deprecated to discourage reuse of that constant for another purpose.

BUG=

Change-Id: Ic4b5fb9de31c5f00f3698f112633ece2a036b889
Reviewed-on: https://chromium-review.googlesource.com/409098
Reviewed-by: Scott Graham <scottmg@chromium.org>
2016-11-09 17:43:27 +00:00
Scott Graham
3d598cdbcd Change file op |ssize_t|s to FileOperationResult
R=mark@chromium.org

Review URL: https://codereview.chromium.org/1416493006 .
2015-10-22 16:14:18 -07:00
Scott Graham
6082aed2f2 win: Get Crashpad compiling under VS2015
R=mark@chromium.org
BUG=crashpad:1, chromium:440500

Review URL: https://codereview.chromium.org/1357833002 .
2015-09-21 10:51:15 -07:00
Mark Mentovai
0366307615 win: Provide strcasecmp() in <strings.h> in compat.
base::strcasecmp() has been deprecated since upstream 8a800901b78a2.

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

Review URL: https://codereview.chromium.org/1275633002 .
2015-08-05 16:34:50 -04:00
Scott Graham
ff52791faf Get generate_dump compiling on Windows
Sort of works in that the process is opened, modules retrieved, etc.
but eventually CHECKs due to missing functionality in snapshot.

Follows https://codereview.chromium.org/1119783005/.

R=mark@chromium.org
BUG=crashpad:1

Review URL: https://codereview.chromium.org/1120383003
2015-05-06 11:09:31 -07:00
Scott Graham
17b770ece4 win: get tools/crashpad_database_util mostly working
- Add public domain getopt implementation to third_party.
- Add timegm to compat/win.
- Add stub of strptime to compat/win.

Requires https://codereview.chromium.org/1119173003/ and
https://codereview.chromium.org/1117013006/.

Rather than working in wchar_t everywhere on Windows, convert
UTF16 command line arguments in wmain to UTF8, work primarily
in UTF8, and convert back when necessary to UTF16 for base::FilePath.
This avoids the need to genericize over all the standard C string
functions, getopt, etc. while still handling non-ASCII properly.

R=mark@chromium.org
BUG=crashpad:1

Review URL: https://codereview.chromium.org/1119783005
2015-05-06 10:28:07 -07:00
Scott Graham
07fcf63c21 win: fixes for Windows x64
Mostly size_t <-> unsigned int warnings, but I also had a mistake in
PROCESS_BASIC_INFORMATION, the pids are 32-on-32 and 64-on-64.

The Windows build is still x86 until https://codereview.chromium.org/981333002/.
I don't think I'll bother maintaining the x86 build for now, though we will probably
need it for x86 OSs in the future. It should be straightforward to revive it once we
need it, and have bots to support it.

R=mark@chromium.org
BUG=crashpad:1

Review URL: https://codereview.chromium.org/983103004
2015-03-06 16:05:34 -08:00
Scott Graham
bcc580e561 win: Add implementation of system_snapshot for Windows
ProcessReaderWin only a stub for now.

R=mark@chromium.org
BUG=crashpad:1

Review URL: https://codereview.chromium.org/936333004
2015-03-02 13:06:34 -08:00
Scott Graham
429a3368d4 win: Work towards getting 'minidump' to compile
- dbghelp.h requires windows.h to be included before it (ick!).
  Add a stub one for non_win to make this work.
- convert __attribute__ -> macro that can work work with MSVC;
- a handful of narrowing casts.

R=mark@chromium.org
BUG=crashpad:1

Review URL: https://codereview.chromium.org/883773005
2015-02-04 17:30:03 -08:00
Scott Graham
012ddc9752 win: Add compat header for sys/types.h
To add definition of ssize_t. Uses #include <../include/...> to
emulate #include_next, similar to the mac headers.

BUG=crashpad:1
R=mark@chromium.org

Review URL: https://codereview.chromium.org/793013002
2014-12-10 11:39:50 -08:00