From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24717 invoked by alias); 7 Aug 2009 18:52:20 -0000 Received: (qmail 24705 invoked by uid 22791); 7 Aug 2009 18:52:19 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,MIME_QP_LONG_LINE,SPF_PASS X-Spam-Check-By: sourceware.org Received: from rv-out-0708.google.com (HELO rv-out-0708.google.com) (209.85.198.251) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 07 Aug 2009 18:52:12 +0000 Received: by rv-out-0708.google.com with SMTP id b17so473564rvf.48 for ; Fri, 07 Aug 2009 11:52:09 -0700 (PDT) Received: by 10.141.35.5 with SMTP id n5mr549446rvj.133.1249671129607; Fri, 07 Aug 2009 11:52:09 -0700 (PDT) Received: from xpjpn (pool-71-111-147-240.ptldor.dsl-w.verizon.net [71.111.147.240]) by mx.google.com with ESMTPS id g22sm5886645rvb.42.2009.08.07.11.52.05 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 07 Aug 2009 11:52:07 -0700 (PDT) From: Caz Yokoyama To: "'Eli Zaretskii'" Cc: References: <409D09C1E1964C5EAFF5EFBAD6E936ED@xpjpn> <200905152223.58241.pedro@codesourcery.com> <20090515213410.GA10064@caradoc.them.org> <8AA4B846934A4A9081F778449B96F416@xpjpn> <4A0DE914.1050800@vmware.com> <83vdl0m2wt.fsf@gnu.org> Subject: RE: symbolic debug of loadable modules with kgdb light Date: Fri, 07 Aug 2009 20:42:00 -0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_01DA_01CA1755.2410A4D0" In-Reply-To: <83vdl0m2wt.fsf@gnu.org> X-IsSubscribed: yes 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-08/txt/msg00116.txt.bz2 This is a multi-part message in MIME format. ------=_NextPart_000_01DA_01CA1755.2410A4D0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Content-length: 1081 Minor changes. Make global variables to static. Add a space between function name and left parenthesis. -caz -----Original Message----- From: Eli Zaretskii [mailto:eliz@gnu.org] Sent: Friday, August 07, 2009 1:42 AM To: Caz Yokoyama Cc: msnyder@vmware.com; drow@false.org; pedro@codesourcery.com; gdb-patches@sourceware.org; tromey@redhat.com; brobecker@adacore.com Subject: Re: symbolic debug of loadable modules with kgdb light > From: Caz Yokoyama > Cc: "'Daniel Jacobowitz'" , "'Pedro Alves'" , , , "'Joel Brobecker'" > Date: Thu, 6 Aug 2009 21:03:16 -0700 > > ! add_setshow_enum_cmd ("remotebreak", class_support, > ! remotebreak_enum, &remotebreak_string, _("\ > ! Set remote break sequence."), _("\ > ! Show remote break sequence."), NULL, > ! NULL, show_remotebreak, > ! &setlist, &showlist); Thanks. If this patch is approved, please also provide a suitable change to the GDB manual, where it describes this command. ------=_NextPart_000_01DA_01CA1755.2410A4D0 Content-Type: application/octet-stream; name="remotebreak.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="remotebreak.patch" Content-length: 5069 Index: gdb/remote.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvs/src/src/gdb/remote.c,v=0A= retrieving revision 1.366=0A= diff -c -r1.366 remote.c=0A= *** gdb/remote.c 31 Jul 2009 22:15:15 -0000 1.366=0A= --- gdb/remote.c 7 Aug 2009 18:47:19 -0000=0A= ***************=0A= *** 546,558 ****=0A= this can go away. */=0A= static int wait_forever_enabled_p =3D 1;=0A= =20=20=0A= =20=20=0A= ! /* This variable chooses whether to send a ^C or a break when the user=0A= ! requests program interruption. Although ^C is usually what remote=0A= ! systems expect, and that is the default here, sometimes a break is=0A= ! preferable instead. */=0A= !=20=0A= ! static int remote_break;=0A= =20=20=0A= /* Descriptor for I/O to remote machine. Initialize it to NULL so that= =0A= remote_open knows that we don't have a file open when the program=0A= --- 546,575 ----=0A= this can go away. */=0A= static int wait_forever_enabled_p =3D 1;=0A= =20=20=0A= + /* This variable chooses whether to send a ^C, a break or a break g=0A= + when the user requests program interruption.=0A= + Although ^C is usually what remote systems expect,=0A= + and that is the default here, sometimes a break is=0A= + preferable instead. For interrupting Linux kernel, a break and g is=0A= + expected which is Magic SysReq g. */=0A= + static const char bs_Crtl_C[] =3D "Ctrl-C";=0A= + static const char bs_BREAK[] =3D "BREAK";=0A= + static const char bs_BREAK_g[] =3D "BREAK-g";=0A= + static const char *remotebreak_enum[] =3D {=0A= + bs_Crtl_C,=0A= + bs_BREAK,=0A= + bs_BREAK_g,=0A= + NULL=0A= + };=0A= + static const char *remotebreak_string =3D bs_Crtl_C;=0A= =20=20=0A= ! static void show_remotebreak (struct ui_file *file, int from_tty,=0A= ! struct cmd_list_element *c,=0A= ! const char *value)=0A= ! {=0A= ! fprintf_unfiltered (file, "remote systems expect %s to be interrupted\n= ",=0A= ! remotebreak_string);=0A= ! }=0A= =20=20=0A= /* Descriptor for I/O to remote machine. Initialize it to NULL so that= =0A= remote_open knows that we don't have a file open when the program=0A= ***************=0A= *** 2601,2606 ****=0A= --- 2618,2629 ----=0A= /* Ack any packet which the remote side has already sent. */=0A= serial_write (remote_desc, "+", 1);=0A= =20=20=0A= + /* send break sequence on debugging Linux kernel */=0A= + if (remotebreak_string =3D=3D bs_BREAK_g) {=0A= + serial_send_break (remote_desc);=0A= + serial_write (remote_desc, "g", 1);=0A= + }=0A= +=20=0A= /* The first packet we send to the target is the optional "supported=0A= packets" request. If the target can answer this, it will tell us=0A= which later probes to skip. */=0A= ***************=0A= *** 4011,4022 ****=0A= if (rs->cached_wait_status)=0A= return;=0A= =20=20=0A= ! /* Send a break or a ^C, depending on user preference. */=0A= !=20=0A= ! if (remote_break)=0A= serial_send_break (remote_desc);=0A= ! else=0A= ! serial_write (remote_desc, "\003", 1);=0A= }=0A= =20=20=0A= /* This is the generic stop called via the target vector. When a target= =0A= --- 4034,4048 ----=0A= if (rs->cached_wait_status)=0A= return;=0A= =20=20=0A= ! /* Send ^C, a break or a break g, depending on user preference. */=0A= ! if (remotebreak_string =3D=3D bs_Crtl_C) {=0A= ! serial_write (remote_desc, "\003", 1);=0A= ! } else if (remotebreak_string =3D=3D bs_BREAK) {=0A= ! serial_send_break (remote_desc);=0A= ! } else if (remotebreak_string =3D=3D bs_BREAK_g) {=0A= serial_send_break (remote_desc);=0A= ! serial_write (remote_desc, "g", 1);=0A= ! }=0A= }=0A= =20=20=0A= /* This is the generic stop called via the target vector. When a target= =0A= ***************=0A= *** 9051,9062 ****=0A= terminating `#' character and checksum."),=0A= &maintenancelist);=0A= =20=20=0A= ! add_setshow_boolean_cmd ("remotebreak", no_class, &remote_break, _("\= =0A= ! Set whether to send break if interrupted."), _("\=0A= ! Show whether to send break if interrupted."), _("\=0A= ! If set, a break, instead of a cntrl-c, is sent to the remote target."),= =0A= ! NULL, NULL, /* FIXME: i18n: Whether to send break if interrupted is= %s. */=0A= ! &setlist, &showlist);=0A= =20=20=0A= /* Install commands for configuring memory read/write packets. */=0A= =20=20=0A= --- 9077,9088 ----=0A= terminating `#' character and checksum."),=0A= &maintenancelist);=0A= =20=20=0A= ! add_setshow_enum_cmd ("remotebreak", class_support,=0A= ! remotebreak_enum, &remotebreak_string, _("\=0A= ! Set remote break sequence."), _("\=0A= ! Show remote break sequence."), NULL,=0A= ! NULL, show_remotebreak,=0A= ! &setlist, &showlist);=0A= =20=20=0A= /* Install commands for configuring memory read/write packets. */=0A= =20=20=0A= ------=_NextPart_000_01DA_01CA1755.2410A4D0--