From 602971b3863dcecf2daa5ffc0853a75a3131446c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 1 Sep 2023 11:01:33 -0600 Subject: Introduce throw_winerror_with_name This introduces throw_winerror_with_name, a Windows analog of perror_with_name, and changes various places in gdb to call it. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30770 --- gdbsupport/errors.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gdbsupport/errors.h') diff --git a/gdbsupport/errors.h b/gdbsupport/errors.h index 20f9152..a94debf 100644 --- a/gdbsupport/errors.h +++ b/gdbsupport/errors.h @@ -120,6 +120,13 @@ extern void flush_streams (); extern const char *strwinerror (ULONGEST error); +/* Like perror_with_name, but for Windows errors. Throw an exception + including STRING and the system text for the given error + number. */ + +extern void throw_winerror_with_name (const char *string, ULONGEST err) + ATTRIBUTE_NORETURN; + #endif /* USE_WIN32API */ #endif /* COMMON_ERRORS_H */ -- cgit v1.1