From: Richard Earnshaw <rearnsha@arm.com>
To: Vadim Lebedev <vadim@7chips.com>
Cc: gdb-patches@sources.redhat.com, Richard.Earnshaw@arm.com
Subject: Re: patch to add semihosting control for remote arm targets
Date: Thu, 13 Mar 2003 11:40:00 -0000 [thread overview]
Message-ID: <200303131139.h2DBd3t23717@pc960.cambridge.arm.com> (raw)
In-Reply-To: Your message of "Wed, 12 Mar 2003 13:07:42 +0100." <200303121207.h2CC7gJ09861@goldunix1001.propagation.net>
>
> When debugging remote arm targets using devices such as JEENI from epitools
> the semihosting function slows execution by the target of SWI instruction
> nearly 100-fold. This is especially annoying when you try to debug linux
> kernel on the target as it uses SWI to implement system calls.
> The attached patch adds a set rdisemihosting {on/off/1/0/true/false} command
> to the gdb which allows one to enable or disable semihosting suppport.
> the command shoud be executed before target rdi .... command
> The patch is against gdb 5.3 but i think will apply to older versions cleanly
> too.
>
>
The idea is a good one, but there are several problems with this patch.
1) The formatting does not conform to GNU coding standards. (use
gdb_indent.sh)
2) I think we should have a "set rdi" command for the two rdi features (in
the same way that we have set debug). Heartbeat and semihosting should be
sub-variables of that command.
3) Ideally, it should be possible to turn off semihosting after we have
connected to the target.
Do you have a copyright assignment on file?
Other comments are interspersed below.
> Wed Mar 12 13:00:00 2003 Vadim Lebedev (vadim at 7chips.com)
>
> * remote-rdi.c add set rdisemihosting command
>
Formatting. Please follow ChangeLog conventions.
> +/* target has semihosting enabled */
Formatting. Capital letter at the start. Full stop and two spaces at the
end before the close-comment.
> if (rslt != RDIError_NoError)
> - {
> - printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
> - }
> + {
> + printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
> + }
Indentation -- why have you changed it?
> +
> + arg1 = rdi_semihosting ? 1 : 0;
> +
> + rslt = angel_RDI_info(RDISemiHosting_SetState, &arg1, &arg2);
> + if (rslt != RDIError_NoError)
> + {
> + printf_filtered ("RDI_info: %s\n", rdi_error_message (rslt));
> + }
Indentation.
>
> +
> arg1 = (unsigned long) "";
> rslt = angel_RDI_info (RDISet_Cmdline, &arg1, &arg2);
> if (rslt != RDIError_NoError)
> @@ -1051,14 +1064,24 @@ _initialize_remote_rdi (void)
> &setlist, &showlist);
>
> add_setshow_boolean_cmd
> - ("rdiheartbeat", no_class, &rdi_heartbeat,
> - "Set enable for ADP heartbeat packets.\n"
> - "I don't know why you would want this. If you enable them,\n"
> - "it will confuse ARM and EPI JTAG interface boxes as well\n"
> - "as the Angel Monitor.\n",
> - "Show enable for ADP heartbeat packets.\n",
> - NULL, NULL,
> - &setlist, &showlist);
> + ("rdiheartbeat", no_class, &rdi_heartbeat,
> + "Set enable for ADP heartbeat packets.\n"
> + "I don't know why you would want this. If you enable them,\n"
> + "it will confuse ARM and EPI JTAG interface boxes as well\n"
> + "as the Angel Monitor.\n",
> + "Show enable for ADP heartbeat packets.\n",
> + NULL, NULL,
> + &setlist, &showlist);
Indentation.
> +
> + add_setshow_boolean_cmd
> + ("rdisemihosting", no_class, &rdi_semihosting,
> + "Set semihosting support.\n"
> + "A true value activates semihosting false value deactivates it.\n",
Unnecessary repetition. "A true value activates semihosting.\n" is
sufficient.
> + "Show enable for semihosting.\n",
> + NULL, NULL,
> + &setlist, &showlist);
> +
> +
Indetation -- delete unnecessary blank lines.
R.
prev parent reply other threads:[~2003-03-13 11:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-12 12:07 Vadim Lebedev
2003-03-13 11:40 ` Richard Earnshaw [this message]
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=200303131139.h2DBd3t23717@pc960.cambridge.arm.com \
--to=rearnsha@arm.com \
--cc=Richard.Earnshaw@arm.com \
--cc=gdb-patches@sources.redhat.com \
--cc=vadim@7chips.com \
/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