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

statemanager.startup_with_shell_off should be optional #234

Open
svofski opened this issue Sep 28, 2018 · 1 comment
Open

statemanager.startup_with_shell_off should be optional #234

svofski opened this issue Sep 28, 2018 · 1 comment

Comments

@svofski
Copy link

svofski commented Sep 28, 2018

I'm trying to use gdbgui with gdb-z80 backend on macOS. As such, gdb-z80 has nothing to do with Darwin. However, when statemanager detects that it runs on Darwin, it inserts extra arguments to gdb command line which happen to be unsupported by my specific version of gdb. This results in a very puzzling error message:

The underlying gdb process has been killed. This tab will no longer function as expected.

It would be easier to diagnose such problems if the actual error messages from gdb were displayed instead of this enigmatic line.

I hacked this bit off for my purposes, but it would be nice if command-line options passed to gdb at start were explicit and configurable. I imagine any cross-platform debugging setup would run into a similar issue sooner or later. At least it should be possible to do so when custom gdb is specified with -g option.

Platform details:

  • OS: Darwin
  • gdbgui version 0.13.0.0
  • gdb version (gdb -v): GNU gdb (GDB) 7.2.50.20101026-cvs
    This GDB was configured as "--host=x86_64-apple-darwin17.5.0 --target=z80"
  • browser [e.g. chrome, safari]: chrome
@cs01
Copy link
Owner

cs01 commented Sep 30, 2018

Sorry it was giving you a hard time with that.

It would be easier to diagnose such problems if the actual error messages from gdb were displayed instead of this enigmatic line.

gdbgui displays all output it receives from gdb. What is the output that gdb is printing but is not being displayed in gdbgui?

Agreed that the error message is not very descriptive, but unfortunately that is the extent of the information gdbgui has about the state of gdb: it tries to read from it, but it's not there. It would display the same message if gdb segfaulted and exited, or if another program sent SIGTERM to it, etc.

it would be nice if command-line options passed to gdb at start were explicit and configurable

gdbgui already lets you pass any arguments you want directly to gdb with the --gdb-args flag. However, it unconditionally adds the argument --init-eval-command=set startup-with-shell off when invoking gdb if running on a mac (as you noted).

I think the best course of action is to require the user to run gdb like this if running on a mac

gdbgui --gdb-args=''--init-eval-command=set startup-with-shell off"

While more verbose, it is explicit and configurable. I think I'll print a warning to stderr to users who would have previously had that command auto-inserted.

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