1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 14:30:50 -08:00

* progmodes/gdb-mi.el (gdb-frame-number): Initialize with nil.

(gdb-overlay-arrow-position): Renamed to
`gdb-disassembly-position'.
(gdb-overlay-arrow-position, gdb-thread-position)
(gdb-disassembly-position): Declare variables.
(gdb-wait-for-pending): Function now.
(gdb-add-subscriber, gdb-delete-subscriber, gdb-get-subscribers)
(gdb-emit-signal, gdb-buf-publisher): Declare before first use so
compilation goes smoothly.
(gdb, gdb-non-stop, gdb-buffers): New customization groups.
(gdb-non-stop-setting): New customization setting which replaces
`gdb-non-stop' so changing it doesn't break active GDB session.
(gdb-stack-buffer-locations, gdb-stack-buffer-addresses)
(gdb-thread-buffer-verbose-names, gdb-thread-buffer-arguments)
(gdb-thread-buffer-locations, gdb-thread-buffer-addresses)
(gdb-show-threads-by-default): New customization options.
(gdb-buffer-type, gdb-buffer-shows-main-thread-p): New helper
routines.
(gdb-get-buffer-create): Send buffers update signal when they are
created.
(gdb-invalidate-locals, gdb-invalidate-registers)
(gdb-invalidate-breakpoints)
(gdb-invalidate-threads, gdb-invalidate-disassembly)
(gdb-invalidate-memory): Accept update signal.
(gdb-current-context-command): Use --frame option.
(gdb-update-gud-running, gdb-running, gdb-setq-thread-number):
Implement `gdb-frame-number' selection logic.
(gdb-show-run-p, gdb-show-stop-p): Helper functions which decide
whether to show GUD toolbar buttons.
(gdb-thread-exited): Unselect current thread when it exits.
(gdb-stopped): Typo fixed (now really runs `gdb-stopped-hooks').
(gdb-mark-line): Routine which sets overlay arrow or inverses
video on fringeless displays.
(gdb-table, gdb-table-add-row, gdb-table-string): Structure used
to build aligned columns of data in GDB buffers and set text
properties line-by-line.
(gdb-invalidate-breakpoints)
(gdb-breakpoints-list-handler-custom)
(gdb-thread-list-handler-custom, gdb-disassembly-handler-custom)
(gdb-stack-list-frames-custom, gdb-locals-handler-custom)
(gdb-registers-handler-custom): Align data columns.
(gdb-locals-handler-custom): Now prints data like in variable
declarations.
(gdb-jump-to, gdb-file-button, gdb-insert-file-location-button):
Removed confusing buttons.
(gdb-invalidate-threads): Append --frame.
(gdb-threads-mode-map, gdb-breakpoints-mode-map): TAB to switch
between breakpoints/threads buffers.
(gdb-set-window-buffer): Now can ignore dedicated windows.
(gdb-propertize-header): Use `gdb-set-window-buffer'.
(def-gdb-thread-buffer-simple-command): Numerous typos fixed.
(def-gdb-thread-buffer-gud-command): Replaces
`def-gdb-thread-buffer-gdb-command' and uses standard GUD commands
for fine thread control.
(gdb-preempt-existing-or-display-buffer): New function used to
display bound buffers without breaking window layout.
(gdb-frame-location): Replaces `gdb-insert-frame-location'.
(gdb-select-frame): New version of `gdb-frames-select' which now
sets `gdb-frame-number' so commands may use --frame option instead
of inner debugger state.
(gdb-frame-handler): Do not set `gdb-frame-number'.
(gdb-threads-mode-map): Select threads with mouse.

(I forgot to include sources in previous commit)
This commit is contained in:
Dmitry Dzhus 2009-08-04 17:16:58 +00:00
parent 78b9fb289e
commit ad07fb8d75
2 changed files with 580 additions and 314 deletions

File diff suppressed because it is too large Load diff

View file

@ -133,6 +133,8 @@ Used to grey out relevant toolbar icons.")
(and (eq gud-minor-mode 'gdbmi) (and (eq gud-minor-mode 'gdbmi)
(> (car (window-fringes)) 0))))) (> (car (window-fringes)) 0)))))
(declare-function gdb-gud-context-call "gdb-mi.el")
(defun gud-stop-subjob () (defun gud-stop-subjob ()
(interactive) (interactive)
(with-current-buffer gud-comint-buffer (with-current-buffer gud-comint-buffer
@ -160,21 +162,10 @@ Used to grey out relevant toolbar icons.")
:visible (memq gud-minor-mode '(gdbmi gdb dbx jdb))) :visible (memq gud-minor-mode '(gdbmi gdb dbx jdb)))
([go] menu-item (if gdb-active-process "Continue" "Run") gud-go ([go] menu-item (if gdb-active-process "Continue" "Run") gud-go
:visible (and (eq gud-minor-mode 'gdbmi) :visible (and (eq gud-minor-mode 'gdbmi)
(or (and (or (gdb-show-run-p)))
(not gdb-gud-control-all-threads)
(not gdb-non-stop))
(not gud-running))
(and gdb-gud-control-all-threads
(> gdb-stopped-threads-count 0)))))
([stop] menu-item "Stop" gud-stop-subjob ([stop] menu-item "Stop" gud-stop-subjob
:visible (or (not (memq gud-minor-mode '(gdbmi pdb))) :visible (or (not (memq gud-minor-mode '(gdbmi pdb)))
(and (eq gud-minor-mode 'gdbmi) (gdb-show-stop-p)))
(or (and (or
(not gdb-gud-control-all-threads)
(not gdb-non-stop))
gud-running)
(and gdb-gud-control-all-threads
(> gdb-running-threads-count 0))))))
([until] menu-item "Continue to selection" gud-until ([until] menu-item "Continue to selection" gud-until
:enable (not gud-running) :enable (not gud-running)
:visible (and (memq gud-minor-mode '(gdbmi gdb perldb)) :visible (and (memq gud-minor-mode '(gdbmi gdb perldb))
@ -262,21 +253,11 @@ Used to grey out relevant toolbar icons.")
([menu-bar go] menu-item ([menu-bar go] menu-item
,(propertize " go " 'face 'font-lock-doc-face) gud-go ,(propertize " go " 'face 'font-lock-doc-face) gud-go
:visible (and (eq gud-minor-mode 'gdbmi) :visible (and (eq gud-minor-mode 'gdbmi)
(or (and (or (gdb-show-run-p)))
(not gdb-gud-control-all-threads)
(not gdb-non-stop))
(not gud-running))
(and gdb-gud-control-all-threads
(> gdb-stopped-threads-count 0)))))
([menu-bar stop] menu-item ([menu-bar stop] menu-item
,(propertize "stop" 'face 'font-lock-doc-face) gud-stop-subjob ,(propertize "stop" 'face 'font-lock-doc-face) gud-stop-subjob
:visible (or (and (eq gud-minor-mode 'gdbmi) :visible (or (and (eq gud-minor-mode 'gdbmi)
(or (and (or (gdb-show-stop-p))
(not gdb-gud-control-all-threads)
(not gdb-non-stop))
gud-running)
(and gdb-gud-control-all-threads
(> gdb-running-threads-count 0))))
(not (eq gud-minor-mode 'gdbmi)))) (not (eq gud-minor-mode 'gdbmi))))
([menu-bar print] ([menu-bar print]
. (,(propertize "print" 'face 'font-lock-doc-face) . gud-print)) . (,(propertize "print" 'face 'font-lock-doc-face) . gud-print))