Closed andreiltd closed 2 years ago
I am also facing this issue, any resolution?
@andreiltd were you able to resolve this?
Unfortunately not. I switched to realgud.
@andreiltd I have just had a look at your stack trace and remembered purpose-mode
having sometimes problems with modes manipulating buffers. Would you mind checking whether the same issue appears when purpose is deactivated?
@smile13241324 I tried doing that still got the same error at my end
Tried that out today, compiled below file with g++ -Wall main.cpp
and did run gud-gdb
using gdb --fullname ./a.out
and gdb was correctly started on develop.
// my first program in C++
#include <iostream>
int main ()
{
std::cout << "Hello World!" << std::endl;
}
My system config is:
((helm :variables helm-enable-auto-resize t)
nim ocaml scheme
(auto-completion :variables auto-completion-return-key-behavior 'complete auto-completion-tab-key-behavior 'cycle auto-completion-complete-with-key-sequence nil auto-completion-complete-with-key-sequence-delay 0.0 auto-completion-idle-delay nil auto-completion-private-snippets-directory nil auto-completion-enable-snippets-in-popup nil auto-completion-enable-help-tooltip 'manual auto-completion-enable-sort-by-usage t)
better-defaults
(clojure :variables clojure-enable-fancify-symbols t)
gpu graphviz
(plantuml :variables plantuml-jar-path "~/.plantuml/plantUml.jar" org-plantuml-jar-path "~/.plantuml/plantUml.jar")
salt ibuffer emacs-lisp pdf cscope gtags
(org :variables org-want-todo-bindings t org-enable-github-support t org-enable-bootstrap-support t org-enable-reveal-js-support t org-enable-hugo-support t)
(shell :variables shell-enable-smart-eshell t shell-default-shell 'ansi-term shell-default-height 30 shell-default-position 'bottom shell-default-full-span nil shell-default-term-shell "/usr/bin/fish")
syntax-checking version-control semantic templates epub themes-megapack
(c-c++ :variables c-c++-default-mode-for-headers 'c++-mode c-c++-enable-clang-support t c-c++-enable-clang-format-on-save t)
(cmake :variables cmake-enable-cmake-ide-support t)
git github sml pass common-lisp
(python :variables python-backend 'lsp python-test-runner 'pytest python-enable-yapf-format-on-save t python-sort-imports-on-save t)
windows-scripts agda jr shell-scripts prodigy emoji
(markdown :variables markdown-live-preview-engine 'vmd)
bibtex json debug
(latex :variables latex-enable-auto-fill t latex-enable-magic nil latex-enable-folding t)
lua html
(javascript :variables javascript-disable-tern-port-files nil)
react yaml web-beautify nginx docker csv search-engine
(restclient :variables restclient-use-org t)
restructuredtext selectric octave purescript speed-reading systemd imenu-list
(java :variables java-backend 'meghanada)
groovy
(go :variables go-use-gometalinter t gofmt-command "goimports" go-tab-width 4 go-use-gocheck-for-testing t go-use-test-args "-race -timeout 10s" godoc-at-point-function 'godoc-gogetdoc)
coq django
(elm :variables elm-sort-imports-on-save t elm-format-on-save t)
idris
(haskell :variables haskell-enable-hindent-style "fundamental" haskell-completion-backend 'dante haskell-enable-hindent t)
pandoc sphinx lsp parinfer asciidoc neotree ansible puppet rebox rust xkcd typography vimscript
(terraform :variables terraform-auto-format-on-save t)
(ruby :variables ruby-enable-enh-ruby-mode t ruby-version-manager 'rvm)
ruby-on-rails asm
(sql :variables sql-capitalize-keywords t)
perl6 autohotkey
(elixir :variables flycheck-elixir-credo-strict t)
faust vagrant erlang
(dash :variables helm-dash-docset-newpath "~/.local/share/Zeal/Zeal/docsets")
games php nginx racket
(colors :variables colors-colorize-identifiers 'all)
d
(typescript :variables typescript-fmt-tool 'typescript-formatter typescript-fmt-on-save t))
@larebsyed could you please update your spacemacs version on develop, update all your packages and try this out again. If this does not help please deactivate your user config and see whether the error still appears. If this also doesn't help please provide more information on how to reproduce your error.
@larebsyed @andreiltd ups, just had another look at your layers config and it looks like you have forgotten to add c++ layer which is configuring all C, C++ related modes.
Layers: (helm emacs-lisp neotree)
Please add the following to your layers list and retry:
(c-c++ :variables
c-c++-default-mode-for-headers 'c++-mode
c-c++-enable-clang-support t
c-c++-enable-clang-format-on-save t
c-c++-enable-auto-newline t)
@smile13241324 I have tried develop again just now. It is still entering the same error. I used fresh install of spacemcs.
Here is what I did:
mv .emacs.d .emacs.d.bak
mv .spacemacs .spacemacs.bak
mv .spacemacs.env .spacemacs.env.bak
git clone -b develop https://github.com/syl20bnr/spacemacs ~/.emacs.d
After starting spacemacs I add c/c++ layer as described in your previous post to .spacemacs
file and reload the config with SPC f e R
.
Then running gud-gdb produces:
Lisp error: (wrong-type-argument listp display-buffer-in-previous-window)
Also disabling purpose-mode
doesn't help. I'm using an edge version of emacs 27.0.50 can this cause issues?
Thanks for looking into this.
Possibly, I once experienced a lot of issues with company when I was moving from 25 to 26 emacs. Would you mind trying a 26 version? Also do you use a special executable for running gdb, just want to make sure that this is not caused by any special executable.
Can you also tell which version of gdb you are using? I have used 8.1-1.
@andreiltd I have analysed your stacktrace, the problem comes from display-buffer-in-previous-window
having the wrong type. When I am looking for this variable in my elpa
directory by a simple helm search I cannot find it. Can it be that this is an interface change in emacs 27?
Can you please check the variable display-buffer-in-previous-window
in emacs 27 and post whether it is defined and where. Please also retry with emacs 26 and post the results.
@smile13241324 I have tried emacs 26 and gdb starts with no issues:
GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2018-07-05
In emacs 27 display-buffer-in-previous-window
is a function described as follow:
display-buffer-in-previous-window is a compiled Lisp function in ‘window.el’.
(display-buffer-in-previous-window BUFFER ALIST)
Display BUFFER in a window previously showing it.
If ALIST has a non-nil ‘inhibit-same-window’ entry, the selected
window is not eligible for reuse.
If ALIST contains a ‘reusable-frames’ entry, its value determines
which frames to search for a reusable window:
nil -- the selected frame (actually the last non-minibuffer frame)
A frame -- just that frame
‘visible’ -- all visible frames
0 -- all frames on the current terminal
t -- all frames.
If ALIST contains no ‘reusable-frames’ entry, search just the
selected frame if ‘display-buffer-reuse-frames’ and
‘pop-up-frames’ are both nil; search all frames on the current
terminal if either of those variables is non-nil.
If ALIST has a ‘previous-window’ entry, the window specified by
that entry will override any other window found by the methods
above, even if that window never showed BUFFER before.
But the same description can be found in emacs 26:
display-buffer-in-previous-window is a compiled Lisp function in ‘window.el’.
(display-buffer-in-previous-window BUFFER ALIST)
Display BUFFER in a window previously showing it.
If ALIST has a non-nil ‘inhibit-same-window’ entry, the selected
window is not eligible for reuse.
If ALIST contains a ‘reusable-frames’ entry, its value determines
which frames to search for a reusable window:
nil -- the selected frame (actually the last non-minibuffer frame)
A frame -- just that frame
‘visible’ -- all visible frames
0 -- all frames on the current terminal
t -- all frames.
If ALIST contains no ‘reusable-frames’ entry, search just the
selected frame if ‘display-buffer-reuse-frames’ and
‘pop-up-frames’ are both nil; search all frames on the current
terminal if either of those variables is non-nil.
If ALIST has a ‘previous-window’ entry, the window specified by
that entry will override any other window found by the methods
above, even if that window never showed BUFFER before.
Yes thats true but I was asking for a variable with that name in emacs 27. The point is that in your stacktrace purpose tries to combine display-buffer-in-previous-window
with other alists which fails as the variable in question is no list. In emacs 26 this does not happen.
This could now be:
Anyway as emacs 27 is not officially supported yet I would advise to consider going back to Version 26.1 except you want to use a special feature in 27 (dumping I suppose?) in this case please use realgud instead.
This is still a problem with emacs 27 and spacemacs develop branch. There is no such issue without spacemacs (emacs -q
), so this seems to be due to some spacemacs configuration. I confirm everything works fine on emacs 26.1
Is there any workaround to this? Can't run gdb.
I got the same error, no clue.
Excluding the window-purpose package (pulled in by the helm layer) by adding it to "dotspacemacs-excluded-packages" indeed solved the problem for me.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!
Description :octocat:
gud-gdb is not working on develop branch, master working as expected
Reproduction guide :beetle:
SPC SPC gud-gdb
Run gud-gdb (like this): gdb --fullname a.out
Observed behaviour: :eyes: :broken_heart: gdb fails to start with an error message
wrong-type-argument listp display-buffer-in-previous-window
Expected behaviour: :heart: :smile: I expect gdb window to show up
System Info :computer:
Backtrace :paw_prints: