unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
@ 2019-02-20 10:08 Gustaf Waldemarson
  2019-02-20 17:16 ` Eli Zaretskii
                   ` (4 more replies)
  0 siblings, 5 replies; 27+ messages in thread
From: Gustaf Waldemarson @ 2019-02-20 10:08 UTC (permalink / raw)
  To: 34589

Hello,

I've got a minor feature request to the gdb-mi (and possibly a bug to
report). I've recently been coding a lot of C++ where almost every variable is a
class/struct of some kind and up until now I've simply ignored the "locals"
windows since almost every data-type is listed as "<complex data type>".

Eventually though, I looked up why it was doing that instead of doing
some kind of pretty printing, and finally I noticed the
"--simple-values" flag, which causes GDB to print the variable name and
type, but not the value (for "complex" data types).

Since as C++ (and other languages) is moving more and more towards these
kinds non-simple data types, I figured I should send out a feature
request for something like the following:

- Remove "--simple-values" by default.

- Add a customizable variable such as `gdb-simple-values-only`, which
  adds the above flag.

- Add a customizable variable such as `gdb-locals-value-limit` to limit
  the length a value is allowed to be shown.

- Add a simple filter of the retrieved value string to make it fit on a
  single line (e.g., a simple version could just remove all newlines).

Naturally, the having "--simple-values" be default or not is really a
matter of taste, the above merely reflects my personal preference.

There might also be some efficiency concerns for really large
data-structure being sent through the GDB interface, but perhaps that's
already handled elsewhere?

Also, since it is tangential with the above topic: reference and pointer
variables to complex data types *are* being displayed already presumably
unintentionally. And since the output is not filtered, this leads to a
rather distorted local variable window.

A simple example showing the above "bug" can be seen in the program:

#include <iostream>
#include <vector>

using namespace std;

int main(void)
{
    size_t idx = 0;
    vector<int> v{1, 2, 3, 4, 5};
    auto &vr = v;
    for (auto i : v)
    {
        idx++;
        cout << i << endl;
    }
    return 0;
}

(Compile with CXXFLAGS="-std=c++11 -g" and open with gdb-mi as usual).

I guess this is caused by GDB considering references themselves to be
simple values. I believe the proposed feature(s) would fix this issue
and provide a more useful debugging experience.

Best regards,
Gustaf



In GNU Emacs 26.1.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2019-01-10 built on E105888
Repository revision: 9845044fb659735251269213e6e4e6debdd08eee
System Description:    Ubuntu 16.04.5 LTS

Recent messages:
Mark saved where search started
When done with a buffer, type C-x #
Mark saved where search started
Mark set
Mark saved where search started [3 times]
When done with a buffer, type C-x #
Mark saved where search started [2 times]
Quit
delete-backward-char: Text is read-only
Making completion list...

Configured using:
 'configure --prefix=/home/guswal01/.local
 '--program-transform-name=s/^ctags$/ctags.emacs/''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GSETTINGS GLIB NOTIFY
GNUTLS LIBXML2 FREETYPE XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM
THREADS LCMS2

Important settings:
  value of $LC_ALL:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Dired by name

Minor modes in effect:
  gdb-many-windows: t
  global-magit-file-mode: t
  diff-auto-refine-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  shell-dirtrack-mode: t
  beacon-mode: t
  flycheck-pos-tip-mode: t
  projectile-mode: t
  hes-mode: t
  global-linum-mode: t
  linum-mode: t
  yas-global-mode: t
  yas-minor-mode: t
  global-company-mode: t
  company-mode: t
  global-anzu-mode: t
  anzu-mode: t
  perspeen-mode: t
  global-atomic-chrome-edit-mode: t
  global-undo-tree-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
  show-paren-mode: t
  winner-mode: t
  global-auto-revert-mode: t
  xterm-mouse-mode: t
  savehist-mode: t
  ido-everywhere: t
  gud-tooltip-mode: t
  tooltip-mode: t
  global-eldoc-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
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/guswal01/.emacs.d/elpa/soap-client-3.1.5/soap-inspect hides
/home/guswal01/.local/share/emacs/26.1.91/lisp/net/soap-inspect
/home/guswal01/.emacs.d/elpa/soap-client-3.1.5/soap-client hides
/home/guswal01/.local/share/emacs/26.1.91/lisp/net/soap-client

