* [PATCH] fix showing xmon help
@ 2007-07-12 7:59 Ishizaki Kou
2007-07-12 23:53 ` Michael Ellerman
0 siblings, 1 reply; 3+ messages in thread
From: Ishizaki Kou @ 2007-07-12 7:59 UTC (permalink / raw)
To: paulus; +Cc: linuxppc-dev
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>
---
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();
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix showing xmon help
2007-07-12 7:59 [PATCH] fix showing xmon help Ishizaki Kou
@ 2007-07-12 23:53 ` Michael Ellerman
2007-07-13 9:11 ` Ishizaki Kou
0 siblings, 1 reply; 3+ messages in thread
From: Michael Ellerman @ 2007-07-12 23:53 UTC (permalink / raw)
To: Ishizaki Kou; +Cc: linuxppc-dev, paulus
[-- 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 --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] fix showing xmon help
2007-07-12 23:53 ` Michael Ellerman
@ 2007-07-13 9:11 ` Ishizaki Kou
0 siblings, 0 replies; 3+ messages in thread
From: Ishizaki Kou @ 2007-07-13 9:11 UTC (permalink / raw)
To: michael; +Cc: linuxppc-dev, paulus
> 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>
(snip)
> 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.
Thank you for your suggestion.
You're right. I'll send a new patch.
Best regards,
Kou Ishizaki
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-07-13 9:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-12 7:59 [PATCH] fix showing xmon help Ishizaki Kou
2007-07-12 23:53 ` Michael Ellerman
2007-07-13 9:11 ` Ishizaki Kou
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).