| // Copyright 2025 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.driver.crash; |
| |
| using fuchsia.component; |
| using fuchsia.url; |
| using zx; |
| |
| /// Information stored when a thread crashes. |
| type DriverCrashInfo = table { |
| 1: url string:fuchsia.url.MAX_URL_LENGTH; |
| 2: node_moniker string:fuchsia.component.MAX_MONIKER_LENGTH; |
| }; |
| |
| /// When a thread from a component using the driver runner crashes, the thread |
| /// koid along with other information is stored. This protocol can be used to |
| /// retrieve that stored information. |
| @discoverable(server="platform") |
| closed protocol CrashIntrospect { |
| /// Given a process and thread koid, returns the information that was stored when the |
| /// driver host observed a crash from that thread. |
| /// |
| /// The information for a crash is deleted when it is accessed. |
| /// |
| /// If there is no information available on the given thread koid, |
| /// `zx::Status::NOT_FOUND` is returned. |
| strict FindDriverCrash(resource struct { |
| process_koid zx.Koid; |
| thread_koid zx.Koid; |
| }) -> (struct { |
| info DriverCrashInfo; |
| }) error zx.Status; |
| }; |