Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Issue 1119783005: win: get tools/crashpad_database_util mostly working (Closed)

Created:
5 years, 7 months ago by scottmg
Modified:
5 years, 7 months ago
Reviewers:
Mark Mentovai
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/crashpad/crashpad@master
Target Ref:
refs/heads/master
Project:
crashpad
Visibility:
Public.

Description

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 Committed: https://chromium.googlesource.com/crashpad/crashpad/+/17b770ece4d489a07e97ed1f526436955ee35bcc

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : missing header #

Total comments: 10

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : support utf16, use filepath #

Patch Set 7 : remove #

Patch Set 8 : mac #

Patch Set 9 : roll #

Total comments: 20

Patch Set 10 : fixes #

Patch Set 11 : . #

Patch Set 12 : sort #

Total comments: 8

Patch Set 13 : fixes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+674 lines, -92 lines) Patch
M DEPS View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M client/crash_report_database_win.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M compat/compat.gyp View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
A + compat/win/getopt.h View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -7 lines 0 comments Download
A + compat/win/time.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +17 lines, -7 lines 0 comments Download
A + compat/win/time.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +19 lines, -9 lines 0 comments Download
A third_party/getopt/LICENSE View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/getopt/README.crashpad View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +12 lines, -0 lines 0 comments Download
A third_party/getopt/getopt.h View 1 2 3 1 chunk +55 lines, -0 lines 0 comments Download
A third_party/getopt/getopt.c View 1 2 3 1 chunk +410 lines, -0 lines 0 comments Download
A + third_party/getopt/getopt.gyp View 1 2 3 4 5 6 7 8 9 1 chunk +19 lines, -7 lines 0 comments Download
M tools/crashpad_database_util.cc View 1 2 3 4 5 6 7 8 9 15 chunks +47 lines, -17 lines 0 comments Download
M tools/tool_support.h View 1 2 3 4 5 6 7 2 chunks +15 lines, -2 lines 0 comments Download
M tools/tool_support.cc View 1 2 3 4 5 6 7 1 chunk +28 lines, -9 lines 0 comments Download
M tools/tools.gyp View 1 2 3 3 chunks +33 lines, -33 lines 0 comments Download

Messages

Total messages: 13 (1 generated)
scottmg
5 years, 7 months ago (2015-05-01 23:43:05 UTC) #1
Mark Mentovai
Congratulations on getting our first tool working on Windows! https://codereview.chromium.org/1119783005/diff/40001/compat/win/getopt.h File compat/win/getopt.h (right): https://codereview.chromium.org/1119783005/diff/40001/compat/win/getopt.h#newcode1 compat/win/getopt.h:1: ...
5 years, 7 months ago (2015-05-04 21:04:30 UTC) #2
scottmg
https://codereview.chromium.org/1119783005/diff/40001/compat/win/getopt.h File compat/win/getopt.h (right): https://codereview.chromium.org/1119783005/diff/40001/compat/win/getopt.h#newcode1 compat/win/getopt.h:1: #ifndef GETOPT_H On 2015/05/04 21:04:29, Mark Mentovai wrote: > ...
5 years, 7 months ago (2015-05-04 23:26:36 UTC) #4
scottmg
I may have changed my mind on wchar_t/char for main which ripples everywhere. So please ...
5 years, 7 months ago (2015-05-05 00:30:21 UTC) #5
Mark Mentovai
No need to apologize. I’d rather get everything right. I’ll put all of your tools ...
5 years, 7 months ago (2015-05-05 01:24:50 UTC) #6
scottmg
I think this should work OK. Please take another look now.
5 years, 7 months ago (2015-05-05 16:37:56 UTC) #7
Mark Mentovai
This wound up being less work than I expected. Nice! Someday we might want to ...
5 years, 7 months ago (2015-05-05 22:19:49 UTC) #8
Mark Mentovai
https://codereview.chromium.org/1119783005/diff/180001/tools/crashpad_database_util.cc File tools/crashpad_database_util.cc (right): https://codereview.chromium.org/1119783005/diff/180001/tools/crashpad_database_util.cc#newcode42 tools/crashpad_database_util.cc:42: #include <libgen.h> Remove this. It was only here for ...
5 years, 7 months ago (2015-05-05 22:25:27 UTC) #9
scottmg
https://codereview.chromium.org/1119783005/diff/180001/compat/compat.gyp File compat/compat.gyp (right): https://codereview.chromium.org/1119783005/diff/180001/compat/compat.gyp#newcode39 compat/compat.gyp:39: 'win/getopt.h', On 2015/05/05 22:19:49, Mark Mentovai wrote: > getopt ...
5 years, 7 months ago (2015-05-05 23:03:38 UTC) #10
Mark Mentovai
LGTM https://codereview.chromium.org/1119783005/diff/240001/compat/win/time.h File compat/win/time.h (right): https://codereview.chromium.org/1119783005/diff/240001/compat/win/time.h#newcode20 compat/win/time.h:20: struct tm* gmtime_r(const time_t* timep, struct tm* result); ...
5 years, 7 months ago (2015-05-06 04:31:46 UTC) #11
scottmg
Committed patchset #13 (id:260001) manually as 17b770ece4d489a07e97ed1f526436955ee35bcc (presubmit successful).
5 years, 7 months ago (2015-05-06 17:28:12 UTC) #12
scottmg
5 years, 7 months ago (2015-05-06 17:28:14 UTC) #13
Message was sent while issue was closed.
https://codereview.chromium.org/1119783005/diff/240001/compat/win/time.h
File compat/win/time.h (right):

https://codereview.chromium.org/1119783005/diff/240001/compat/win/time.h#newc...
compat/win/time.h:20: struct tm* gmtime_r(const time_t* timep, struct tm*
result);
On 2015/05/06 04:31:46, Mark Mentovai wrote:
> Wrap the declarations in extern "C", and the definitions in time.cc too.

Done.

https://codereview.chromium.org/1119783005/diff/240001/compat/win/time.h#newc...
compat/win/time.h:24: const char *strptime(const char* buf, const char* format,
struct tm* tm);
On 2015/05/06 04:31:46, Mark Mentovai wrote:
> Move the * onto char.

Done.

https://codereview.chromium.org/1119783005/diff/240001/third_party/getopt/REA...
File third_party/getopt/README.crashpad (right):

https://codereview.chromium.org/1119783005/diff/240001/third_party/getopt/REA...
third_party/getopt/README.crashpad:13: 
On 2015/05/06 04:31:46, Mark Mentovai wrote:
> Remove the blank line at EOF.

Done.

https://codereview.chromium.org/1119783005/diff/240001/tools/tool_support.h
File tools/tool_support.h (right):

https://codereview.chromium.org/1119783005/diff/240001/tools/tool_support.h#n...
tools/tool_support.h:46: //! \copydoc Version
On 2015/05/06 04:31:46, Mark Mentovai wrote:
> Not sure if this is going to do what’s intended, because this method is also
> named Version().

I built doxygen at trunk just now, and it seems to be smart enough to figure
that out.

Powered by Google App Engine
This is Rietveld 408576698