diff options
author | Tom Tromey <tromey@adacore.com> | 2023-09-01 11:01:33 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-11-27 12:55:14 -0700 |
commit | 602971b3863dcecf2daa5ffc0853a75a3131446c (patch) | |
tree | e6965aecdcad64bf33e19a5927618a06be17d2a1 /gdb/nat | |
parent | 4dda9cc4b03788d1cf0416b39a3ab3780caf27fd (diff) | |
download | gdb-602971b3863dcecf2daa5ffc0853a75a3131446c.zip gdb-602971b3863dcecf2daa5ffc0853a75a3131446c.tar.gz gdb-602971b3863dcecf2daa5ffc0853a75a3131446c.tar.bz2 |
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
Diffstat (limited to 'gdb/nat')
-rw-r--r-- | gdb/nat/windows-nat.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c index bf4c438..7951bc3 100644 --- a/gdb/nat/windows-nat.c +++ b/gdb/nat/windows-nat.c @@ -206,8 +206,7 @@ windows_process_info::get_exec_module_filename (char *exe_name_ret, if (len == 0) { unsigned err = (unsigned) GetLastError (); - error (_("Error getting executable filename (error %u): %s"), - err, strwinerror (err)); + throw_winerror_with_name (_("Error getting executable filename"), err); } if (cygwin_conv_path (CCP_WIN_W_TO_POSIX, pathbuf, exe_name_ret, exe_name_max_len) < 0) @@ -219,8 +218,7 @@ windows_process_info::get_exec_module_filename (char *exe_name_ret, if (len == 0) { unsigned err = (unsigned) GetLastError (); - error (_("Error getting executable filename (error %u): %s"), - err, strwinerror (err)); + throw_winerror_with_name (_("Error getting executable filename"), err); } #endif |