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