Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some input problems #6

Open
kevinboulain opened this issue Nov 22, 2018 · 3 comments
Open

Some input problems #6

kevinboulain opened this issue Nov 22, 2018 · 3 comments

Comments

@kevinboulain
Copy link
Contributor

A bunch of problems I encountered:

  • GDB thinks its input isn't from a terminal and will always confirm when it would have prompted the user otherwise (which may or may not be a good idea, this is a minor issue)
  • can't properly define functions nor use them (their output is probably interpreted?)
  • sometimes (rarely but happens) input get stuck (and pressing C-g will traceback, I got lucky and got this one recorded so sorry for record that could probably been have a bit better)

Here is an asciinema, it probably explains better than I can: https://asciinema.org/a/pqlKW2G8nHxDT2PV0xPewKvNQ

@weirdNox
Copy link
Owner

Hello there! Sorry for the delay, I've been very busy...

I don't think there is much we can do about the first two issues :/ GDB is a bit fragile with this kind of stuff. Every command written by the user is executed under the interpreter that it supposedly uses when running GDB in the terminal, but it seems they behave differently.

We could try running it under the MI interpreter, but nothing guarantees us that it will work. Some tests I made allowed me to define a function and execute it (it still does that [answered Y; input not from terminal]), so it is possible with the MI interpreter. The problem is that I don't know if this will break anything else :P

About that crash, are you able to reproduce it more or less, or is it completely random?

@weirdNox
Copy link
Owner

That said, I must confess that I really hope a good debugger is being developed by someone else... I use this for casual debugging and it helps me a lot in those cases, but if I had to use this daily I don't know if it would be great.

I'm hoping one day I can jump to 4coder or something, so I don't have to use this dynamic module "hack". At the moment I'm just too dependent on Emacs and Org-mode, but maybe the day will come ahah

@kevinboulain
Copy link
Contributor Author

No worries! I was testing out emacs-gdb and reported some issues in case you would be interested (and because emacs-gdb seems to be really great out of the box).

Maybe DAP will help with the brittleness of GDB in the future, as LSP has helped Emacs to get some nice features (I recently encountered https://github.com/yyoncho/dap-mode, but it seems it lacks an UI as nice as the one you made for emacs-gdb :)).

If my memory serves me right, the crash in the asciinema was a bit random.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants