Scott Graham
8272a4cefe
Use LockFile/UnlockFile for Settings to port to Windows
...
Adds LoggingOpenFileForReadAndWrite, LoggingTruncateFile, and UUID::GenerateFromSystem
in support.
R=mark@chromium.org , rsesek@chromium.org
BUG=crashpad:13
Review URL: https://codereview.chromium.org/999953002
2015-04-20 14:21:48 -07:00
Mark Mentovai
e7b80a52f5
win: Add UUID::InitializeFromSystemUUID().
...
The new call is also used in
CrashReportDatabaseWin::PrepareNewCrashReport(). Previously, that method
used the UUID::InitializeFromBytes() constructor. That actually caused
various fields of the UUID to be byte-swapped so that the ::UUID and
crashpad::UUID would be different UUIDs. Although a UUID is mostly
random, the version field in data_3 is used as a namespace and should be
4 for random UUIDs, and this was not the case under swapping.
TEST=crashpad_util_test UUID.FromSystem
BUG=crashpad:1
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/1004913004
2015-03-13 13:53:38 -04:00
Scott Graham
cb8c01f410
win: Some %zu to PRIuS
...
%zu aborts in system printf functions on Windows, so use PRIuS instead.
R=mark@chromium.org , rsesek@chromium.org
BUG=crashpad:1
Review URL: https://codereview.chromium.org/849193002
2015-01-15 10:00:43 -08:00
Robert Sesek
c75dc46b17
Add UUID::InitializeFromString().
...
R=mark@chromium.org
TEST=util_test --gtest_filter=UUID.FromString
Review URL: https://codereview.chromium.org/820783004
2015-01-02 18:46:10 -05:00
Mark Mentovai
6d1af6922f
Don’t use using directives (“using namespace”) in tests.
...
The contents of tests are moved into the namespace
crashpad::test::(anonymous namespace).
https://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Namespaces
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/635883002
2014-10-07 17:28:50 -04:00
Mark Mentovai
4f74716f6d
Add MachOImageReader and its test, which also tests
...
MachOImageSegmentReader.
TEST=util_test MachOImageReader.*
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/535343004
2014-09-04 11:45:40 -04:00
Mark Mentovai
4ae57690fa
Put back the standard-layout checks lost in 5bbb7e8abbe0.
...
TEST=util_test UUID.UUID
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/440603002
2014-08-03 18:50:09 -04:00
Mark Mentovai
5bbb7e8abb
Fix the UUID structure to have distinct fields, as expected by
...
Breakpad’s minidump reader.
TEST=util_test UUID.UUID
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/436933002
2014-08-01 16:10:58 -04:00
Mark Mentovai
4d6b867a1f
Add UUID, c16lcpy (strlcpy for char16*), and their tests to util.
...
These are dependencies of the upcoming MinidumpStringWriter.
R=rsesek@chromium.org
Review URL: https://codereview.chromium.org/430003003
2014-08-01 14:39:55 -04:00