unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
To: 62697@debbugs.gnu.org
Subject: bug#62697: gdb-mi.el: Change target-async to mi-async
Date: Thu, 6 Apr 2023 14:48:20 +0200	[thread overview]
Message-ID: <CABehr5ca3Xx2udS3vQoj0-xw9-owz8WfopXZALoz8JqjwNnM0w@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 15059 bytes --]

Hello,

This may be a bit too early, given how prevalent it is to be using older
versions of GDB but I figured I should send this patch anyways to get it
out of
my mind:

For GDB version >= 11, starting up a debugging session with 'gdb-mi.el'
always
ends with this message:

> (gdb) Warning: 'set target-async', an alias for the command 'set
mi-async', is
> deprecated.  Use 'set mi-async'.

This is a bit of an eyesore and also breaks the initial prompt (although
that is
easily fixed by pressing enter, etc, but that may still be confusing for new
users).

It may be reasonable to either query the GDB version (not sure how though,
unfortunately) and then use the old command (`set target-async`) or execute
the
non-deprecated command instead (`set mi-async`), and then possibly trying
the
old on if the new one did not work.

Apparently, `set mi-async` is a GDB 7.8 feature (Released Jul 2014), so this
change may cause incompatibilities with earlier GDB versions. That said, I
suspect that it will only cause a warning message to appear for using an
unsupported command, but unfortunately I don't have an old enough version
of GDB
handy to try that out.

Any strong opinions either way? The attached patch only replaces the old
command
with the new one, but I'm open for suggestions.

Best regards,
Gustaf

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.33, cairo version 1.16.0) of 2023-03-26 built on ShadowX
Repository revision: 248aabd9514c9eb21f4aa2e9062f8ce927d9fe54
Repository branch: master
System Description: Ubuntu 22.04.2 LTS

Configured using:
 'configure --prefix=/home/xaldew/.local
 '--program-transform-name=s/^ctags$/ctags.emacs/' --without-makeinfo
 --with-xpm=ifavailable --with-jpeg=ifavailable --with-gif=ifavailable
 --with-tiff=ifavailable'

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG LCMS2
LIBSELINUX LIBXML2 MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND
THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LANG: sv_SE.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Magit

Minor modes in effect:
  pyvenv-mode: t
  dap-tooltip-mode: t
  dap-ui-many-windows-mode: t
  dap-ui-controls-mode: t
  dap-ui-mode: t
  gdb-many-windows: t
  treemacs-filewatch-mode: t
  treemacs-follow-mode: t
  treemacs-git-mode: t
  treemacs-fringe-indicator-mode: t
  dap-auto-configure-mode: t
  dap-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  beacon-mode: t
  server-mode: t
  hes-mode: t
  projectile-mode: t
  global-display-fill-column-indicator-mode: t
  global-display-line-numbers-mode: t
  global-so-long-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  global-company-mode: t
  company-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  global-anzu-mode: t
  anzu-mode: t
  global-atomic-chrome-edit-mode: t
  windmove-mode: t
  which-key-mode: t
  anyclip-mode: t
  override-global-mode: t
  electric-pair-mode: t
  save-place-mode: t
  global-subword-mode: t
  subword-mode: t
  winner-mode: t
  global-auto-revert-mode: t
  xterm-mouse-mode: t
  savehist-mode: t
  ido-everywhere: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/xaldew/.config/emacs/elpa/transient-20230315.1520/transient hides
/home/xaldew/.local/share/emacs/30.0.50/lisp/transient

