From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23969 invoked by alias); 29 Sep 2009 01:58:43 -0000 Received: (qmail 23950 invoked by uid 22791); 29 Sep 2009 01:58:42 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Sep 2009 01:58:38 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E89C32BAB58; Mon, 28 Sep 2009 21:58:36 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Hnu4GZQ5Y8ZM; Mon, 28 Sep 2009 21:58:36 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id A1AA92BAB57; Mon, 28 Sep 2009 21:58:36 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 9FFBAF593D; Mon, 28 Sep 2009 18:58:30 -0700 (PDT) Date: Tue, 29 Sep 2009 01:58:00 -0000 From: Joel Brobecker To: caz yokoyama Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: symbolic debug of loadable modules with kgdb light Message-ID: <20090929015830.GJ9003@adacore.com> References: <200905152223.58241.pedro@codesourcery.com> <20090515213410.GA10064@caradoc.them.org> <8AA4B846934A4A9081F778449B96F416@xpjpn> <4A0DE914.1050800@vmware.com> <20090923004802.GA20859@adacore.com> <9ECED0F0DCF04CC185B027503876430D@xpjpn> <20090925160627.GB5077@adacore.com> <66E35EA6599040F894D040E4F50389D0@xpjpn> <535d47e30909260627n662135a1hf6d1a0bb33368b3a@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <535d47e30909260627n662135a1hf6d1a0bb33368b3a@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00899.txt.bz2 > > I revised my patch. As I wrote in ChangeLog, I expanded interrupt_sequence > > to arbitrary characters include ^C and BREAK instead of 3 choices. Actually, I'm sorry, but I don't agree with this change. I don't think it's providing much in terms of user experience and your implementation has many downsides: The command hander no longer verifies that the user enters valid values (the user finds this out later when connecting to the target or possibly only when requesting an interrupt; either way, it's too late), you lose tab-completion, and your implementation of send_interrupt_sequence becomes unecessarily complex and inefficient as a result. > -static int remote_break; > +static int remote_break = 0; > + > +static void > +set_remote_break (char *args, int from_tty, struct cmd_list_element *c) > +{ > + if (strcmp (interrupt_sequence, CTRL_C) == 0) > + { > + interrupt_sequence = xmalloc (sizeof(BREAK) + 1); > + strcpy (interrupt_sequence, BREAK); > + remote_break = 1; > + } > + else > + { > + interrupt_sequence = xmalloc (sizeof(CTRL_C) + 1); > + strcpy (interrupt_sequence, CTRL_C); > + remote_break = 0; > + } > +} What we are trying to achieve, here, is make things work for a user that was used to using "set remotebreak" while yet telling him which command should now be used instead. In other words, "set remotebreak on" should act as if the user entered "set remote interrupt-sequence BREAK" and "set remotebreak off" should act as if the user entered "set remote interrupt-sequence control-c". The code itself should *ignore* the boolean that set/show remotebreak use internally, and use the "enum" that "set remote interrupt-sequence" uses instead. Calling deprecate_cmd on the cmd_list_element structs associcated to the set/show remotebreak commands will make sure that the user is informed which commands are replacing these commands, and allows us to remove them eventually, once users have had a chance to transition to the new ones. -- Joel