diff mbox

Printing of large objects not interruptable

Message ID 20141208223958.4de115f7@arch
State New
Headers show

Commit Message

Alastair Robertson Dec. 8, 2014, 10:39 p.m. UTC
This patch makes the counting of repeated characters interruptable,
relating to bug 17613
https://sourceware.org/bugzilla/show_bug.cgi?id=17613

This is my first patch, so sorry if I forgot to include something or
didn't format it correctly.

2014-12-07  Alastair Robertson  <alastair@ajor.co.uk>

	PR gdb/17613
	* valprint.c (count_next_character): Call QUIT

Comments

Joel Brobecker Dec. 20, 2014, 5:18 p.m. UTC | #1
> This patch makes the counting of repeated characters interruptable,
> relating to bug 17613
> https://sourceware.org/bugzilla/show_bug.cgi?id=17613
> 
> This is my first patch, so sorry if I forgot to include something or
> didn't format it correctly.
> 
> 2014-12-07  Alastair Robertson  <alastair@ajor.co.uk>
> 
> 	PR gdb/17613
> 	* valprint.c (count_next_character): Call QUIT

This patch looks good to me.

If you could add a short description of what this PR is about in
the commit's revision log, so as to avoid the need to go through
a PR, which is not always a straightforward (or even concise read),
that would be very good.

In terms of items for submission, we have a checklist:
https://sourceware.org/gdb/wiki/ContributionChecklist

There is a lot of important information there, if you haven't read
it yet.

As far as this patch is concerned, the only bits that are missing
are a period at the end of your sentence in your ChangeLog entry;
and an indication that you ran the testsuite before and after
your patch, showing no regression (this one is unlikely to produce
any, but better safe than sorry) - that indication should be in
the commit's revision log, including the platform that was used
to perform the testing.

Please re-send an updated patch, and I will push it for you.

Thank you!

> diff --git a/gdb/valprint.c b/gdb/valprint.c
> index b995304..8d743b1 100644
> --- a/gdb/valprint.c
> +++ b/gdb/valprint.c
> @@ -2151,6 +2151,8 @@ count_next_character (struct wchar_iterator *iter,
>  
>        while (1)
>  	{
> +	  QUIT;
> +
>  	  /* Get the next character.  */
>  	  d.num_chars
>  	    = wchar_iterate (iter, &d.result, &chars, &d.buf, &d.buflen);
diff mbox

Patch

diff --git a/gdb/valprint.c b/gdb/valprint.c
index b995304..8d743b1 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -2151,6 +2151,8 @@  count_next_character (struct wchar_iterator *iter,
 
       while (1)
 	{
+	  QUIT;
+
 	  /* Get the next character.  */
 	  d.num_chars
 	    = wchar_iterate (iter, &d.result, &chars, &d.buf, &d.buflen);