[gdb] Print progress for debuginfod

Prints progress like:

Downloading 4.89 MB separate debug info for /usr/lib64/libgcrypt.so.20.
Downloading 1.10 MB separate debug info for /usr/lib64/liblzma.so.5.
Downloading 1.31 MB separate debug info for /usr/lib64/liblz4.so.1.
Downloading 0.96 MB separate debug info for /usr/lib64/libsmime3.so.
[###                                                                    ]

Tested on x86_64-linux.

ChangeLog:

2020-12-16  Martin Liska  <mliska@suse.cz>
	    Tom de Vries  <tdevries@suse.de>

	* gdb/debuginfod-support.c (struct user_data): Remove has_printed
	field.  Add meter field.
	(progressfn): Print progress using meter.
This commit is contained in:
Martin Liska
2020-12-16 18:18:40 +01:00
committed by Tom de Vries
parent 2f2287318b
commit d6f26c9d28
3 changed files with 28 additions and 10 deletions

View File

@@ -272,7 +272,7 @@ cli_ui_out::do_redirect (ui_file *outstream)
- printed for tty, SHOULD_PRINT == false:
<>
- printed for not-a-tty:
<NAME...done.
<NAME...
>
*/
@@ -348,7 +348,7 @@ cli_ui_out::do_progress_end ()
if (!stream->isatty ())
{
fprintf_unfiltered (stream, "done.\n");
fprintf_unfiltered (stream, "\n");
gdb_flush (stream);
}
else if (meter.printing == PROGRESS)