From: Michael Ellerman <michael@ellerman.id.au>
To: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH] fix showing xmon help
Date: Fri, 13 Jul 2007 09:53:50 +1000 [thread overview]
Message-ID: <1184284430.25007.5.camel@concordia.ozlabs.ibm.com> (raw)
In-Reply-To: <20070712.165915.-1300535948.kouish@swc.toshiba.co.jp>
[-- Attachment #1: Type: text/plain, Size: 2289 bytes --]
On Thu, 2007-07-12 at 16:59 +0900, Ishizaki Kou wrote:
> In some configuration, xmon help string is larger than xmon output
> buffer. To show whole help string, this patch splits it into 2 parts.
>
> Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Nice catch! I've seen that a few times, but thought it was a flow
control problem on the console.
> Index: linux-powerpc-git/arch/powerpc/xmon/xmon.c
> ===================================================================
> RCS file: /home/public/cvs/linux-powerpc-git/arch/powerpc/xmon/xmon.c,v
> retrieving revision 1.1.1.7
> diff -u -p -r1.1.1.7 xmon.c
> --- linux-powerpc-git/arch/powerpc/xmon/xmon.c 11 Jul 2007 02:15:32 -0000 1.1.1.7
> +++ linux-powerpc-git/arch/powerpc/xmon/xmon.c 11 Jul 2007 10:08:41 -0000
> @@ -182,7 +182,7 @@ extern void xmon_save_regs(struct pt_reg
> || ('A' <= (c) && (c) <= 'Z'))
> #define isspace(c) (c == ' ' || c == '\t' || c == 10 || c == 13 || c == 0)
>
> -static char *help_string = "\
> +static char *help_string1 = "\
> Commands:\n\
> b show breakpoints\n\
> bd set data breakpoint\n\
> @@ -210,7 +210,9 @@ Commands:\n\
> md compare two blocks of memory\n\
> ml locate a block of memory\n\
> mz zero a block of memory\n\
> - mi show information about memory allocation\n\
> + mi show information about memory allocation\n"
> +;
> +static char *help_string2 = "\
> p call a procedure\n\
> r print registers\n\
> s single step\n"
> @@ -833,7 +835,8 @@ cmds(struct pt_regs *excp)
> mdelay(2000);
> return cmd;
> case '?':
> - printf(help_string);
> + printf(help_string1);
> + printf(help_string2);
> break;
> case 'b':
> bpt_cmds();
I'm not sure I like the fix though, it's a bit of a kludge :)
We don't actually need to printf() the help string, so what'd be nicer
is to add an xmon_puts() to arch/powerpc/xmon/nonstdio.c which just
calls xmon_write(s, strlen(s)) and use that for printing the help
string.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2007-07-12 23:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-12 7:59 [PATCH] fix showing xmon help Ishizaki Kou
2007-07-12 23:53 ` Michael Ellerman [this message]
2007-07-13 9:11 ` Ishizaki Kou
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=1184284430.25007.5.camel@concordia.ozlabs.ibm.com \
--to=michael@ellerman.id.au \
--cc=kou.ishizaki@toshiba.co.jp \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).