Simon Marchi
7a283d9cf5
gdbsupport, gdb: add read_text_file_to_string, use it in linux_common_core_of_thread
...
I would like to add more code to nat/linux-osdata.c that reads an entire
file from /proc or /sys and processes it as a string afterwards. I
would like to avoid duplicating the somewhat error-prone code that reads
an entire file to a buffer. I think we should have a utility function
that does that.
Add read_file_to_string to gdbsupport/filestuff.{c,h}, and make
linux_common_core_of_thread use it. I want to make the new function
return an std::string, and because strtok doesn't play well with
std::string (it requires a `char *`, std::string::c_str returns a `const
char *`), change linux_common_core_of_thread to use std::string methods
instead.
Approved-By: Tom Tromey <tom@tromey.com>
Change-Id: I1793fda72a82969c28b944a84acb953f74c9230a
2022-11-08 16:50:52 -05:00
..
2022-01-01 19:13:23 +04:00
2020-03-05 15:59:22 +01:00
2022-01-13 10:25:45 +00:00
2020-10-31 08:30:57 -04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-06-30 13:31:06 +02:00
2022-01-01 19:13:23 +04:00
2022-10-19 15:32:36 +01:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-18 10:14:42 -07:00
2022-01-01 19:13:23 +04:00
2021-07-26 12:20:33 +01:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-08-05 08:09:57 +02:00
2022-10-19 15:32:36 +01:00
2022-04-12 09:31:16 -06:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-10-19 15:32:36 +01:00
2022-01-01 19:13:23 +04:00
2022-08-26 10:29:51 -04:00
2022-01-13 10:25:45 +00:00
2022-06-27 13:55:36 +01:00
2022-10-09 21:27:37 -04:00
2022-09-08 11:03:12 +00:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-10-19 15:32:36 +01:00
2022-10-19 15:32:36 +01:00
2022-10-19 15:32:36 +01:00
2022-08-18 11:56:38 +02:00
2022-03-03 13:06:50 -08:00
2022-03-03 11:21:36 -08:00
2022-09-21 14:11:03 -04:00
2022-09-21 14:11:03 -04:00
2022-11-08 16:50:52 -05:00
2022-11-08 16:50:52 -05:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-08-30 14:43:26 -04:00
2022-10-19 15:32:36 +01:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-18 10:14:42 -07:00
2022-01-18 10:14:42 -07:00
2022-08-26 11:47:23 -04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-20 22:58:21 -05:00
2022-01-18 10:14:43 -07:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-04-18 15:48:03 -04:00
2022-04-18 15:48:03 -04:00
2022-02-25 17:50:22 +00:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-07-21 15:19:43 +01:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-18 10:14:43 -07:00
2022-01-18 10:14:43 -07:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-04-13 10:24:38 +01:00
2022-08-30 14:43:26 -04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-02-22 11:22:14 -08:00
2022-09-08 11:03:12 +00:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-05-10 13:40:57 +01:00
2022-01-01 19:13:23 +04:00
2022-07-25 16:04:05 +01:00
2022-08-30 14:43:26 -04:00
2022-09-21 11:36:01 -04:00
2022-09-21 11:36:01 -04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-10-19 15:32:36 +01:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-05-26 07:35:30 -06:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-04 10:28:19 +00:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-04-19 09:12:42 +01:00
2022-04-19 09:12:42 +01:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-05-10 08:15:40 -06:00
2022-05-10 08:15:40 -06:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-13 10:25:45 +00:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00
2022-01-01 19:13:23 +04:00