signal_command: Leftover cleanup chain regression [Re: [PATCH 4/4] PR gdb/17471: Repeating a background command makes it foreground]

Message ID 20150804082849.GA24816@host1.jankratochvil.net
State New, archived
Headers

Commit Message

Jan Kratochvil Aug. 4, 2015, 8:28 a.m. UTC
  Hi,

mostly harmless but not correct.


Jan
gdb/ChangeLog
2015-08-04  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* infcmd.c (signal_command): Call do_cleanups for args_chain.
  

Comments

Pedro Alves Aug. 4, 2015, 8:37 a.m. UTC | #1
On 08/04/2015 09:28 AM, Jan Kratochvil wrote:
> Hi,
> 
> mostly harmless but not correct.

OK.

Thanks,
Pedro Alves
  
Jan Kratochvil Aug. 4, 2015, 11:48 a.m. UTC | #2
On Tue, 04 Aug 2015 10:37:10 +0200, Pedro Alves wrote:
> OK.

master
	c6343a91d94e9516afe56dfe85e435922bd9ea04
7.10
	9b811c1bcd75c471d799a05122e3ae140b2a34ae


Jan
  
Jan Kratochvil Aug. 25, 2015, 3:47 p.m. UTC | #3
On Tue, 04 Aug 2015 13:48:59 +0200, Jan Kratochvil wrote:
> On Tue, 04 Aug 2015 10:37:10 +0200, Pedro Alves wrote:
> > OK.
> 
> master
> 	c6343a91d94e9516afe56dfe85e435922bd9ea04
> 7.10
> 	9b811c1bcd75c471d799a05122e3ae140b2a34ae

That 7.10 was not pushed, so it is pushed to 7.10 now as:
	3ba0344e56ef739808615be5ca319f82c2a83855


Jan
  

Patch

diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 4948d27..e4b2045 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1264,6 +1264,8 @@  signal_command (char *signum_exp, int from_tty)
 	oursig = gdb_signal_from_command (num);
     }
 
+  do_cleanups (args_chain);
+
   /* Look for threads other than the current that this command ends up
      resuming too (due to schedlock off), and warn if they'll get a
      signal delivered.  "signal 0" is used to suppress a previous