OLD | NEW |
1 // Copyright (c) 2015 Google Inc. | 1 // Copyright (c) 2015 Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 17 matching lines...) Expand all Loading... |
28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 | 29 |
30 // ntstatus_reason_win.h: Windows NTSTATUS code to string. | 30 // ntstatus_reason_win.h: Windows NTSTATUS code to string. |
31 // | 31 // |
32 // Provides a means to convert NTSTATUS codes to strings. | 32 // Provides a means to convert NTSTATUS codes to strings. |
33 // | 33 // |
34 // Author: Ben Wagner | 34 // Author: Ben Wagner |
35 | 35 |
36 #include <string> | 36 #include <string> |
37 | 37 |
38 #include "common/stdio.h" | 38 #include "common/stdio_wrapper.h" |
39 #include "google_breakpad/common/breakpad_types.h" | 39 #include "google_breakpad/common/breakpad_types.h" |
40 #include "google_breakpad/common/minidump_exception_win32.h" | 40 #include "google_breakpad/common/minidump_exception_win32.h" |
41 #include "processor/symbolic_constants_win.h" | 41 #include "processor/symbolic_constants_win.h" |
42 | 42 |
43 namespace google_breakpad { | 43 namespace google_breakpad { |
44 | 44 |
45 std::string NTStatusToString(uint32_t ntstatus) { | 45 std::string NTStatusToString(uint32_t ntstatus) { |
46 std::string reason; | 46 std::string reason; |
47 // The content of this switch was created from ntstatus.h in the 8.1 SDK with | 47 // The content of this switch was created from ntstatus.h in the 8.1 SDK with |
48 // | 48 // |
(...skipping 6359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6408 char reason_string[11]; | 6408 char reason_string[11]; |
6409 snprintf(reason_string, sizeof(reason_string), "0x%08x", ntstatus); | 6409 snprintf(reason_string, sizeof(reason_string), "0x%08x", ntstatus); |
6410 reason = reason_string; | 6410 reason = reason_string; |
6411 break; | 6411 break; |
6412 } | 6412 } |
6413 } | 6413 } |
6414 return reason; | 6414 return reason; |
6415 } | 6415 } |
6416 | 6416 |
6417 } // namespace google_breakpad | 6417 } // namespace google_breakpad |
OLD | NEW |