How to use the "command" command when using gdb in emacs? - emacs

I use gdb in emacs.
The "command" command is used to set commands to be executed when a breakpoint is hit.
It should return when I type "end" as below, but nothing happened.
But when I use gdb in shell, it is ok.
So who can tell me why?

Related

Neovim: how to send keys to terminal emulator

When I open up a nvim terminal emulator and enter the following command, trying to execute command 'python':
:normal! ipython
It turned out the register content is pasted onto the screen, as if 'p' is pressed under normal mode, even if 'i' has been pressed in prior to (supposedly) enter terminal-insert mode.
This does not help either:
:execute "normal! ipython\<CR>"
Where have I gone wrong, and how could I do it correctly?
Alternatively I used termopen() to execute a command in the terminal on start, something like
:call termopen('python')
But still, no idea about how to do so with normal!.
:normal! ipython
doesn't mean "run the program". It means "switch to Normal mode and run !" which is a filter command; then run i that is switch to Insert mode and insert "python".
To run a command from the vim command line use
:!ipython

Emacs gdb, "-i=mi" option seems to disallow additional arguments

I tried M-x gdb RET gdb -i=mi --args myexec -d 2 -tl 10 -ba 100
Error: you did not specify -i=mi on GDB's command line!
Is there something wrong with my syntax here? I usually run gdb exactly like that but without the -i=mi flag. I can ofc just run it without args and specify them at the gdb prompt, but that seems annoying to do since I want to be able to launch the debugger with a key binding...

How to set shell-mode prompt in emacs?

I have set in my ~/.emacs.d/init_bash.sh:
export PS1='\h:\w$ '
without it, my prompt is
bash-3.2$
but now it is
bash-3.2$ computername:~/path/to/directory$
How do I make it just be
computername:~/path/to/directory$
?
It seems to just do this on the first line in the Emacs shell, and "bash-3.2$" goes away after I hit return once. To really get rid of "bash-3.2$", set PS1 in your ~/.bashrc instead.

Erlang dialyzer from werl.exe?

I tried running dialyzer --help from the werl command line and it hung. Am I missing something? Is it only available for the dos shell (I'm on XP SP3)?
It is possible to run dialyzer from within the Erlang shell (and thus, I assume, werl) but the way you attempted to invoke it is only appropriate for the DOS shell.
See Using the Dialyzer from Erlang near the bottom of http://www.erlang.org/doc/man/dialyzer.html
1> dialyzer:module_info().
[{exports,[{plain_cl,0},
{run,1},
{gui,0},
{gui,1},
{plt_info,1},
{format_warning,1},
{format_warning,2},
{module_info,0},
{module_info,1}]},
{imports,[]},
{attributes,[{vsn,[255802808152277240424696594996505155803]}]},
{compile,[{options,[{outdir,"/private/tmp/homebrew-erlang-R15B01-pQbu/erlang-otp-079e06a/lib/dialyzer/src/../ebin"},
warnings_as_errors,warn_missing_spec,warn_untyped_record,
warn_unused_import,warn_exported_vars,debug_info]},
{version,"4.8"},
{time,{2012,4,13,13,14,35}},
{source,"/private/tmp/homebrew-erlang-R15B01-pQbu/erlang-otp-079e06a/lib/dialyzer/src/dialyzer.erl"}]}]
2> dialyzer:gui().
ok

Ho to abort a command in Ubuntu(16.04), where CTRL+C I am already using for copying?

I am currently using CTRL+C and CTRL+V for copy and paste respectively in Ubuntu (16.04). So in this case, how can I terminate /abort a command in Terminal.
NOTE: The control+C does not work for me neither quit() or Exit().
Please advise.
The default terminal (gnome-terminal) uses Ctrl+Shift+c and Ctrl+Shift+v for exactly this reason. If you are in a bash prompt (unclear from context here), you can quit by writing exit.