Features:
(shadow sort bbdb-message mail-extr warnings emacsbug cdlatex reftex
reftex-loaddefs reftex-vars org-element org-persist org-id org-refile
avl-tree oc-basic ol-eww eww xdg url-queue mm-url ol-rmail ol-mhe ol-irc
ol-info ol-gnus nnselect gnus-art mm-uu mml2015 mm-view mml-smime smime
dig gnus-sum shr pixel-fill kinsoku url-file svg gnus-group gnus-undo
gnus-start gnus-dbus dbus gnus-cloud nnimap nnmail mail-source utf7 nnoo
gnus-spec gnus-int gnus-range gnus-win gnus nnheader range ol-docview
doc-view jka-compr ol-bibtex bibtex ol-bbdb ol-w3m org-tempo tempo
cus-start ob-latex ob-plantuml ob-org ob-shell ob-gnuplot ob-C ob-python
ob-ditaa ob-dot org ob ob-tangle ob-ref ob-lob ob-table ob-exp org-macro
org-src ob-comint org-pcomplete org-list org-footnote org-faces
org-entities ob-emacs-lisp ob-core ob-eval org-cycle org-table ol
org-fold org-fold-core org-keys oc org-loaddefs cal-menu calendar
cal-loaddefs org-version org-compat org-macs shortdoc help-fns
radix-tree magit-annex magit-patch magit-subtree magit-gitignore
magit-ediff ediff ediff-merg ediff-mult ediff-wind ediff-diff ediff-help
ediff-init ediff-util image-mode exif guess-language pyvenv eshell
esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups
esh-util highlight-indentation anaconda-mode pythonic tramp
tramp-loaddefs trampver tramp-integration files-x tramp-compat
parse-time iso8601 ls-lisp python-mode/.yas-setup.el dap-python python
treesit c++-genostream cmake-mode rst ace-window all-the-icons
all-the-icons-faces data-material data-weathericons data-octicons
data-fileicons data-faicons data-alltheicons vc-hg vc-bzr vc-src vc-sccs
vc-svn vc-cvs vc-rcs log-view vc bug-reference misearch multi-isearch
lsp-diagnostics lsp-headerline lsp-icons lsp-modeline dap-mouse dap-ui
gdb-mi bui bui-list bui-info bui-entry bui-core bui-history bui-button
bui-utils lsp-lens vc-git vc-dispatcher modern-cpp-font-lock
.yas-setup.el cc-mode/.yas-setup.el view lsp-zig lsp-tilt lsp-steep
lsp-svelte lsp-sqls lsp-ruby-syntax-tree lsp-ruby-lsp lsp-yaml lsp-xml
lsp-vimscript lsp-vhdl lsp-volar lsp-vetur lsp-html lsp-verilog lsp-vala
lsp-v lsp-typeprof lsp-ttcn3 lsp-toml lsp-terraform lsp-tex lsp-sorbet
lsp-solargraph lsp-rust lsp-rf lsp-ruff-lsp lsp-remark lsp-racket lsp-r
lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php lsp-pls
lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-magik lsp-nix
lsp-nim lsp-nginx lsp-mint lsp-marksman lsp-markdown lsp-lua lsp-ltex
lsp-kotlin lsp-json lsp-javascript lsp-idris lsp-haxe lsp-groovy
lsp-hack lsp-graphql lsp-gleam lsp-go lsp-completion lsp-gdscript
lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elixir
lsp-elm lsp-dockerfile lsp-dhall lsp-d lsp-css lsp-csharp gnutls
lsp-crystal lsp-cmake lsp-clojure lsp-treemacs lsp-treemacs-generic
lsp-treemacs-themes treemacs-treelib treemacs treemacs-header-line
treemacs-compatibility treemacs-mode treemacs-interface
treemacs-persistence treemacs-filewatch-mode treemacs-follow-mode
treemacs-rendering treemacs-annotations treemacs-async
treemacs-workspaces treemacs-dom treemacs-visuals
treemacs-fringe-indicator treemacs-scope pulse treemacs-faces
treemacs-icons treemacs-themes treemacs-core-utils pfuture hl-line
treemacs-logging treemacs-customization treemacs-macros
lsp-semantic-tokens lsp-clangd lsp-beancount lsp-bash lsp-astro
lsp-ansible lsp-angular lsp-ada lsp-actionscript dap-gdb-lldb dap-utils
dom xml dap-mode dap-tasks dap-launch lsp-docker yaml posframe
dap-overlays magit-extras magit-submodule magit-blame magit-stash
magit-reflog magit-bisect magit-push magit-pull magit-fetch magit-clone
magit-remote magit-commit magit-sequence magit-notes magit-worktree
magit-tag magit-merge magit-branch magit-reset magit-files magit-refs
magit-status magit magit-repos magit-apply magit-wip magit-log
which-func magit-diff smerge-mode diff-mode git-commit log-edit message
sendmail yank-media rfc822 mml mml-sec epa derived gnus-util time-date
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log magit-core magit-autorevert magit-margin
magit-transient magit-process with-editor shell pcomplete magit-mode
transient magit-git magit-base magit-section format-spec crm compat
dired-aux dired dired-loaddefs term/tmux term/xterm xterm pinentry
beacon server form-feed paredit nameless flyspell ispell whitespace
rainbow-delimiters highlight-escape-sequences projectile lisp-mnt grep
ibuf-ext ibuffer ibuffer-loaddefs lsp-ui lsp-ui-flycheck lsp-ui-doc
goto-addr lsp-ui-imenu lsp-ui-peek lsp-ui-sideline flycheck lsp-mode
tree-widget spinner network-stream puny nsm markdown-mode noutline
outline inline imenu f f-shortdoc ewoc epg rfc6068 epg-config compile
text-property-search lsp-ui-util face-remap find-func lsp-protocol s ht
dash display-fill-column-indicator display-line-numbers so-long
py-snippets yasnippet-radical-snippets yasnippet-snippets yasnippet
company-oddmuse company-keywords company-etags etags fileloop generator
xref project company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb company undo-tree diff queue anzu
thingatpt atomic-chrome websocket bindat let-alist
color-theme-approximate advice color delim-col hydra-examples windmove
rect hydra lv bbdb bbdb-site timezone cus-edit pp cus-load icons
wid-edit ace-link avy which-key anyclip-mode cl-extra help-mode edmacro
kmacro diminish use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core finder-inf local-autoloads cwarn cc-mode cc-fonts
cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
elec-pair saveplace cap-words superword subword winner autorevert
filenotify xt-mouse tango-dark-theme savehist ido gud comint ansi-osc
ansi-color ring keybinds terminals ivy-autoloads
spacemacs-theme-autoloads ace-link-autoloads kotlin-mode-autoloads
company-auctex-autoloads gl-conf-mode-autoloads css-eldoc-autoloads
beacon-autoloads lsp-ltex-autoloads paredit-autoloads
glsl-mode-autoloads highlight-escape-sequences-autoloads
powershell-autoloads gnuplot-mode-autoloads cuda-mode-autoloads
ein-autoloads request-autoloads ssh-config-mode-autoloads
git-modes-autoloads mmm-mode-autoloads ebdb-autoloads rmsbolt-autoloads
debbugs-autoloads dart-mode-autoloads sublime-themes-autoloads
coffee-mode-autoloads graphviz-dot-mode-autoloads magit-annex-autoloads
opencl-mode-autoloads json-mode-autoloads rx company-anaconda-autoloads
pinentry-autoloads rainbow-mode-autoloads htmlize-autoloads
projectile-autoloads flycheck-rust-autoloads bbdb-vcard-autoloads
jira-markup-mode-autoloads browse-kill-ring-autoloads
helm-dash-autoloads sx-autoloads jenkins-autoloads smart-jump-autoloads
bbdb-autoloads which-key-autoloads anzu-autoloads x86-lookup-autoloads
cmake-mode-autoloads flycheck-kotlin-autoloads undo-tree-autoloads
rust-mode-autoloads plantuml-mode-autoloads magit-gerrit-autoloads
lua-mode-autoloads yaml-mode-autoloads evil-autoloads deferred-autoloads
iedit-autoloads unfill-autoloads srefactor-autoloads abc-mode-autoloads
autoinsert solarized-theme-autoloads alert-autoloads gntp-autoloads
emms-autoloads cider-autoloads sesman-autoloads queue-autoloads
parseedn-autoloads parseclj-autoloads clojure-mode-autoloads
flycheck-package-autoloads package-lint-autoloads
atomic-chrome-autoloads websocket-autoloads powerthesaurus-autoloads
jeison-autoloads dash-docs-autoloads rainbow-delimiters-autoloads
form-feed-autoloads yasnippet-radical-snippets-autoloads
pyimport-autoloads shut-up-autoloads json-snatcher-autoloads
helm-lsp-autoloads helm-autoloads clang-format-autoloads
poly-markdown-autoloads polymode-autoloads toml-mode-autoloads
diminish-autoloads cdlatex-autoloads eclim-autoloads anaphora-autoloads
py-snippets-autoloads yasnippet-snippets-autoloads
zenburn-theme-autoloads dap-mode-autoloads lsp-docker-autoloads
lsp-treemacs-autoloads treemacs-autoloads cfrs-autoloads
posframe-autoloads pfuture-autoloads ace-window-autoloads avy-autoloads
bui-autoloads magit-svn-autoloads magit-autoloads pcase
git-commit-autoloads with-editor-autoloads transient-autoloads
go-mode-autoloads goto-chg-autoloads log4e-autoloads
color-theme-approximate-autoloads cargo-autoloads calfw-autoloads
company-quickhelp-autoloads helm-core-autoloads async-autoloads
ecb-autoloads modern-cpp-font-lock-autoloads dts-mode-autoloads
nov-autoloads esxml-autoloads kv-autoloads company-math-autoloads
math-symbol-lists-autoloads elpy-autoloads pyvenv-autoloads
highlight-indentation-autoloads ob-ipython-autoloads
dash-functional-autoloads hydra-autoloads auto-complete-auctex-autoloads
auto-complete-autoloads yasnippet-autoloads auctex-latexmk-autoloads
auctex-autoloads tex-site yaml-autoloads ahk-mode-autoloads
magit-section-autoloads compat-autoloads cask-mode-autoloads
company-c-headers-autoloads company-autoloads csv-mode-autoloads
gnuplot-autoloads anaconda-mode-autoloads pythonic-autoloads
pos-tip-autoloads zerodark-theme-autoloads all-the-icons-autoloads
image+-autoloads expand-region-autoloads gnus-desktop-notify-autoloads
flycheck-autoloads pkg-info-autoloads epl-autoloads ggtags-autoloads
web-mode-autoloads lsp-ui-autoloads lsp-mode-autoloads lv-autoloads
markdown-mode-autoloads spinner-autoloads ht-autoloads f-autoloads
uimage-autoloads guess-language-autoloads dumb-jump-autoloads
popup-autoloads dash-autoloads s-autoloads google-c-style-autoloads
nameless-autoloads info slime-autoloads macrostep-autoloads package
browse-url url url-proxy url-privacy url-expand url-methods url-history
url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers
url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache
json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs
cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify
ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors
frame minibuffer nadvice seq simple cl-generic indonesian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite emoji-zwj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp
files window text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget keymap hashtable-print-readable backquote
threads dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty
make-network-process emacs)

Memory information:
((conses 16 817895 212638)
 (symbols 48 62999 0)
 (strings 32 249530 19612)
 (string-bytes 1 8101995)
 (vectors 16 160320)
 (vector-slots 8 3855694 143961)
 (floats 8 1381 10031)
 (intervals 56 21064 2868)
 (buffers 976 49))

[-- Attachment #1.2: Type: text/html, Size: 16160 bytes --]

[-- Attachment #2: 0001-Convert-gdb-command-target-async-to-mi-async.patch --]
[-- Type: text/x-patch, Size: 1160 bytes --]

From 6682e472e4efee5447c41b6e0e48a1d0070548d6 Mon Sep 17 00:00:00 2001
From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
Date: Wed, 18 Jan 2023 16:14:40 +0100
Subject: [PATCH] Convert gdb command `target-async' to `mi-async'.

* lisp/progmodes/gdb-mi.el: Change deprecated gdb command
`target-async' to `my-async'. Functions using the old name has also
updated.
---
 lisp/progmodes/gdb-mi.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 060957eac29..35af9f60ffc 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -1143,10 +1143,10 @@ gdb-non-stop-handler
 	(setq gdb-non-stop nil)
 	(setq gdb-supports-non-stop nil))
     (setq gdb-supports-non-stop t)
-    (gdb-input "-gdb-set target-async 1" 'ignore)
-    (gdb-input "-list-target-features" 'gdb-check-target-async)))
+    (gdb-input "-gdb-set mi-async on" 'ignore)
+    (gdb-input "-list-target-features" 'gdb-check-mi-async)))
 
-(defun gdb-check-target-async ()
+(defun gdb-check-mi-async ()
   (goto-char (point-min))
   (unless (re-search-forward "async" nil t)
     (message
-- 
2.34.1


             reply	other threads:[~2023-04-06 12:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 12:48 Gustaf Waldemarson [this message]
2023-04-06 13:32 ` bug#62697: gdb-mi.el: Change target-async to mi-async Eli Zaretskii
2023-04-07  1:26   ` Jim Porter
2023-04-07  6:26     ` Eli Zaretskii
2023-04-07  7:25       ` Jim Porter
2023-04-07 10:29         ` Eli Zaretskii
2023-04-07 10:36           ` Gustaf Waldemarson
2023-04-07 10:53             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CABehr5ca3Xx2udS3vQoj0-xw9-owz8WfopXZALoz8JqjwNnM0w@mail.gmail.com \
    --to=gustaf.waldemarson@gmail.com \
    --cc=62697@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).