Commit graph

224 commits

Author SHA1 Message Date
Dmitry Dzhus
4a31122c33 * progmodes/gud.el (gud-stop-subjob, gud-menu-map): Respect GDB
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.
2009-08-04 15:07:23 +00:00
Dmitry Dzhus
4a6bcbc602 (gdb-rules-name-maker, gdb-rules-buffer-mode)
(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.
2009-08-04 14:40:33 +00:00
Dmitry Dzhus
9e919ceebc (gdb-pc-address): Removed unused variable.
(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.
2009-08-04 14:19:08 +00:00
Dmitry Dzhus
e70866834e (gdb-add-pending, gdb-pending-p, gdb-delete-pending): Macros to
handle pending triggers.
(gdb-threads-mode-map, def-gdb-thread-buffer-command)
(def-gdb-thread-buffer-simple-command)
(gdb-display-stack-for-thread, gdb-display-locals-for-thread)
(gdb-display-registers-for-thread, gdb-frame-stack-for-thread)
(gdb-frame-locals-for-thread, gdb-frame-registers-for-thread): New
commands which show buffers bound to thread.
(gdb-stack-list-locals-regexp): Removed unused regexp.
2009-08-04 13:27:21 +00:00
Dmitry Dzhus
a5c9f54014 (gdb-get-buffer, gdb-get-buffer-create, gdb-init-1)
(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.
2009-08-04 13:19:02 +00:00
Dmitry Dzhus
20f12ed882 * progmodes/gdb-mi.el (gdb-breakpoints-buffer-name)
(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.
2009-08-04 13:11:06 +00:00
Dmitry Dzhus
98bf849413 (gdb-thread-number): New variable.
(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.
2009-08-04 12:46:26 +00:00
Dmitry Dzhus
35edc6c64f (gdb-place-breakpoints): Use full path when setting breakpoints. 2009-07-30 08:04:13 +00:00
Dmitry Dzhus
592ccae036 (gdb-goto-breakpoint): Use full path when setting breakpoints. 2009-07-29 09:14:13 +00:00
Nick Roberts
c055a7dc57 (speedbar-frame): Declare to avoid compiler
warning.
(gdb-breakpoints-header): Move forward to avoid compiler warning.
(gdb-make-header-line-mouse-map): Remove duplicate definition.
2009-07-18 10:37:39 +00:00
Dmitry Dzhus
bfc99364d9 (json-partial-output): Fix broken GDB/MI output in -break-info command
(Emacs bug #3794).
2009-07-14 08:40:58 +00:00
Nick Roberts
ab3c1ccf3d (gdb): Remove description of
gdb-use-separate-io-buffer.
(menu): Don't allow toggling of or enable
gdb-use-separate-io-buffer from menubar.
2009-07-08 04:51:57 +00:00
Nick Roberts
ca8eb1bd47 (gdb-init-1): Move sending
-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.
2009-07-08 00:41:00 +00:00
Dmitry Dzhus
69a197a214 * progmodes/gdb-mi.el (gdb-input): Add trailing newline to command. 2009-07-07 20:10:05 +00:00
Dmitry Dzhus
e7006f272c * progmodes/gdb-mi.el (gdb-breakpoints-list-handler-custom): y/n
instead of on/off; do not highlight breakpoints without line
information.
2009-07-07 19:54:08 +00:00
Dmitry Dzhus
17c1380b1f * progmodes/gdb-mi.el (gdb-stack-list-frames-handler): Rewritten
without regexps.
2009-07-07 17:40:32 +00:00
Dmitry Dzhus
dc6b4519c8 * progmodes/gdb-mi.el (gdb-init-1): Disassembly buffer mode name
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.
2009-07-07 17:36:42 +00:00
Dmitry Dzhus
14340b25f4 * progmodes/gdb-mi.el (gdb-init-1): Set correct mode name for
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.
2009-07-07 17:22:26 +00:00
Dmitry Dzhus
28d67a53c5 gdb-mi.el: Now using bindat-get-field instead of fadr functions. 2009-07-07 17:04:51 +00:00
Dmitry Dzhus
0996385d0a Port memory buffer from gdb-ui.el
(gdb-memory-address): New variable which holds top address of
memory page shown in memory buffer
(gdb-memory-repeat-count, gdb-memory-format, gdb-memory-unit): New
customization variables.
New functions:
(gdb-display-memory-buffer, gdb-frame-memory-buffer): Functions to
display the memory buffer.
(gdb-memory-set-address, gdb-memory-set-repeat-count): Set memory
buffer display parameters.
(def-gdb-memory-format, gdb-memory-format-binary)
(gdb-memory-format-octal, gdb-memory-format-unsigned)
(gdb-memory-format-signed, gdb-memory-format-hexadecimal):
Functions for setting memory buffer format.
(gdb-memory-unit-word, gdb-memory-unit-halfword)
(gdb-memory-unit-giant, gdb-memory-unit-byte): Functions to set
unit size used in memory buffer.
(gdb-memory-show-next-page, gdb-memory-show-previous-page): Switch
to next/previous page of memory buffer.
2009-07-07 16:57:41 +00:00
Glenn Morris
cc80ccee1f Minor header format fixes.
(gud-remove, gud-break): Update declarations.
2009-06-23 07:34:28 +00:00
Miles Bader
a91a2316ad Add arch tagline 2009-06-23 06:44:04 +00:00
Nick Roberts
821ba844dc Pull further modified changes from Dmitry's repository (http://sphinx.net.ru/hg/gdb-mi/). 2009-06-22 10:57:52 +00:00
Nick Roberts
91239a5211 * progmodes/gdb-ui.el: Replace with ...
* progmodes/gdb-ui.el: ... this file.
* progmodes/gud.el: Modify for gdb-mi.el.
* fadr.el: New file.
2009-06-21 12:08:53 +00:00