From: Caz Yokoyama <cazyokoyama@gmail.com>
To: "'Eli Zaretskii'" <eliz@gnu.org>
Cc: <gdb-patches@sourceware.org>
Subject: RE: symbolic debug of loadable modules with kgdb light
Date: Fri, 07 Aug 2009 20:42:00 -0000 [thread overview]
Message-ID: <A72F945BB99C43FFAD5BCB87F172374F@xpjpn> (raw)
In-Reply-To: <83vdl0m2wt.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 1081 bytes --]
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 <cazyokoyama@gmail.com>
> Cc: "'Daniel Jacobowitz'" <drow@false.org>, "'Pedro Alves'"
<pedro@codesourcery.com>, <gdb-patches@sourceware.org>,
<tromey@redhat.com>, "'Joel Brobecker'" <brobecker@adacore.com>
> 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.
[-- Attachment #2: remotebreak.patch --]
[-- Type: application/octet-stream, Size: 4436 bytes --]
Index: gdb/remote.c
===================================================================
RCS file: /cvs/src/src/gdb/remote.c,v
retrieving revision 1.366
diff -c -r1.366 remote.c
*** gdb/remote.c 31 Jul 2009 22:15:15 -0000 1.366
--- gdb/remote.c 7 Aug 2009 18:47:19 -0000
***************
*** 546,558 ****
this can go away. */
static int wait_forever_enabled_p = 1;
! /* This variable chooses whether to send a ^C or a break when the user
! requests program interruption. Although ^C is usually what remote
! systems expect, and that is the default here, sometimes a break is
! preferable instead. */
!
! static int remote_break;
/* Descriptor for I/O to remote machine. Initialize it to NULL so that
remote_open knows that we don't have a file open when the program
--- 546,575 ----
this can go away. */
static int wait_forever_enabled_p = 1;
+ /* This variable chooses whether to send a ^C, a break or a break g
+ when the user requests program interruption.
+ Although ^C is usually what remote systems expect,
+ and that is the default here, sometimes a break is
+ preferable instead. For interrupting Linux kernel, a break and g is
+ expected which is Magic SysReq g. */
+ static const char bs_Crtl_C[] = "Ctrl-C";
+ static const char bs_BREAK[] = "BREAK";
+ static const char bs_BREAK_g[] = "BREAK-g";
+ static const char *remotebreak_enum[] = {
+ bs_Crtl_C,
+ bs_BREAK,
+ bs_BREAK_g,
+ NULL
+ };
+ static const char *remotebreak_string = bs_Crtl_C;
! static void show_remotebreak (struct ui_file *file, int from_tty,
! struct cmd_list_element *c,
! const char *value)
! {
! fprintf_unfiltered (file, "remote systems expect %s to be interrupted\n",
! remotebreak_string);
! }
/* Descriptor for I/O to remote machine. Initialize it to NULL so that
remote_open knows that we don't have a file open when the program
***************
*** 2601,2606 ****
--- 2618,2629 ----
/* Ack any packet which the remote side has already sent. */
serial_write (remote_desc, "+", 1);
+ /* send break sequence on debugging Linux kernel */
+ if (remotebreak_string == bs_BREAK_g) {
+ serial_send_break (remote_desc);
+ serial_write (remote_desc, "g", 1);
+ }
+
/* The first packet we send to the target is the optional "supported
packets" request. If the target can answer this, it will tell us
which later probes to skip. */
***************
*** 4011,4022 ****
if (rs->cached_wait_status)
return;
! /* Send a break or a ^C, depending on user preference. */
!
! if (remote_break)
serial_send_break (remote_desc);
! else
! serial_write (remote_desc, "\003", 1);
}
/* This is the generic stop called via the target vector. When a target
--- 4034,4048 ----
if (rs->cached_wait_status)
return;
! /* Send ^C, a break or a break g, depending on user preference. */
! if (remotebreak_string == bs_Crtl_C) {
! serial_write (remote_desc, "\003", 1);
! } else if (remotebreak_string == bs_BREAK) {
! serial_send_break (remote_desc);
! } else if (remotebreak_string == bs_BREAK_g) {
serial_send_break (remote_desc);
! serial_write (remote_desc, "g", 1);
! }
}
/* This is the generic stop called via the target vector. When a target
***************
*** 9051,9062 ****
terminating `#' character and checksum."),
&maintenancelist);
! add_setshow_boolean_cmd ("remotebreak", no_class, &remote_break, _("\
! Set whether to send break if interrupted."), _("\
! Show whether to send break if interrupted."), _("\
! If set, a break, instead of a cntrl-c, is sent to the remote target."),
! NULL, NULL, /* FIXME: i18n: Whether to send break if interrupted is %s. */
! &setlist, &showlist);
/* Install commands for configuring memory read/write packets. */
--- 9077,9088 ----
terminating `#' character and checksum."),
&maintenancelist);
! 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);
/* Install commands for configuring memory read/write packets. */
next prev parent reply other threads:[~2009-08-07 18:52 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-09 15:51 Caz Yokoyama
2009-04-24 15:33 ` Tom Tromey
2009-04-24 16:49 ` Caz Yokoyama
2009-04-26 0:39 ` Caz Yokoyama
2009-05-15 21:14 ` Caz Yokoyama
2009-05-15 21:23 ` Pedro Alves
2009-05-15 21:34 ` Daniel Jacobowitz
2009-05-15 21:41 ` Caz Yokoyama
2009-05-15 22:13 ` Michael Snyder
2009-05-15 22:25 ` Caz Yokoyama
2009-08-07 7:17 ` Caz Yokoyama
2009-08-07 9:22 ` Eli Zaretskii
2009-08-07 20:42 ` Caz Yokoyama [this message]
2009-09-23 0:48 ` Joel Brobecker
2009-09-23 1:39 ` Daniel Jacobowitz
2009-09-23 4:16 ` Caz Yokoyama
2009-09-23 11:36 ` Caz Yokoyama
2009-09-24 16:40 ` Caz Yokoyama
2009-09-24 22:42 ` Caz Yokoyama
2009-09-25 16:06 ` Joel Brobecker
2009-09-26 3:43 ` Caz Yokoyama
[not found] ` <535d47e30909260627n662135a1hf6d1a0bb33368b3a@mail.gmail.com>
2009-09-29 1:58 ` Joel Brobecker
2009-09-29 3:23 ` Caz Yokoyama
2009-09-29 4:22 ` Joel Brobecker
2009-09-29 4:58 ` Caz Yokoyama
2009-09-29 5:19 ` Joel Brobecker
2009-09-29 16:12 ` Caz Yokoyama
2009-09-29 16:39 ` Joel Brobecker
2009-09-30 4:45 ` Caz Yokoyama
2009-09-30 17:28 ` Joel Brobecker
2009-09-30 19:16 ` Eli Zaretskii
2009-09-30 20:12 ` Joel Brobecker
2009-10-01 3:48 ` Caz Yokoyama
2009-10-01 4:08 ` Eli Zaretskii
2009-10-01 4:51 ` Caz Yokoyama
2009-10-01 20:04 ` Eli Zaretskii
2009-10-01 16:33 ` Joel Brobecker
2009-10-01 17:18 ` Caz Yokoyama
2009-10-01 19:37 ` Joel Brobecker
2009-10-01 19:53 ` Caz Yokoyama
2009-10-01 20:25 ` Eli Zaretskii
2009-10-01 20:19 ` Eli Zaretskii
2009-10-01 20:29 ` Caz Yokoyama
2009-10-01 20:46 ` Joel Brobecker
2009-10-01 21:10 ` Daniel Jacobowitz
2009-10-01 21:58 ` Caz Yokoyama
2009-10-01 22:13 ` Pedro Alves
2009-10-01 23:04 ` Caz Yokoyama
2009-10-01 23:32 ` Joel Brobecker
2009-10-02 1:18 ` Caz Yokoyama
2009-10-02 22:14 ` Joel Brobecker
2009-10-02 8:55 ` Eli Zaretskii
2009-10-28 15:05 ` Joel Brobecker
2009-10-01 20:13 ` Caz Yokoyama
2009-05-15 21:34 ` Caz Yokoyama
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A72F945BB99C43FFAD5BCB87F172374F@xpjpn \
--to=cazyokoyama@gmail.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox