List Info

Thread: Problem with "shell" command in crash




Problem with "shell" command in crash
country flaguser name
United States
2007-02-17 06:16:38
I am having some problems using the "shell"
command in crash.

	If i execute "shell" command in crash, the input
commands in the shell
prompt do not get displayed properly. Here is what i see.

crash> shell
mac:/home/raghu # 2a  a.out  addr.c  crash-4.0-3.19        
dump 
		^^^^^entered ls
mac:/home/raghu # llm22:/home/raghu # llm22:/home/raghu #
llm22:/home/raghu #
		^^^^^enter	^^^^^enter

However, the problem disappears if i execute 'stty echo' or
'reset' in the shell prompt.

mac:/home/raghu # llm22:/home/raghu #  
		^^^^entered stty echo
mac:/home/raghu # echo This is fine     
This is fine
mac:/home/raghu #

Also, the problem is not found if i run crash in gdb.
The problem is reproducible in the latest version of crash,
crash-4.0-3.19.

Anyone knows how to fix this?

Thanks,
Raghuveer R


--
Crash-utility mailing list
Crash-utilityredhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Re: Problem with "shell" command in crash
country flaguser name
United States
2007-02-19 08:15:21
Raghuveer R wrote:

> I am having some problems using the "shell"
command in crash.
>
>         If i execute "shell" command in
crash, the input commands in the shell
> prompt do not get displayed properly. Here is what i
see.
>
> crash> shell
> mac:/home/raghu # 2a  a.out  addr.c  crash-4.0-3.19    
    dump
>                 ^^^^^entered ls
> mac:/home/raghu # llm22:/home/raghu # llm22:/home/raghu
# llm22:/home/raghu #
>                 ^^^^^enter      ^^^^^enter
>
> However, the problem disappears if i execute 'stty
echo' or 'reset' in the shell prompt.
>
> mac:/home/raghu # llm22:/home/raghu #
>                 ^^^^entered stty echo
> mac:/home/raghu # echo This is fine
> This is fine
> mac:/home/raghu #
>
> Also, the problem is not found if i run crash in gdb.
> The problem is reproducible in the latest version of
crash, crash-4.0-3.19.
>
> Anyone knows how to fix this?

Don't use it.

It's actually the built-in gdb's "shell" command
that's the problem.
The command should be put on the "prohibited_list"
array in
the top-level gdb_interface.c file.

To get into a shell, just enter "|" or
"!" on the crash command
line.  I should better explain that capability better in
the
"help output" page.

I'll do both in the next release.

Thanks,
  Dave


--
Crash-utility mailing list
Crash-utilityredhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Re: Problem with "shell" command in crash
country flaguser name
United States
2007-02-19 08:23:07
Dave Anderson wrote:

> Raghuveer R wrote:
>
> > I am having some problems using the
"shell" command in crash.
> >
> >         If i execute "shell" command in
crash, the input commands in the shell
> > prompt do not get displayed properly. Here is what
i see.
> >
> > crash> shell
> > mac:/home/raghu # 2a  a.out  addr.c 
crash-4.0-3.19         dump
> >                 ^^^^^entered ls
> > mac:/home/raghu # llm22:/home/raghu #
llm22:/home/raghu # llm22:/home/raghu #
> >                 ^^^^^enter      ^^^^^enter
> >
> > However, the problem disappears if i execute 'stty
echo' or 'reset' in the shell prompt.
> >
> > mac:/home/raghu # llm22:/home/raghu #
> >                 ^^^^entered stty echo
> > mac:/home/raghu # echo This is fine
> > This is fine
> > mac:/home/raghu #
> >
> > Also, the problem is not found if i run crash in
gdb.
> > The problem is reproducible in the latest version
of crash, crash-4.0-3.19.
> >
> > Anyone knows how to fix this?
>
> Don't use it.
>
> It's actually the built-in gdb's "shell"
command that's the problem.
> The command should be put on the
"prohibited_list" array in
> the top-level gdb_interface.c file.
>
> To get into a shell, just enter "|" or
"!" on the crash command
> line.  I should better explain that capability better
in the
> "help output" page.
>
> I'll do both in the next release.
>
> Thanks,
>   Dave

BTW, the "|" or "!" command construct is
just an extenstion
of the command-output-to-a-pipe capability.  It's just that
(1) there's no crash command to the left of the pipe, and
(2) since there's also no command to the right of the pipe,
it just goes into a shell.  So you can also run any shell
command like:

  crash> !do-this-command

or

  crash> |do-this-command

The exclamation point is the same as the pipe character.
It's there as a holdover from the old System V crash,
as well as being a common shell escape character.

Dave


--
Crash-utility mailing list
Crash-utilityredhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )