Tom de Vries
8a7f13063a
[gdb/python] Ensure locale is restored in do_start_initialization
...
I noticed in do_start_initialization:
...
std::string oldloc = setlocale (LC_ALL, NULL);
setlocale (LC_ALL, "");
...
if (count == (size_t) -1)
{
fprintf (stderr, "Could not convert python path to string\n");
return false;
}
setlocale (LC_ALL, oldloc.c_str ());
...
that the old locale is not restored if the "return false" is triggered.
Fix this by using SCOPE_EXIT.
Tested on aarch64-linux.
Approved-By: Tom Tromey <tom@tromey.com >
2024-11-22 17:34:50 +01:00
..
2024-11-11 08:49:13 -05:00
2024-11-01 11:06:47 -06:00
2024-11-14 19:34:43 +00:00
2024-04-25 12:59:02 -04:00
2024-09-23 13:44:59 -06:00
2024-03-26 21:13:22 -04:00
2024-11-20 09:33:17 +00:00
2024-09-24 13:06:32 +02:00
2024-09-24 13:06:32 +02:00
2024-03-26 21:13:22 -04:00
2024-05-17 09:39:41 -06:00
2024-11-14 19:34:43 +00:00
2024-11-01 11:06:47 -06:00
2024-09-23 13:44:59 -06:00
2024-09-23 13:44:59 -06:00
2024-09-23 13:44:59 -06:00
2024-03-26 21:13:22 -04:00
2024-03-26 21:13:22 -04:00
2024-09-24 13:06:32 +02:00
2024-09-24 13:06:32 +02:00
2024-09-30 13:23:35 -06:00
2024-11-11 07:44:27 -07:00
2024-09-24 13:06:32 +02:00
2024-09-24 13:06:32 +02:00
2024-03-26 21:13:22 -04:00
2024-09-24 13:06:32 +02:00
2024-09-23 13:44:59 -06:00
2024-09-24 13:06:32 +02:00
2024-09-24 13:06:32 +02:00
2024-09-23 13:44:59 -06:00
2024-10-18 11:50:27 -06:00
2024-11-14 19:34:44 +00:00
2024-03-26 21:13:22 -04:00
2024-09-24 13:06:32 +02:00
2024-09-24 13:06:32 +02:00
2024-09-23 13:44:59 -06:00
2024-11-10 10:18:23 +00:00
2024-09-24 14:22:28 +02:00
2024-08-14 11:20:56 +02:00
2024-03-26 21:13:22 -04:00
2024-09-24 13:06:32 +02:00
2024-08-14 11:20:56 +02:00
2024-09-23 13:44:59 -06:00
2024-03-26 21:13:22 -04:00
2024-09-24 13:06:32 +02:00
2024-09-24 13:06:32 +02:00
2024-09-23 13:44:59 -06:00
2024-03-26 21:13:22 -04:00
2024-11-01 11:06:47 -06:00
2024-09-24 13:06:32 +02:00
2024-09-30 13:23:35 -06:00
2024-09-24 13:06:32 +02:00
2024-09-25 19:29:57 +02:00
2024-11-14 19:34:43 +00:00
2024-03-26 21:13:22 -04:00
2024-03-26 21:13:22 -04:00
2024-04-02 11:21:39 -06:00
2024-09-24 13:06:32 +02:00
2024-11-22 17:34:50 +01:00