(gdb-starting): Moved -data-list-register-names...
(gdb-stopped): ...here so it's sent when first thread stops.
(gdb-registers-handler-custom): Do nothing if register names are
unknown yet.
(gdb-place-breakpoints, gdb-get-location): Rewritten without
`goto-line'.
(gdb-invalidate-disassembly): Do not refresh upon receiving
'update signal. Instead, update all disassembly buffers only after
threads list.
(gdb-control-current-thread): Interactive setters for
`gdb-gud-control-all-threads' to use in menu.
(gdb-show-run-p): Show «Go» when process is not active.
(gud-tool-bar-map): Add non-stop/A,T indicator. Uses
gud/thread.xpm and gud/all.xpm.
(gdb-threads-mode-map): Don't assume breakpoints buffer is present.
(gdb-disassembly-handler-custom, gdb-stack-list-frames-custom)
(gdb-locals-handler-custom, gdb-registers-handler-custom): Thread
info in mode name.
(gdb-registers-mode-map): TAB to switch to locals.
(gdb-memory-set-address, def-gdb-set-positive-number)
(def-gdb-memory-format, def-gdb-memory-unit): Update memory buffer
after changing settings.
(gdb-invalidate-disassembly): Update when first shown.
(gdb-edit-locals-value): Fixed.
(gdb-registers-handler-custom): Print registers in right order and
allow changing register values (only for current thread yet).
(gdb-var-create-handler): Rewritten using JSON parser.
(gdb-propertize-header): Moved earlier.
(gdb-set-header): Removed to avoid duplication.
(gdb-thread-list-handler-custom, gdb-invalidate-disassembly):
Refresh disassembly buffers only after threads list have been
update.
(gdb-threads-header, gdb-registers-header): Per-buffer header line
variables.
(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)
Argument `key' renamed to `buffer-type'.
(gdb-current-context-buffer-name): Do not add thread info to
buffer name when no thread is selected.
(gdbmi-record-list, gdb-shell): Try to handle GDB `shell'
command (bug 3794).
(gdb-thread-selected): Handle `=thread-selected' notification.
(gdb-wait-for-pending): New macro to deal with congestion problems.
(gdb-breakpoints-list-handler-custom): Don't fail on pending
breakpoints.
(gdb-invalidate-disassembly): Use 'fullname instead of 'file. This
fixes problem similar to one described in bug 3947.
(gud-menu-map): More menu items.
(gdb-init-1): Reset `gdb-thread-number' to nil.
non-stop settings.
* progmodes/gdb-mi.el (gdb-thread-number): Initialize with nil.
(gdb-current-context-command): Do not append --thread if
`gdb-thread-number' is nil.
(gdb-running-threads-count, gdb-stopped-threads-count): New
variables.
(gdb-non-stop, gdb-gud-control-all-threads, gdb-switch-reasons)
(gdb-stopped-hooks, gdb-switch-when-another-stopped): New
customization options.
(gdb-gud-context-command, gdb-gud-context-call): New wrappers for
GUD commands.
(gdb): `gud-def' definitions changed to use `gdb-gud-context-call'
(gdb-init-1): Activate non-stop mode if `gdb-non-stop' is enabled.
(gdb-setq-thread-number, gdb-update-gud-running): New functions to
set `gdb-thread-number' and update `gud-running' properly.
(gdb-running): Update threads list when new threads appear.
(gdb-stopped): Support non-stop operation and new thread switching
logic.
(gdb-jsonify-buffer, gdb-json-read-buffer, gdb-json-string)
(gdb-json-partial-output): New set of JSON routines.
(def-gdb-auto-update-trigger): New `signal-list' optional
argument.
(gdb-thread-list-handler-custom): Update `gud-running',
`gdb-stopped-threads-count' and `gdb-running-threads-count'.
(def-gdb-thread-buffer-gdb-command, gdb-interrupt-thread)
(gdb-continue-thread, gdb-step-thread): New commands for fine
thread execution control.
(gud-menu-map): New menu items to switch non-stop options.
(gdb-reset): Cleanup `gdb-thread-position' overlay arrow marker.
(gdb-rules-update-trigger): Accessors for gdb-buffer-rules.
(def-gdb-auto-update-handler): New nopreserve optional argument.
(gdb-stack-list-frames-custom): Print stack from top to bottom.
(gdb-threads-list, gdb-breakpoints-list): New assoc lists.
(gdb-parent-mode): New mode to derive other GDB modes from.
(gdb-display-disassembly-for-thread)
(gdb-frame-disassembly-for-thread): New commands for threads
buffer.
(gdb-bind-function-to-buffer, gdb-add-subscriber)
(gdb-get-subscribers, gdb-emit-signal, gdb-buf-publisher)
(gdb-update): We now store all GDB buffers in a list so that they
can be updated by traversing a list instead of calling invalidate
triggers explicitly
(def-gdb-trigger-and-handler): New macro to define trigger-handler
pair for GDB buffer.
(gdb-stack-buffer-name): Add thread information.
(gdb-locals-buffer-name, gdb-registers-buffer-name)
(gdb-memory-buffer-name, gdb-stack-buffer-name): Do not switch
to (gud-comint-buffer) in *-buffer-name functions
because (gdb-get-target-string) already does that.
(gdb-locals-handler-custom, gdb-registers-handler-custom)
(gdb-changed-registers-handler): Rewritten without regexps.
(gdb-current-context-command): New macro which adds --thread
option to command.
(gdb-threads-mode-map): Select thread with SPC
(gdb-thread-list-handler-custom): Mark current thread with overlay
arrow. Synchronize GDB thread and Emacs thread.
(gdb-select-thread): New command which selects current thread.
(gdb-invalidate-frames, gdb-invalidate-locals)
(gdb-invalidate-registers): Use --thread option.
-data-list-register-names to ...
(gdb-starting): ... here because GDB 7.0 requires execution to
have started when using this MI command.
(gdb-set-header): New function to distinguish select and
unselected tabs in gdb buffers.
(gdb-propertize-header): New macro that uses gdb-set-header.
(gdb-breakpoints-header, gdb-locals-header): Use it.
may contain frame information, so `string-match' should be used.
(gdb-update): Disassembly is invalidated through
`gdb-get-selected-frame'.
(gdb-pad-string): New function to pad string with spaces.
(gdb-invalidate-disassembly): Invalidate only if the buffer
exists.
(gdb-disassembly-handler-custom): Column alignment.
(gdb-disassembly-place-breakpoints): Clear old breakpoints before
placing new ones.
(gdb-toggle-breakpoint, gdb-delete-breakpoint): Now work from the
end of line, too.
(gdb-frame-handler): Match convention to for disassembly buffer
mode name.
disassembly buffer.
(gdb-breakpoints-list-handler-custom): Replacement for
gdb-break-list-handler. Using real parser instead of regexps now.
(gdb-place-breakpoints): Replacement for gdb-break-list-custom.
Use gdb-breakpoints-list instead of parsing breakpoints buffer to
place breakpoints.
(def-gdb-memory-unit): A new macro to define gdb-memory-unit-..
functions.
(gdb-disassembly-handler-custom): Show overlay arrow.
(gdb-disassembly-place-breakpoints): Show breakpoints in
disassembly buffer.
(gdb-toggle-breakpoint, gdb-delete-breakpoint)
(gdb-goto-breakpoint): Using gdb-breakpoint text properties
instead of parsing breakpoints buffer.
Fixed old menu references in gud-menu-map.