| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
| 2 // | 2 // |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
| 5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
| 6 // | 6 // |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 // | 8 // |
| 9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 kOptionLastChar = 255, | 69 kOptionLastChar = 255, |
| 70 | 70 |
| 71 // Standard options. | 71 // Standard options. |
| 72 kOptionHelp = -2, | 72 kOptionHelp = -2, |
| 73 kOptionVersion = -3, | 73 kOptionVersion = -3, |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 Options options = {}; | 76 Options options = {}; |
| 77 options.suspend = true; | 77 options.suspend = true; |
| 78 | 78 |
| 79 const struct option long_options[] = { | 79 const option long_options[] = { |
| 80 {"no-suspend", no_argument, nullptr, kOptionNoSuspend}, | 80 {"no-suspend", no_argument, nullptr, kOptionNoSuspend}, |
| 81 {"output", required_argument, nullptr, kOptionOutput}, | 81 {"output", required_argument, nullptr, kOptionOutput}, |
| 82 {"help", no_argument, nullptr, kOptionHelp}, | 82 {"help", no_argument, nullptr, kOptionHelp}, |
| 83 {"version", no_argument, nullptr, kOptionVersion}, | 83 {"version", no_argument, nullptr, kOptionVersion}, |
| 84 {nullptr, 0, nullptr, 0}, | 84 {nullptr, 0, nullptr, 0}, |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 int opt; | 87 int opt; |
| 88 while ((opt = getopt_long(argc, argv, "o:r", long_options, nullptr)) != -1) { | 88 while ((opt = getopt_long(argc, argv, "o:r", long_options, nullptr)) != -1) { |
| 89 switch (opt) { | 89 switch (opt) { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 169 |
| 170 return EXIT_SUCCESS; | 170 return EXIT_SUCCESS; |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace | 173 } // namespace |
| 174 } // namespace crashpad | 174 } // namespace crashpad |
| 175 | 175 |
| 176 int main(int argc, char* argv[]) { | 176 int main(int argc, char* argv[]) { |
| 177 return crashpad::GenerateDumpMain(argc, argv); | 177 return crashpad::GenerateDumpMain(argc, argv); |
| 178 } | 178 } |
| OLD | NEW |