Features:
(shadow sort bbdb-message mail-extr emacsbug sendmail gnus-async qp
gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-ml
gnus-msg disp-table nndoc gnus-cache gnus-dup gnus-art mm-uu mml2015
mm-view mml-smime smime dig mm-archive network-stream starttls url-cache
debbugs-gnu debbugs soap-client url-http url-auth url-gw nsm url
url-proxy url-privacy url-expand url-methods url-history mailcap rng-xsd
rng-dt rng-util xsd-regexp xml eieio-opt speedbar sb-image ezimage
dframe help-fns radix-tree pbrt-mode misearch multi-isearch two-column
iso-transl tabify flycheck-popup-tip gdb-mi ace-window
modern-cpp-font-lock irony-cdb-libclang irony-cdb-json pp
irony-cdb-clang-complete irony-cdb irony-completion irony-snippet irony
irony-iotask face-remap vc-git bug-reference org-rmail org-mhe org-irc
org-info org-gnus nnir gnus-sum gnus-group gnus-undo gnus-start
gnus-cloud nnimap nnmail mail-source tls gnutls utf7 netrc nnoo
parse-time gnus-spec gnus-int gnus-range gnus-win gnus nnheader
org-docview doc-view jka-compr image-mode org-bibtex bibtex org-bbdb
org-w3m org-table ob-latex ob-plantuml ob-org ob-shell ob-gnuplot
ob-python ob-ditaa ob-dot org-element avl-tree generator org org-macro
org-footnote org-pcomplete org-list org-faces org-entities noutline
outline org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob
ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs cal-menu calendar cal-loaddefs guess-language magit-extras
magit-submodule magit-obsolete magit-blame magit-stash 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 imenu magit-diff
smerge-mode diff-mode magit-core magit-autorevert magit-process
magit-margin magit-mode git-commit magit-git magit-section magit-utils
magit-popup crm log-edit message rmc puny format-spec rfc822 mml mml-sec
epa derived epg gnus-util rmail rmail-loaddefs 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
with-editor async-bytecomp async shell pcomplete dired dired-loaddefs
term/tmux term/xterm xterm smart-mode-line-dark-theme smart-mode-line
rich-minority beacon server flymake-proc flymake warnings
auto-complete-config auto-complete popup form-feed paredit nameless
lisp-mnt flyspell ispell whitespace flycheck-pos-tip pos-tip flycheck
find-func dash rainbow-delimiters projectile grep compile ibuf-ext
ibuffer ibuffer-loaddefs highlight-escape-sequences linum
yasnippet-snippets yasnippet company-oddmuse company-keywords
company-etags etags xref project company-gtags company-dabbrev-code
company-dabbrev company-files company-capf company-cmake company-xcode
company-clang company-semantic company-eclim company-template
company-bbdb company anzu thingatpt perspeen perspeen-tab powerline
powerline-separators powerline-themes atomic-chrome websocket url-cookie
url-domsuf url-util bindat subr-x let-alist json map
color-theme-approximate color delim-col hydra-examples windmove rect
hydra lv pcase bbdb bbdb-site timezone cus-edit cus-start cus-load
wid-edit ace-link avy undo-tree diff which-key advice anyclip-mode
cl-extra help-mode diminish use-package use-package-ensure
use-package-delight use-package-diminish use-package-bind-key bind-key
use-package-core finder-inf autoinsert tex-site rx slime-autoloads info
package epg-config url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache url-vars
local-autoloads cwarn cc-mode cc-fonts easymenu cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs elec-pair saveplace
cap-words superword subword time-date paren winner autorevert filenotify
xt-mouse tango-dark-theme savehist ido seq byte-opt gv bytecomp
byte-compile cconv gud easy-mmode comint ansi-color ring keybinds
edmacro kmacro cl-loaddefs cl-lib terminals mule-util tooltip eldoc
electric uniquify ediff-hook vc-hooks lisp-float-type 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 elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic 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 charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote threads dbusbind inotify lcms2 dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 1119702 162902)
 (symbols 48 60024 2)
 (miscs 40 6949 1708)
 (strings 32 201194 30469)
 (string-bytes 1 6831751)
 (vectors 16 81280)
 (vector-slots 8 2121524 238164)
 (floats 8 3772 1218)
 (intervals 56 96783 1278)
 (buffers 992 96)
 (heap 1024 90082 4527))





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-20 10:08 bug#34589: 26.1.91; GDB-MI Display Complex Data Types Gustaf Waldemarson
@ 2019-02-20 17:16 ` Eli Zaretskii
  2019-02-21 13:42   ` Gustaf Waldemarson
  2020-04-15 14:54 ` Yuan Fu
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2019-02-20 17:16 UTC (permalink / raw)
  To: Gustaf Waldemarson; +Cc: 34589

> From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> Date: Wed, 20 Feb 2019 11:08:15 +0100
> 
> Since as C++ (and other languages) is moving more and more towards these
> kinds non-simple data types, I figured I should send out a feature
> request for something like the following:
> 
> - Remove "--simple-values" by default.
> 
> - Add a customizable variable such as `gdb-simple-values-only`, which
>   adds the above flag.
> 
> - Add a customizable variable such as `gdb-locals-value-limit` to limit
>   the length a value is allowed to be shown.
> 
> - Add a simple filter of the retrieved value string to make it fit on a
>   single line (e.g., a simple version could just remove all newlines).

Thanks.  We don't have an active developer for gdb-mi.el for the
moment, so please consider writing these changes and submitting the
patches here.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-20 17:16 ` Eli Zaretskii
@ 2019-02-21 13:42   ` Gustaf Waldemarson
  2019-02-23  9:40     ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Gustaf Waldemarson @ 2019-02-21 13:42 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34589

[-- Attachment #1: Type: text/plain, Size: 2362 bytes --]

I took a stab at it, but it turned out to be a bit more complicated
than I thought:

- The `-stack-list-locals` accepts one of three flags, 0, 1, or 2 (or
equivalently, --no-values, --all-values or --simple-values).
   - No-values only prints the variable name,
   - All values print the variable name and the associated value.
   - Simple-values print the name, type and value for simple types.
   - There is no option to print everything (name, type and value),
this feels like an oversight in the API, but can be worked around,
sort of.

What I ended up doing was to create a new "handler" that runs before
the original one that records the variable name/value pair in a
hash-table, that the original handler can refer to for the value of
complex data-types. This works. but feels like a significant
work-around.

Additionally, when I was going through the GDB-MI documentation, I
noticed that `-stack-list-locals` is deprecated and should be replaced
with `-stack-list-variables`, so the second patch fixes that.
Incidentally, this also allow function arguments (argv, argc, etc) to
show up in the variable buffer.

I've attached the patches that accomplishes the above, but you may
want to have someone review it that actually knows at bit more about
gdb-mi.el.

I haven't contributed anything before either, so there might very well
be some other details that I've missed.

Best regards,
Gustaf


Den ons 20 feb. 2019 kl 18:16 skrev Eli Zaretskii <eliz@gnu.org>:
>
> > From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> > Date: Wed, 20 Feb 2019 11:08:15 +0100
> >
> > Since as C++ (and other languages) is moving more and more towards these
> > kinds non-simple data types, I figured I should send out a feature
> > request for something like the following:
> >
> > - Remove "--simple-values" by default.
> >
> > - Add a customizable variable such as `gdb-simple-values-only`, which
> >   adds the above flag.
> >
> > - Add a customizable variable such as `gdb-locals-value-limit` to limit
> >   the length a value is allowed to be shown.
> >
> > - Add a simple filter of the retrieved value string to make it fit on a
> >   single line (e.g., a simple version could just remove all newlines).
>
> Thanks.  We don't have an active developer for gdb-mi.el for the
> moment, so please consider writing these changes and submitting the
> patches here.

[-- Attachment #2: 0002-gdb-mi.el-Use-stack-list-variables.patch --]
[-- Type: text/x-patch, Size: 2367 bytes --]

From 054ebfe4cd150cb6d74b26e3e87ea7a32c2b62fc Mon Sep 17 00:00:00 2001
From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
Date: Thu, 21 Feb 2019 13:52:21 +0100
Subject: [PATCH 2/2] gdb-mi.el: Use `-stack-list-variables`.

use `-stack-list-variables` instead of the deprecated
`-stack-list-locals`. Additionally, this allow function arguments to
be displayed in the locals buffer.
---
 lisp/progmodes/gdb-mi.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 6fb09d1..683bfdb 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -4108,7 +4108,7 @@ gdb-select-frame
 ;; uses "-stack-list-locals --simple-values". Needs GDB 6.1 onwards.
 (def-gdb-trigger-and-handler
   gdb-invalidate-locals
-  (concat (gdb-current-context-command "-stack-list-locals")
+  (concat (gdb-current-context-command "-stack-list-variables")
           " --simple-values")
   gdb-locals-handler gdb-locals-handler-custom
   '(start update))
@@ -4123,7 +4123,7 @@ gdb-select-frame
 ;; Retrieve the values of all variables before invalidating locals.
 (def-gdb-trigger-and-handler
   gdb-locals-values
-  (concat (gdb-current-context-command "-stack-list-locals")
+  (concat (gdb-current-context-command "-stack-list-variables")
           " --all-values")
   gdb-locals-values-handler gdb-locals-values-handler-custom
   '(start update))
@@ -4157,7 +4157,7 @@ gdb-locals-values-table
 
 (defun gdb-locals-values-handler-custom ()
   "Store the values of local variables in `gdb-locals-value-map'."
-  (let ((locals-list (bindat-get-field (gdb-json-partial-output) 'locals)))
+  (let ((locals-list (bindat-get-field (gdb-json-partial-output) 'variables)))
     (dolist (local locals-list)
       (let ((name (bindat-get-field local 'name))
             (value (bindat-get-field local 'value)))
@@ -4207,7 +4207,7 @@ gdb-edit-locals-value
 ;; Complex data types are looked up in `gdb-locals-values-table'.
 (defun gdb-locals-handler-custom ()
   "Handler to rebuild the local variables table buffer."
-  (let ((locals-list (bindat-get-field (gdb-json-partial-output) 'locals))
+  (let ((locals-list (bindat-get-field (gdb-json-partial-output) 'variables))
         (table (make-gdb-table)))
     (dolist (local locals-list)
       (let ((name (bindat-get-field local 'name))
-- 
2.7.4


[-- Attachment #3: 0001-gdb-mi.el-Display-complex-data-types.patch --]
[-- Type: text/x-patch, Size: 4863 bytes --]

From ebed165be8af3d7e145e1defa97892fdf9ddf560 Mon Sep 17 00:00:00 2001
From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
Date: Thu, 21 Feb 2019 13:37:14 +0100
Subject: [PATCH 1/2] gdb-mi.el: Display complex data-types.

Create a new gdb buffer for extracting local variable values. To
extract the values for 'complex' data-types, the command
`-stack-list-locals` is used with the `--all-values` flag.

The extracted values are then stored in a hash-table for later use in
the `gdb-locals-handler-custom` that performs the actual update of the
Local variable buffer.

All variable values are filtered to fit it into a single line, being
truncated as necessary by the user customizable option
`gdb-locals-value-limit`.

The old behavior of hiding complex values can be restored using the
customizable `gdb-locals-simple-values-only` option.
---
 lisp/progmodes/gdb-mi.el | 69 +++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 66 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index b63f82b..6fb09d1 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -4119,6 +4119,51 @@ gdb-select-frame
  'gdb-locals-mode
  'gdb-invalidate-locals)
 
+
+;; Retrieve the values of all variables before invalidating locals.
+(def-gdb-trigger-and-handler
+  gdb-locals-values
+  (concat (gdb-current-context-command "-stack-list-locals")
+          " --all-values")
+  gdb-locals-values-handler gdb-locals-values-handler-custom
+  '(start update))
+
+(gdb-set-buffer-rules
+ 'gdb-locals-values-buffer
+ 'gdb-locals-values-buffer-name
+ 'gdb-locals-mode
+ 'gdb-locals-values)
+
+(defun gdb-locals-values-buffer-name ()
+  (gdb-current-context-buffer-name
+   (concat "local values of " (gdb-get-target-string))))
+
+
+(defcustom gdb-locals-simple-values-only nil
+  "Only display simple values in the Locals buffer."
+  :type 'boolean
+  :group 'gud)
+
+
+(defcustom gdb-locals-value-limit 100
+  "Maximum length the value of a local variable is allowed to be."
+  :type 'integer
+  :group 'gud)
+
+
+(defvar gdb-locals-values-table (make-hash-table :test #'equal)
+  "Mapping of local variable names to a string with their value.")
+
+
+(defun gdb-locals-values-handler-custom ()
+  "Store the values of local variables in `gdb-locals-value-map'."
+  (let ((locals-list (bindat-get-field (gdb-json-partial-output) 'locals)))
+    (dolist (local locals-list)
+      (let ((name (bindat-get-field local 'name))
+            (value (bindat-get-field local 'value)))
+        (puthash name value gdb-locals-values-table)))))
+
+
 (defvar gdb-locals-watch-map
   (let ((map (make-sparse-keymap)))
     (suppress-keymap map)
@@ -4135,6 +4180,17 @@ gdb-edit-locals-map-1
     map)
   "Keymap to edit value of a simple data type local variable.")
 
+
+(defun gdb-locals-value-filter (value)
+  "Filter function for the local variable VALUE."
+  (let* ((no-nl (replace-regexp-in-string "\n" " " value))
+         (str (replace-regexp-in-string "[[:space:]]+" " " no-nl))
+         (limit gdb-locals-value-limit))
+    (if (>= (length str) limit)
+        (concat (substring str 0 limit) "...")
+      str)))
+
+
 (defun gdb-edit-locals-value (&optional event)
   "Assign a value to a variable displayed in the locals buffer."
   (interactive (list last-input-event))
@@ -4147,9 +4203,10 @@ gdb-edit-locals-value
       (gud-basic-call
        (concat  "-gdb-set variable " var " = " value)))))
 
-;; Don't display values of arrays or structures.
-;; These can be expanded using gud-watch.
+
+;; Complex data types are looked up in `gdb-locals-values-table'.
 (defun gdb-locals-handler-custom ()
+  "Handler to rebuild the local variables table buffer."
   (let ((locals-list (bindat-get-field (gdb-json-partial-output) 'locals))
         (table (make-gdb-table)))
     (dolist (local locals-list)
@@ -4157,7 +4214,11 @@ gdb-locals-handler-custom
             (value (bindat-get-field local 'value))
             (type (bindat-get-field local 'type)))
         (when (not value)
-          (setq value "<complex data type>"))
+          (setq value
+                (if gdb-locals-simple-values-only
+                    "<complex data type>"
+                  (gethash name gdb-locals-values-table "<unavailable>"))))
+        (setq value (gdb-locals-value-filter value))
         (if (or (not value)
                 (string-match "\\0x" value))
             (add-text-properties 0 (length name)
@@ -4581,6 +4642,8 @@ gdb-set-window-buffer
 
 (defun gdb-setup-windows ()
   "Layout the window pattern for option `gdb-many-windows'."
+  ;; Make sure that local values are updated before locals.
+  (gdb-get-buffer-create 'gdb-locals-values-buffer)
   (gdb-get-buffer-create 'gdb-locals-buffer)
   (gdb-get-buffer-create 'gdb-stack-buffer)
   (gdb-get-buffer-create 'gdb-breakpoints-buffer)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-21 13:42   ` Gustaf Waldemarson
@ 2019-02-23  9:40     ` Eli Zaretskii
  2019-02-23 10:01       ` Gustaf Waldemarson
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2019-02-23  9:40 UTC (permalink / raw)
  To: Gustaf Waldemarson; +Cc: 34589

> From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> Date: Thu, 21 Feb 2019 14:42:54 +0100
> Cc: 34589@debbugs.gnu.org
> 
> I've attached the patches that accomplishes the above, but you may
> want to have someone review it that actually knows at bit more about
> gdb-mi.el.

Thanks, I will review this soon.  But in any case, this is too large
for us to accept without you assigning the copyright.  Would you like
to start the legal paperwork rolling, so that it's done by the time we
are ready to install the changes?  If yes, I will send you the form
off-list.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-23  9:40     ` Eli Zaretskii
@ 2019-02-23 10:01       ` Gustaf Waldemarson
  2019-02-23 10:36         ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Gustaf Waldemarson @ 2019-02-23 10:01 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34589

Anytime! And I'm fine with signing away the copyright, so feel free to
get the paperwork rolling :)

/Gustaf

Den lör 23 feb. 2019 kl 10:40 skrev Eli Zaretskii <eliz@gnu.org>:
>
> > From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> > Date: Thu, 21 Feb 2019 14:42:54 +0100
> > Cc: 34589@debbugs.gnu.org
> >
> > I've attached the patches that accomplishes the above, but you may
> > want to have someone review it that actually knows at bit more about
> > gdb-mi.el.
>
> Thanks, I will review this soon.  But in any case, this is too large
> for us to accept without you assigning the copyright.  Would you like
> to start the legal paperwork rolling, so that it's done by the time we
> are ready to install the changes?  If yes, I will send you the form
> off-list.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-23 10:01       ` Gustaf Waldemarson
@ 2019-02-23 10:36         ` Eli Zaretskii
  2019-02-28 16:05           ` Gustaf Waldemarson
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2019-02-23 10:36 UTC (permalink / raw)
  To: Gustaf Waldemarson; +Cc: 34589

> From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> Date: Sat, 23 Feb 2019 11:01:53 +0100
> Cc: 34589@debbugs.gnu.org
> 
> Anytime! And I'm fine with signing away the copyright, so feel free to
> get the paperwork rolling :)

Form sent off-list.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-23 10:36         ` Eli Zaretskii
@ 2019-02-28 16:05           ` Gustaf Waldemarson
  2019-02-28 17:24             ` Andrew W. Nosenko
                               ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: Gustaf Waldemarson @ 2019-02-28 16:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 34589

I'm afraid I have some bad news regarding the patches. As I was
looking for someone internally at Arm to sign the employer disclaimer
I was stopped by the legal department. Apparently Arm has taken the
stance that signing such a disclaimer could "open a legal door which
could expose intellectual property in the future". Thus, I'm afraid no
one at Arm will sign such a disclaimer at this time and consequently,
these patches cannot be used in Emacs.

I'm not exactly a lawyer, but I believe the patches can still be used
as a reference for implementing the feature, but as I mentioned I'm
afraid they cannot be used as-is.

Sorry about the trouble, I didn't really expect the company to stop
something like this.


Den lör 23 feb. 2019 kl 11:37 skrev Eli Zaretskii <eliz@gnu.org>:
>
> > From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> > Date: Sat, 23 Feb 2019 11:01:53 +0100
> > Cc: 34589@debbugs.gnu.org
> >
> > Anytime! And I'm fine with signing away the copyright, so feel free to
> > get the paperwork rolling :)
>
> Form sent off-list.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-28 16:05           ` Gustaf Waldemarson
@ 2019-02-28 17:24             ` Andrew W. Nosenko
  2019-02-28 17:58             ` Eli Zaretskii
                               ` (2 subsequent siblings)
  3 siblings, 0 replies; 27+ messages in thread
From: Andrew W. Nosenko @ 2019-02-28 17:24 UTC (permalink / raw)
  To: Gustaf Waldemarson; +Cc: 34589

[-- Attachment #1: Type: text/plain, Size: 1534 bytes --]

> Apparently Arm has taken the
stance that signing such a disclaimer could "open a legal door which
could expose intellectual property in the future".

May be narrowing to very specific area (emacs, gdb-mi, no-arm-specific)
would help?


On Thu, Feb 28, 2019 at 6:06 PM Gustaf Waldemarson <
gustaf.waldemarson@gmail.com> wrote:

> I'm afraid I have some bad news regarding the patches. As I was
> looking for someone internally at Arm to sign the employer disclaimer
> I was stopped by the legal department. Apparently Arm has taken the
> stance that signing such a disclaimer could "open a legal door which
> could expose intellectual property in the future". Thus, I'm afraid no
> one at Arm will sign such a disclaimer at this time and consequently,
> these patches cannot be used in Emacs.
>
> I'm not exactly a lawyer, but I believe the patches can still be used
> as a reference for implementing the feature, but as I mentioned I'm
> afraid they cannot be used as-is.
>
> Sorry about the trouble, I didn't really expect the company to stop
> something like this.
>
>
> Den lör 23 feb. 2019 kl 11:37 skrev Eli Zaretskii <eliz@gnu.org>:
> >
> > > From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> > > Date: Sat, 23 Feb 2019 11:01:53 +0100
> > > Cc: 34589@debbugs.gnu.org
> > >
> > > Anytime! And I'm fine with signing away the copyright, so feel free to
> > > get the paperwork rolling :)
> >
> > Form sent off-list.
>
>
>
>

-- 
Andrew W. Nosenko <andrew.w.nosenko@gmail.com>

[-- Attachment #2: Type: text/html, Size: 2417 bytes --]

^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-28 16:05           ` Gustaf Waldemarson
  2019-02-28 17:24             ` Andrew W. Nosenko
@ 2019-02-28 17:58             ` Eli Zaretskii
  2019-03-01  3:57             ` Richard Stallman
  2019-03-02  3:28             ` Richard Stallman
  3 siblings, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2019-02-28 17:58 UTC (permalink / raw)
  To: Gustaf Waldemarson; +Cc: 34589

> From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> Date: Thu, 28 Feb 2019 17:05:35 +0100
> Cc: 34589@debbugs.gnu.org
> 
> I'm afraid I have some bad news regarding the patches. As I was
> looking for someone internally at Arm to sign the employer disclaimer
> I was stopped by the legal department. Apparently Arm has taken the
> stance that signing such a disclaimer could "open a legal door which
> could expose intellectual property in the future". Thus, I'm afraid no
> one at Arm will sign such a disclaimer at this time and consequently,
> these patches cannot be used in Emacs.
> 
> I'm not exactly a lawyer, but I believe the patches can still be used
> as a reference for implementing the feature, but as I mentioned I'm
> afraid they cannot be used as-is.
> 
> Sorry about the trouble, I didn't really expect the company to stop
> something like this.

Sorry to hear that.

Does the first patch have value on its own?  If so, we can accept it
without legal paperwork.

Thanks.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-28 16:05           ` Gustaf Waldemarson
  2019-02-28 17:24             ` Andrew W. Nosenko
  2019-02-28 17:58             ` Eli Zaretskii
@ 2019-03-01  3:57             ` Richard Stallman
  2019-03-02  3:28             ` Richard Stallman
  3 siblings, 0 replies; 27+ messages in thread
From: Richard Stallman @ 2019-03-01  3:57 UTC (permalink / raw)
  To: Gustaf Waldemarson; +Cc: 34589

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

Thanks for trying to contribute.

The best time to negotiate with any employer about contributing to
free software is when you accept the job.  That is when you have
leverage.

If you think you have a chance of findin another job, you might want
to look for one, negotiating for a suitable copyright disclaimer about
contributions to free software as part of your employment contract
itself.  Do ask your lawyer (NOT the company's lawyer) to check it.

Then you could tell Arm and your fellow employees that you are quitting,
and say why.

Every time people say no to something convenient or attractive for the
sake of a moral principle, it helps teach the idea that moral issues
really matter.

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-28 16:05           ` Gustaf Waldemarson
                               ` (2 preceding siblings ...)
  2019-03-01  3:57             ` Richard Stallman
@ 2019-03-02  3:28             ` Richard Stallman
  2019-03-03 20:32               ` Gustaf Waldemarson
  3 siblings, 1 reply; 27+ messages in thread
From: Richard Stallman @ 2019-03-02  3:28 UTC (permalink / raw)
  To: Gustaf Waldemarson; +Cc: 34589

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > Apparently Arm has taken the
  > stance that signing such a disclaimer could "open a legal door which
  > could expose intellectual property in the future".

The term "intellectual property" is a tool for mystification.
It spreads confusion every time it is used, and that is why they use it.
See https://gnu.org/philosophy/not-ipr.html.

It takes an overgeneralization -- "intellecual property law" -- which
should never be used -- and then reifies it.

So you could respond by demanding they tell you concretely what kind
of thing they are talking about "exposing", instead of giving you
a mysifying answer.

-- 
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-03-02  3:28             ` Richard Stallman
@ 2019-03-03 20:32               ` Gustaf Waldemarson
  2019-03-04  3:30                 ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Gustaf Waldemarson @ 2019-03-03 20:32 UTC (permalink / raw)
  To: 34589; +Cc: rpluim, rms

> May be narrowing to very specific area (emacs, gdb-mi, no-arm-specific) would
> help?

It seems like that could be a possibility. I did get a bit more "willing" mail
last Friday evening but I suspect will require quite a bit more time from
everyone involved. I'll keep track of things internally, but for now I believe
we should consider the patches unusable.


> Does the first patch have value on its own? If so, we can accept it without
> legal paperwork.

I would argue that either patch have some value. The first patch enables display
of the complex data types and the second changes the interface to use a
non-deprecated function from the gdb interface that additionally lists function
arguments as well, something the previous one did not (at least if I have
understood the documentation correctly).

Although, the first patch in my list is the bigger one. Wasn't that part of the
problem legal-wise?


> If you think you have a chance of findin another job, you might want to look
> for one, negotiating for a suitable copyright disclaimer about contributions
> to free software as part of your employment contract itself. Do ask your
> lawyer (NOT the company's lawyer) to check it.

I'm afraid I'm not in a position in life where this is something that I can
consider. Although, I will keep it in mind in the future.


> Itʼs doubly surprising, given that Arm employees contribute patches to
> binutils all the time.

From what I've been told (and this might very well be third-hand info or worse),
Arm employees working on binutils and GCC can do so under an older agreement
that was in place prior to the introduction of the employer disclaimer.

They also told me that *if* Emacs was covered by that agreement, the patches
could be used given that they were re-authored to use my Arm e-mail, but I've
not heard back from them regarding that.


> Depending on what country youʼre in, your employer may have no claim
> whatsoever on code that you come up with on your own time (sometimes
> even if you came up with it *during* your actual work for them).
>
> Of course, this is a complex area, so you'd need to consult a lawyer
> to be sure (and Iʼm not one :-) )

Funny that you would mention that. I've heard similar things elsewhere, but
unfortunately I'm not in a position where I can challenge Arm regarding this to
change my contract. As I mentioned earlier though, I will be more careful the
future.


> So you could respond by demanding they tell you concretely what kind of thing
> they are talking about "exposing", instead of giving you a mysifying answer.

Thanks, I'll be sure to do just that.

Den lör 2 mars 2019 kl 04:28 skrev Richard Stallman <rms@gnu.org>:
>
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
>   > Apparently Arm has taken the
>   > stance that signing such a disclaimer could "open a legal door which
>   > could expose intellectual property in the future".
>
> The term "intellectual property" is a tool for mystification.
> It spreads confusion every time it is used, and that is why they use it.
> See https://gnu.org/philosophy/not-ipr.html.
>
> It takes an overgeneralization -- "intellecual property law" -- which
> should never be used -- and then reifies it.
>
> So you could respond by demanding they tell you concretely what kind
> of thing they are talking about "exposing", instead of giving you
> a mysifying answer.
>
> --
> Dr Richard Stallman
> President, Free Software Foundation (https://gnu.org, https://fsf.org)
> Internet Hall-of-Famer (https://internethalloffame.org)
>
>





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-03-03 20:32               ` Gustaf Waldemarson
@ 2019-03-04  3:30                 ` Eli Zaretskii
  2019-03-04  8:05                   ` Gustaf Waldemarson
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2019-03-04  3:30 UTC (permalink / raw)
  To: Gustaf Waldemarson; +Cc: rpluim, 34589, rms

> From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> Date: Sun, 3 Mar 2019 21:32:46 +0100
> Cc: Eli Zaretskii <eliz@gnu.org>, andrew.w.nosenko@gmail.com, rpluim@gmail.com, rms@gnu.org
> 
> > Does the first patch have value on its own? If so, we can accept it without
> > legal paperwork.
> 
> I would argue that either patch have some value. The first patch enables display
> of the complex data types and the second changes the interface to use a
> non-deprecated function from the gdb interface that additionally lists function
> arguments as well, something the previous one did not (at least if I have
> understood the documentation correctly).
> 
> Although, the first patch in my list is the bigger one. Wasn't that part of the
> problem legal-wise?

Yes.  I asked about the first patch because it's small enough to be
accepted even without legal paperwork.  The second one exceeds the
limits of that.






^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-03-04  3:30                 ` Eli Zaretskii
@ 2019-03-04  8:05                   ` Gustaf Waldemarson
  2019-03-08  9:06                     ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Gustaf Waldemarson @ 2019-03-04  8:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Robert Pluim, 34589, rms

>Yes.  I asked about the first patch because it's small enough to be
> accepted even without legal paperwork.  The second one exceeds the
> limits of that.

Ah, got it. Feel free to review and include it if you find it useful.
If Arm ever get back
to me regarding the legal stuff I'll submit them then as a separate bug.

Den mån 4 mars 2019 kl 04:31 skrev Eli Zaretskii <eliz@gnu.org>:
>
> > From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> > Date: Sun, 3 Mar 2019 21:32:46 +0100
> > Cc: Eli Zaretskii <eliz@gnu.org>, andrew.w.nosenko@gmail.com, rpluim@gmail.com, rms@gnu.org
> >
> > > Does the first patch have value on its own? If so, we can accept it without
> > > legal paperwork.
> >
> > I would argue that either patch have some value. The first patch enables display
> > of the complex data types and the second changes the interface to use a
> > non-deprecated function from the gdb interface that additionally lists function
> > arguments as well, something the previous one did not (at least if I have
> > understood the documentation correctly).
> >
> > Although, the first patch in my list is the bigger one. Wasn't that part of the
> > problem legal-wise?
>
> Yes.  I asked about the first patch because it's small enough to be
> accepted even without legal paperwork.  The second one exceeds the
> limits of that.
>





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-03-04  8:05                   ` Gustaf Waldemarson
@ 2019-03-08  9:06                     ` Eli Zaretskii
  2019-11-05 10:05                       ` Gustaf Waldemarson
  0 siblings, 1 reply; 27+ messages in thread
From: Eli Zaretskii @ 2019-03-08  9:06 UTC (permalink / raw)
  To: Gustaf Waldemarson; +Cc: rpluim, 34589, rms

> From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> Date: Mon, 4 Mar 2019 09:05:26 +0100
> Cc: 34589@debbugs.gnu.org, "Andrew W. Nosenko" <andrew.w.nosenko@gmail.com>, 
> 	Robert Pluim <rpluim@gmail.com>, rms@gnu.org
> 
> >Yes.  I asked about the first patch because it's small enough to be
> > accepted even without legal paperwork.  The second one exceeds the
> > limits of that.
> 
> Ah, got it. Feel free to review and include it if you find it useful.

Thanks.  Unfortunately, it turns out that the first patch makes little
sense without the second, as most of the code modified by the former
is introduced in the latter.  So I didn't apply any of your changes
for now; hopefully, you will be able to overcome the legal obstacles
at some point.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-03-08  9:06                     ` Eli Zaretskii
@ 2019-11-05 10:05                       ` Gustaf Waldemarson
  2020-09-30 18:08                         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 27+ messages in thread
From: Gustaf Waldemarson @ 2019-11-05 10:05 UTC (permalink / raw)
  To: 34589

Hello,

After quite some time here, I have finally been able to get the proper
legal confirmation from Arm to submit patches. As far as I understand
things, any patch that I submit for Emacs will now have the copyright
correctly reassigned and should now be usable without any issues.

That said, during these months I've been rethinking the variable GDB
window somewhat, and would like to see what people thinks of a rework of
the following kind:

- Instead of displaying variables as | 'type' | 'name' | 'value' |,
  display them as | 'name' | 'short-type' | 'value' |, where
  'short-type' is the first `X' characters of the type name.

  I personally find this to be more useful, especially for C++ template
  types which can easily occupy the whole window otherwise.

- Possibly add a new tab 'behind' the variable window which contains the
  /full/ type name. (This part may also have to interface with the new
  tabbing interface, something I'll have to look into when I've got some
  time.)

(Also, if interesting, should this kind of rework be submitted as a
separate ticket?)

Den fre 8 mars 2019 kl 10:07 skrev Eli Zaretskii <eliz@gnu.org>:
>
> > From: Gustaf Waldemarson <gustaf.waldemarson@gmail.com>
> > Date: Mon, 4 Mar 2019 09:05:26 +0100
> > Cc: 34589@debbugs.gnu.org, "Andrew W. Nosenko" <andrew.w.nosenko@gmail.com>,
> >       Robert Pluim <rpluim@gmail.com>, rms@gnu.org
> >
> > >Yes.  I asked about the first patch because it's small enough to be
> > > accepted even without legal paperwork.  The second one exceeds the
> > > limits of that.
> >
> > Ah, got it. Feel free to review and include it if you find it useful.
>
> Thanks.  Unfortunately, it turns out that the first patch makes little
> sense without the second, as most of the code modified by the former
> is introduced in the latter.  So I didn't apply any of your changes
> for now; hopefully, you will be able to overcome the legal obstacles
> at some point.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-20 10:08 bug#34589: 26.1.91; GDB-MI Display Complex Data Types Gustaf Waldemarson
  2019-02-20 17:16 ` Eli Zaretskii
@ 2020-04-15 14:54 ` Yuan Fu
  2020-04-15 15:05   ` Eli Zaretskii
  2022-03-06 20:39 ` William Xu
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 27+ messages in thread
From: Yuan Fu @ 2020-04-15 14:54 UTC (permalink / raw)
  To: 34589

I stumbled upon this thread. This feature is long-awaited (by me), is there any progress on including it into Emacs?

Yuan




^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2020-04-15 14:54 ` Yuan Fu
@ 2020-04-15 15:05   ` Eli Zaretskii
  0 siblings, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2020-04-15 15:05 UTC (permalink / raw)
  To: Yuan Fu; +Cc: 34589

> From: Yuan Fu <casouri@gmail.com>
> Date: Wed, 15 Apr 2020 10:54:30 -0400
> 
> I stumbled upon this thread. This feature is long-awaited (by me), is there any progress on including it into Emacs?

The legal paperworks is done, so we need someone to review this and
perhaps comment.

Thanks.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-11-05 10:05                       ` Gustaf Waldemarson
@ 2020-09-30 18:08                         ` Lars Ingebrigtsen
  2020-09-30 18:30                           ` Eli Zaretskii
  0 siblings, 1 reply; 27+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-30 18:08 UTC (permalink / raw)
  To: Gustaf Waldemarson; +Cc: 34589

Gustaf Waldemarson <gustaf.waldemarson@gmail.com> writes:

> After quite some time here, I have finally been able to get the proper
> legal confirmation from Arm to submit patches. As far as I understand
> things, any patch that I submit for Emacs will now have the copyright
> correctly reassigned and should now be usable without any issues.

Great!  Your patch didn't apply cleanly to Emacs 28, so I've respun it
(included below).

There was unfortunately no followup on this at the time, and I'm not
exactly a gdb expert (cough cough).

Could somebody give this a look-over?  It looks good to me, but I
haven't tested it.

> That said, during these months I've been rethinking the variable GDB
> window somewhat, and would like to see what people thinks of a rework of
> the following kind:
>
> - Instead of displaying variables as | 'type' | 'name' | 'value' |,
>   display them as | 'name' | 'short-type' | 'value' |, where
>   'short-type' is the first `X' characters of the type name.
>
>   I personally find this to be more useful, especially for C++ template
>   types which can easily occupy the whole window otherwise.
>
> - Possibly add a new tab 'behind' the variable window which contains the
>   /full/ type name. (This part may also have to interface with the new
>   tabbing interface, something I'll have to look into when I've got some
>   time.)
>
> (Also, if interesting, should this kind of rework be submitted as a
> separate ticket?)

Sure, a separate ticket would be nice.


diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 086f0b6a08..49ec99fc32 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -4228,7 +4228,7 @@ gdb-select-frame
 ;; uses "-stack-list-locals --simple-values". Needs GDB 6.1 onwards.
 (def-gdb-trigger-and-handler
   gdb-invalidate-locals
-  (concat (gdb-current-context-command "-stack-list-locals")
+  (concat (gdb-current-context-command "-stack-list-variables")
           " --simple-values")
   gdb-locals-handler gdb-locals-handler-custom
   '(start update))
@@ -4239,6 +4239,48 @@ gdb-select-frame
  'gdb-locals-mode
  'gdb-invalidate-locals)
 
+
+;; Retrieve the values of all variables before invalidating locals.
+(def-gdb-trigger-and-handler
+  gdb-locals-values
+  (concat (gdb-current-context-command "-stack-list-variables")
+          " --all-values")
+  gdb-locals-values-handler gdb-locals-values-handler-custom
+  '(start update))
+
+(gdb-set-buffer-rules
+ 'gdb-locals-values-buffer
+ 'gdb-locals-values-buffer-name
+ 'gdb-locals-mode
+ 'gdb-locals-values)
+
+(defun gdb-locals-values-buffer-name ()
+  (gdb-current-context-buffer-name
+   (concat "local values of " (gdb-get-target-string))))
+
+(defcustom gdb-locals-simple-values-only nil
+  "Only display simple values in the Locals buffer."
+  :type 'boolean
+  :group 'gud
+  :version "28.1")
+
+(defcustom gdb-locals-value-limit 100
+  "Maximum length the value of a local variable is allowed to be."
+  :type 'integer
+  :group 'gud
+  :version "28.1")
+
+(defvar gdb-locals-values-table (make-hash-table :test #'equal)
+  "Mapping of local variable names to a string with their value.")
+
+(defun gdb-locals-values-handler-custom ()
+  "Store the values of local variables in `gdb-locals-value-map'."
+  (let ((locals-list (bindat-get-field (gdb-json-partial-output) 'variables)))
+    (dolist (local locals-list)
+      (let ((name (bindat-get-field local 'name))
+            (value (bindat-get-field local 'value)))
+        (puthash name value gdb-locals-values-table)))))
+
 (defvar gdb-locals-watch-map
   (let ((map (make-sparse-keymap)))
     (suppress-keymap map)
@@ -4255,6 +4297,15 @@ gdb-edit-locals-map-1
     map)
   "Keymap to edit value of a simple data type local variable.")
 
+(defun gdb-locals-value-filter (value)
+  "Filter function for the local variable VALUE."
+  (let* ((no-nl (replace-regexp-in-string "\n" " " value))
+         (str (replace-regexp-in-string "[[:space:]]+" " " no-nl))
+         (limit gdb-locals-value-limit))
+    (if (>= (length str) limit)
+        (concat (substring str 0 limit) "...")
+      str)))
+
 (defun gdb-edit-locals-value (&optional event)
   "Assign a value to a variable displayed in the locals buffer."
   (interactive (list last-input-event))
@@ -4267,17 +4318,21 @@ gdb-edit-locals-value
       (gud-basic-call
        (concat  "-gdb-set variable " var " = " value)))))
 
-;; Don't display values of arrays or structures.
-;; These can be expanded using gud-watch.
+;; Complex data types are looked up in `gdb-locals-values-table'.
 (defun gdb-locals-handler-custom ()
-  (let ((locals-list (bindat-get-field (gdb-json-partial-output) 'locals))
+  "Handler to rebuild the local variables table buffer."
+  (let ((locals-list (bindat-get-field (gdb-json-partial-output) 'variables))
         (table (make-gdb-table)))
     (dolist (local locals-list)
       (let ((name (bindat-get-field local 'name))
             (value (bindat-get-field local 'value))
             (type (bindat-get-field local 'type)))
         (when (not value)
-          (setq value "<complex data type>"))
+          (setq value
+                (if gdb-locals-simple-values-only
+                    "<complex data type>"
+                  (gethash name gdb-locals-values-table "<unavailable>"))))
+        (setq value (gdb-locals-value-filter value))
         (if (or (not value)
                 (string-match "0x" value))
             (add-text-properties 0 (length name)
@@ -4743,6 +4798,8 @@ gdb-setup-windows
          (expand-file-name gdb-default-window-configuration-file
                            gdb-window-configuration-directory)))
     ;; Create default layout as before.
+    ;; Make sure that local values are updated before locals.
+    (gdb-get-buffer-create 'gdb-locals-values-buffer)
     (gdb-get-buffer-create 'gdb-locals-buffer)
     (gdb-get-buffer-create 'gdb-stack-buffer)
     (gdb-get-buffer-create 'gdb-breakpoints-buffer)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply related	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2020-09-30 18:08                         ` Lars Ingebrigtsen
@ 2020-09-30 18:30                           ` Eli Zaretskii
  0 siblings, 0 replies; 27+ messages in thread
From: Eli Zaretskii @ 2020-09-30 18:30 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: gustaf.waldemarson, 34589

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 30 Sep 2020 20:08:24 +0200
> Cc: 34589@debbugs.gnu.org
> 
> Gustaf Waldemarson <gustaf.waldemarson@gmail.com> writes:
> 
> > After quite some time here, I have finally been able to get the proper
> > legal confirmation from Arm to submit patches. As far as I understand
> > things, any patch that I submit for Emacs will now have the copyright
> > correctly reassigned and should now be usable without any issues.
> 
> Great!  Your patch didn't apply cleanly to Emacs 28, so I've respun it
> (included below).
> 
> There was unfortunately no followup on this at the time, and I'm not
> exactly a gdb expert (cough cough).

This is a new feature, so it can only break itself, no?

> Could somebody give this a look-over?  It looks good to me, but I
> haven't tested it.

If the OP could propose a simple sequence of commands to try, I could
run them and see if I have any comments.

Thanks.





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-20 10:08 bug#34589: 26.1.91; GDB-MI Display Complex Data Types Gustaf Waldemarson
  2019-02-20 17:16 ` Eli Zaretskii
  2020-04-15 14:54 ` Yuan Fu
@ 2022-03-06 20:39 ` William Xu
  2022-03-06 20:44 ` William Xu
  2022-03-06 20:46 ` Weilin Xu
  4 siblings, 0 replies; 27+ messages in thread
From: William Xu @ 2022-03-06 20:39 UTC (permalink / raw)
  To: 34589

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]

This patch really makes gdb "Locals" buffer finally useful.

I did a simple test, you can compare the results as shown in attached
screenshots. I have to update the patch to apply to master. 

How about merging it to master? From previous posts, it seems there is
no copyright issue any more? 

-- 
William


[-- Attachment #2: after.png --]
[-- Type: image/png, Size: 105085 bytes --]

[-- Attachment #3: before.png --]
[-- Type: image/png, Size: 46868 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: gdb-mi.el.patch --]
[-- Type: text/x-diff, Size: 4449 bytes --]

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index ddccbe80e7..5732501513 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -4288,7 +4288,7 @@ gdb-select-frame
 ;; uses "-stack-list-locals --simple-values". Needs GDB 6.1 onwards.
 (def-gdb-trigger-and-handler
   gdb-invalidate-locals
-  (concat (gdb-current-context-command "-stack-list-locals")
+  (concat (gdb-current-context-command "-stack-list-variables")
           " --simple-values")
   gdb-locals-handler gdb-locals-handler-custom
   '(start update))
@@ -4299,6 +4299,48 @@ gdb-select-frame
  'gdb-locals-mode
  'gdb-invalidate-locals)
 
+
+;; Retrieve the values of all variables before invalidating locals.
+(def-gdb-trigger-and-handler
+  gdb-locals-values
+  (concat (gdb-current-context-command "-stack-list-variables")
+          " --all-values")
+  gdb-locals-values-handler gdb-locals-values-handler-custom
+  '(start update))
+
+(gdb-set-buffer-rules
+ 'gdb-locals-values-buffer
+ 'gdb-locals-values-buffer-name
+ 'gdb-locals-mode
+ 'gdb-locals-values)
+
+(defun gdb-locals-values-buffer-name ()
+  (gdb-current-context-buffer-name
+   (concat "local values of " (gdb-get-target-string))))
+
+(defcustom gdb-locals-simple-values-only nil
+  "Only display simple values in the Locals buffer."
+  :type 'boolean
+  :group 'gud
+  :version "28.1")
+
+(defcustom gdb-locals-value-limit 100
+  "Maximum length the value of a local variable is allowed to be."
+  :type 'integer
+  :group 'gud
+  :version "28.1")
+
+(defvar gdb-locals-values-table (make-hash-table :test #'equal)
+  "Mapping of local variable names to a string with their value.")
+
+(defun gdb-locals-values-handler-custom ()
+  "Store the values of local variables in `gdb-locals-value-map'."
+  (let ((locals-list (bindat-get-field (gdb-mi--partial-output) 'variables)))
+    (dolist (local locals-list)
+      (let ((name (bindat-get-field local 'name))
+            (value (bindat-get-field local 'value)))
+        (puthash name value gdb-locals-values-table)))))
+
 (defvar gdb-locals-watch-map
   (let ((map (make-sparse-keymap)))
     (suppress-keymap map)
@@ -4315,6 +4357,15 @@ gdb-edit-locals-map-1
     map)
   "Keymap to edit value of a simple data type local variable.")
 
+(defun gdb-locals-value-filter (value)
+  "Filter function for the local variable VALUE."
+  (let* ((no-nl (replace-regexp-in-string "\n" " " value))
+         (str (replace-regexp-in-string "[[:space:]]+" " " no-nl))
+         (limit gdb-locals-value-limit))
+    (if (>= (length str) limit)
+        (concat (substring str 0 limit) "...")
+      str)))
+
 (defun gdb-edit-locals-value (&optional event)
   "Assign a value to a variable displayed in the locals buffer."
   (interactive (list last-input-event))
@@ -4327,17 +4378,22 @@ gdb-edit-locals-value
       (gud-basic-call
        (concat  "-gdb-set variable " var " = " value)))))
 
-;; Don't display values of arrays or structures.
-;; These can be expanded using gud-watch.
+;; Complex data types are looked up in `gdb-locals-values-table'.
 (defun gdb-locals-handler-custom ()
-  (let ((locals-list (gdb-mi--field (gdb-mi--partial-output) 'locals))
+  "Handler to rebuild the local variables table buffer."
+  (let ((locals-list (bindat-get-field (gdb-mi--partial-output) 'variables))
         (table (make-gdb-table)))
     (dolist (local locals-list)
       (let ((name (gdb-mi--field local 'name))
             (value (gdb-mi--field local 'value))
             (type (gdb-mi--field local 'type)))
         (when (not value)
-          (setq value "<complex data type>"))
+          (setq value
+                (if gdb-locals-simple-values-only
+                    "<complex data type>"
+                  (gethash name gdb-locals-values-table "<unavailable>"))))
+        (setq value (gdb-locals-value-filter value))
+
         (if (or (not value)
                 (string-match "0x" value))
             (add-text-properties 0 (length name)
@@ -4860,6 +4916,8 @@ gdb-setup-windows
          (expand-file-name gdb-default-window-configuration-file
                            gdb-window-configuration-directory)))
     ;; Create default layout as before.
+    ;; Make sure that local values are updated before locals.
+    (gdb-get-buffer-create 'gdb-locals-values-buffer)
     (gdb-get-buffer-create 'gdb-locals-buffer)
     (gdb-get-buffer-create 'gdb-stack-buffer)
     (gdb-get-buffer-create 'gdb-breakpoints-buffer)

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-20 10:08 bug#34589: 26.1.91; GDB-MI Display Complex Data Types Gustaf Waldemarson
                   ` (2 preceding siblings ...)
  2022-03-06 20:39 ` William Xu
@ 2022-03-06 20:44 ` William Xu
  2022-03-06 20:46 ` Weilin Xu
  4 siblings, 0 replies; 27+ messages in thread
From: William Xu @ 2022-03-06 20:44 UTC (permalink / raw)
  To: 34589

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]

This patch really makes gdb "Locals" buffer finally useful.

I did a simple test, you can compare the results as shown in attached
screenshots. I have to update the patch to apply to master. 

How about merging it to master? From previous posts, it seems there is
no copyright issue any more? 

-- 
William


[-- Attachment #2: after.png --]
[-- Type: image/png, Size: 105085 bytes --]

[-- Attachment #3: before.png --]
[-- Type: image/png, Size: 46868 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: gdb-mi.el.patch --]
[-- Type: text/x-diff, Size: 4449 bytes --]

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index ddccbe80e7..5732501513 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -4288,7 +4288,7 @@ gdb-select-frame
 ;; uses "-stack-list-locals --simple-values". Needs GDB 6.1 onwards.
 (def-gdb-trigger-and-handler
   gdb-invalidate-locals
-  (concat (gdb-current-context-command "-stack-list-locals")
+  (concat (gdb-current-context-command "-stack-list-variables")
           " --simple-values")
   gdb-locals-handler gdb-locals-handler-custom
   '(start update))
@@ -4299,6 +4299,48 @@ gdb-select-frame
  'gdb-locals-mode
  'gdb-invalidate-locals)
 
+
+;; Retrieve the values of all variables before invalidating locals.
+(def-gdb-trigger-and-handler
+  gdb-locals-values
+  (concat (gdb-current-context-command "-stack-list-variables")
+          " --all-values")
+  gdb-locals-values-handler gdb-locals-values-handler-custom
+  '(start update))
+
+(gdb-set-buffer-rules
+ 'gdb-locals-values-buffer
+ 'gdb-locals-values-buffer-name
+ 'gdb-locals-mode
+ 'gdb-locals-values)
+
+(defun gdb-locals-values-buffer-name ()
+  (gdb-current-context-buffer-name
+   (concat "local values of " (gdb-get-target-string))))
+
+(defcustom gdb-locals-simple-values-only nil
+  "Only display simple values in the Locals buffer."
+  :type 'boolean
+  :group 'gud
+  :version "28.1")
+
+(defcustom gdb-locals-value-limit 100
+  "Maximum length the value of a local variable is allowed to be."
+  :type 'integer
+  :group 'gud
+  :version "28.1")
+
+(defvar gdb-locals-values-table (make-hash-table :test #'equal)
+  "Mapping of local variable names to a string with their value.")
+
+(defun gdb-locals-values-handler-custom ()
+  "Store the values of local variables in `gdb-locals-value-map'."
+  (let ((locals-list (bindat-get-field (gdb-mi--partial-output) 'variables)))
+    (dolist (local locals-list)
+      (let ((name (bindat-get-field local 'name))
+            (value (bindat-get-field local 'value)))
+        (puthash name value gdb-locals-values-table)))))
+
 (defvar gdb-locals-watch-map
   (let ((map (make-sparse-keymap)))
     (suppress-keymap map)
@@ -4315,6 +4357,15 @@ gdb-edit-locals-map-1
     map)
   "Keymap to edit value of a simple data type local variable.")
 
+(defun gdb-locals-value-filter (value)
+  "Filter function for the local variable VALUE."
+  (let* ((no-nl (replace-regexp-in-string "\n" " " value))
+         (str (replace-regexp-in-string "[[:space:]]+" " " no-nl))
+         (limit gdb-locals-value-limit))
+    (if (>= (length str) limit)
+        (concat (substring str 0 limit) "...")
+      str)))
+
 (defun gdb-edit-locals-value (&optional event)
   "Assign a value to a variable displayed in the locals buffer."
   (interactive (list last-input-event))
@@ -4327,17 +4378,22 @@ gdb-edit-locals-value
       (gud-basic-call
        (concat  "-gdb-set variable " var " = " value)))))
 
-;; Don't display values of arrays or structures.
-;; These can be expanded using gud-watch.
+;; Complex data types are looked up in `gdb-locals-values-table'.
 (defun gdb-locals-handler-custom ()
-  (let ((locals-list (gdb-mi--field (gdb-mi--partial-output) 'locals))
+  "Handler to rebuild the local variables table buffer."
+  (let ((locals-list (bindat-get-field (gdb-mi--partial-output) 'variables))
         (table (make-gdb-table)))
     (dolist (local locals-list)
       (let ((name (gdb-mi--field local 'name))
             (value (gdb-mi--field local 'value))
             (type (gdb-mi--field local 'type)))
         (when (not value)
-          (setq value "<complex data type>"))
+          (setq value
+                (if gdb-locals-simple-values-only
+                    "<complex data type>"
+                  (gethash name gdb-locals-values-table "<unavailable>"))))
+        (setq value (gdb-locals-value-filter value))
+
         (if (or (not value)
                 (string-match "0x" value))
             (add-text-properties 0 (length name)
@@ -4860,6 +4916,8 @@ gdb-setup-windows
          (expand-file-name gdb-default-window-configuration-file
                            gdb-window-configuration-directory)))
     ;; Create default layout as before.
+    ;; Make sure that local values are updated before locals.
+    (gdb-get-buffer-create 'gdb-locals-values-buffer)
     (gdb-get-buffer-create 'gdb-locals-buffer)
     (gdb-get-buffer-create 'gdb-stack-buffer)
     (gdb-get-buffer-create 'gdb-breakpoints-buffer)

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2019-02-20 10:08 bug#34589: 26.1.91; GDB-MI Display Complex Data Types Gustaf Waldemarson
                   ` (3 preceding siblings ...)
  2022-03-06 20:44 ` William Xu
@ 2022-03-06 20:46 ` Weilin Xu
  2022-03-06 21:56   ` Lars Ingebrigtsen
  4 siblings, 1 reply; 27+ messages in thread
From: Weilin Xu @ 2022-03-06 20:46 UTC (permalink / raw)
  To: 34589


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

This patch really makes gdb "Locals" buffer finally useful.

I did a simple test, you can compare the results as shown in attached
screenshots. I have to update the patch to apply to master.

How about merging it to master? From previous posts, it seems there is
no copyright issue any more?

-- 
William

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

[-- Attachment #2: before.png --]
[-- Type: image/png, Size: 46868 bytes --]

[-- Attachment #3: after.png --]
[-- Type: image/png, Size: 105085 bytes --]

[-- Attachment #4: gdb-mi.el.patch --]
[-- Type: application/octet-stream, Size: 4449 bytes --]

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index ddccbe80e7..5732501513 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -4288,7 +4288,7 @@ gdb-select-frame
 ;; uses "-stack-list-locals --simple-values". Needs GDB 6.1 onwards.
 (def-gdb-trigger-and-handler
   gdb-invalidate-locals
-  (concat (gdb-current-context-command "-stack-list-locals")
+  (concat (gdb-current-context-command "-stack-list-variables")
           " --simple-values")
   gdb-locals-handler gdb-locals-handler-custom
   '(start update))
@@ -4299,6 +4299,48 @@ gdb-select-frame
  'gdb-locals-mode
  'gdb-invalidate-locals)
 
+
+;; Retrieve the values of all variables before invalidating locals.
+(def-gdb-trigger-and-handler
+  gdb-locals-values
+  (concat (gdb-current-context-command "-stack-list-variables")
+          " --all-values")
+  gdb-locals-values-handler gdb-locals-values-handler-custom
+  '(start update))
+
+(gdb-set-buffer-rules
+ 'gdb-locals-values-buffer
+ 'gdb-locals-values-buffer-name
+ 'gdb-locals-mode
+ 'gdb-locals-values)
+
+(defun gdb-locals-values-buffer-name ()
+  (gdb-current-context-buffer-name
+   (concat "local values of " (gdb-get-target-string))))
+
+(defcustom gdb-locals-simple-values-only nil
+  "Only display simple values in the Locals buffer."
+  :type 'boolean
+  :group 'gud
+  :version "28.1")
+
+(defcustom gdb-locals-value-limit 100
+  "Maximum length the value of a local variable is allowed to be."
+  :type 'integer
+  :group 'gud
+  :version "28.1")
+
+(defvar gdb-locals-values-table (make-hash-table :test #'equal)
+  "Mapping of local variable names to a string with their value.")
+
+(defun gdb-locals-values-handler-custom ()
+  "Store the values of local variables in `gdb-locals-value-map'."
+  (let ((locals-list (bindat-get-field (gdb-mi--partial-output) 'variables)))
+    (dolist (local locals-list)
+      (let ((name (bindat-get-field local 'name))
+            (value (bindat-get-field local 'value)))
+        (puthash name value gdb-locals-values-table)))))
+
 (defvar gdb-locals-watch-map
   (let ((map (make-sparse-keymap)))
     (suppress-keymap map)
@@ -4315,6 +4357,15 @@ gdb-edit-locals-map-1
     map)
   "Keymap to edit value of a simple data type local variable.")
 
+(defun gdb-locals-value-filter (value)
+  "Filter function for the local variable VALUE."
+  (let* ((no-nl (replace-regexp-in-string "\n" " " value))
+         (str (replace-regexp-in-string "[[:space:]]+" " " no-nl))
+         (limit gdb-locals-value-limit))
+    (if (>= (length str) limit)
+        (concat (substring str 0 limit) "...")
+      str)))
+
 (defun gdb-edit-locals-value (&optional event)
   "Assign a value to a variable displayed in the locals buffer."
   (interactive (list last-input-event))
@@ -4327,17 +4378,22 @@ gdb-edit-locals-value
       (gud-basic-call
        (concat  "-gdb-set variable " var " = " value)))))
 
-;; Don't display values of arrays or structures.
-;; These can be expanded using gud-watch.
+;; Complex data types are looked up in `gdb-locals-values-table'.
 (defun gdb-locals-handler-custom ()
-  (let ((locals-list (gdb-mi--field (gdb-mi--partial-output) 'locals))
+  "Handler to rebuild the local variables table buffer."
+  (let ((locals-list (bindat-get-field (gdb-mi--partial-output) 'variables))
         (table (make-gdb-table)))
     (dolist (local locals-list)
       (let ((name (gdb-mi--field local 'name))
             (value (gdb-mi--field local 'value))
             (type (gdb-mi--field local 'type)))
         (when (not value)
-          (setq value "<complex data type>"))
+          (setq value
+                (if gdb-locals-simple-values-only
+                    "<complex data type>"
+                  (gethash name gdb-locals-values-table "<unavailable>"))))
+        (setq value (gdb-locals-value-filter value))
+
         (if (or (not value)
                 (string-match "0x" value))
             (add-text-properties 0 (length name)
@@ -4860,6 +4916,8 @@ gdb-setup-windows
          (expand-file-name gdb-default-window-configuration-file
                            gdb-window-configuration-directory)))
     ;; Create default layout as before.
+    ;; Make sure that local values are updated before locals.
+    (gdb-get-buffer-create 'gdb-locals-values-buffer)
     (gdb-get-buffer-create 'gdb-locals-buffer)
     (gdb-get-buffer-create 'gdb-stack-buffer)
     (gdb-get-buffer-create 'gdb-breakpoints-buffer)

^ permalink raw reply related	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2022-03-06 20:46 ` Weilin Xu
@ 2022-03-06 21:56   ` Lars Ingebrigtsen
  2022-03-06 22:33     ` William Xu
  0 siblings, 1 reply; 27+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-06 21:56 UTC (permalink / raw)
  To: Weilin Xu; +Cc: 34589

Weilin Xu <xu.weilin.xwl@gmail.com> writes:

> This patch really makes gdb "Locals" buffer finally useful.
>
> I did a simple test, you can compare the results as shown in attached
> screenshots. I have to update the patch to apply to master. 
>
> How about merging it to master? From previous posts, it seems there is
> no copyright issue any more? 

Thanks for testing the patches (and fixing up bits).  I've now pushed
them to Emacs 29.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2022-03-06 21:56   ` Lars Ingebrigtsen
@ 2022-03-06 22:33     ` William Xu
  2022-03-06 23:02       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 27+ messages in thread
From: William Xu @ 2022-03-06 22:33 UTC (permalink / raw)
  To: 34589

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Thanks for testing the patches (and fixing up bits).  I've now pushed
> them to Emacs 29.

Thanks. One more thing I forget, is that `bindat' needs to be explictly
required in gdb-mi.el:

    (require 'bindat)

Because of usage of bindat-get-field.


P.S. Is there an easy way in Gnus to reply to an old bug like this one?
I saw I sent multiple duplicate messages.. Sorry about that. 

-- 
William






^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2022-03-06 22:33     ` William Xu
@ 2022-03-06 23:02       ` Lars Ingebrigtsen
  2022-03-07  9:27         ` William Xu
  0 siblings, 1 reply; 27+ messages in thread
From: Lars Ingebrigtsen @ 2022-03-06 23:02 UTC (permalink / raw)
  To: William Xu; +Cc: 34589

William Xu <william.xwl@gmail.com> writes:

> Thanks. One more thing I forget, is that `bindat' needs to be explictly
> required in gdb-mi.el:
>
>     (require 'bindat)
>
> Because of usage of bindat-get-field.

Yes, I put that in before pushing.  😀

> P.S. Is there an easy way in Gnus to reply to an old bug like this one?
> I saw I sent multiple duplicate messages.. Sorry about that. 

No prob.  And you can read old bug threads with
`gnus-read-ephemeral-emacs-bug-group', or use the debbugs-gnu package.
(And then just hit `S W' to reply.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 27+ messages in thread

* bug#34589: 26.1.91; GDB-MI Display Complex Data Types
  2022-03-06 23:02       ` Lars Ingebrigtsen
@ 2022-03-07  9:27         ` William Xu
  0 siblings, 0 replies; 27+ messages in thread
From: William Xu @ 2022-03-07  9:27 UTC (permalink / raw)
  To: 34589

Lars Ingebrigtsen <larsi@gnus.org> writes:

> And you can read old bug threads with
> `gnus-read-ephemeral-emacs-bug-group',

Awesome! Thanks. 

-- 
William






^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2022-03-07  9:27 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-20 10:08 bug#34589: 26.1.91; GDB-MI Display Complex Data Types Gustaf Waldemarson
2019-02-20 17:16 ` Eli Zaretskii
2019-02-21 13:42   ` Gustaf Waldemarson
2019-02-23  9:40     ` Eli Zaretskii
2019-02-23 10:01       ` Gustaf Waldemarson
2019-02-23 10:36         ` Eli Zaretskii
2019-02-28 16:05           ` Gustaf Waldemarson
2019-02-28 17:24             ` Andrew W. Nosenko
2019-02-28 17:58             ` Eli Zaretskii
2019-03-01  3:57             ` Richard Stallman
2019-03-02  3:28             ` Richard Stallman
2019-03-03 20:32               ` Gustaf Waldemarson
2019-03-04  3:30                 ` Eli Zaretskii
2019-03-04  8:05                   ` Gustaf Waldemarson
2019-03-08  9:06                     ` Eli Zaretskii
2019-11-05 10:05                       ` Gustaf Waldemarson
2020-09-30 18:08                         ` Lars Ingebrigtsen
2020-09-30 18:30                           ` Eli Zaretskii
2020-04-15 14:54 ` Yuan Fu
2020-04-15 15:05   ` Eli Zaretskii
2022-03-06 20:39 ` William Xu
2022-03-06 20:44 ` William Xu
2022-03-06 20:46 ` Weilin Xu
2022-03-06 21:56   ` Lars Ingebrigtsen
2022-03-06 22:33     ` William Xu
2022-03-06 23:02       ` Lars Ingebrigtsen
2022-03-07  9:27         ` William Xu

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).