0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

120 Commits

Author SHA1 Message Date
Ubaldo Tiberi
ae1c8b790b
patch 9.1.0878: termdebug: cannot enable DEBUG mode
Problem:  termdebug: cannot enable DEBUG mode
Solution: Allow to specify DEBUG mode (Ubaldo Tiberi)

closes: #16080

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 22:32:30 +01:00
Ella Moss
5e7f43b6ac
runtime(termdebug): allow to use decimal signs
closes: #16011

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ella Moss <ella.moss@utah.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-09 11:32:15 +01:00
Peter Wolf
8f1d09828a
patch 9.1.0817: termdebug: cannot evaluate expr in a popup
Problem:  termdebug: cannot evaluate expr in a popup
Solution: enhance termdebug plugin and allow to evaluate expressions in
          a popup window, add a unit test (Peter Wolf).

fixes: #15877
closes: #15933

Signed-off-by: Peter Wolf <pwolf2310@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-27 21:51:14 +01:00
Ubaldo Tiberi
bbeb38db4e
runtime(termdebug): Fix wrong test for balloon feature
fixes: #15359
closes: #15487

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 14:41:02 +02:00
Christian Brabandt
2979cfc262
patch 9.1.0613: tests: termdebug test may fail and leave file around
Problem:  tests: termdebug test may fail and leave temp file around
          (Dominique Pellé)
Solution: only run balloon_show() if the function exists, validate
          termdebug is running using the g: termdebug_is_running var,
          use defer to delete temporary files

fixes: #15334

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-24 21:41:55 +02:00
Ubaldo Tiberi
a90b0b4ba2
patch 9.1.0607: termdebug: uses inconsistent style
Problem:  termdebug: uses inconsistent style
Solution: termdebug: deprecate numeric values for v:true/false,
          fix white space style in the plugin
          (Ubaldo Tiberi)

closes: #15304

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-20 12:06:07 +02:00
zeertzjq
aef6179bcf
patch 9.1.0599: Termdebug: still get E1023 when specifying arguments
Problem:  Termdebug: still get E1023 when specifying arguments and using
          a prompt buffer.
Solution: Use empty() instead of len().  Add a test.  Fix wrong order of
          arguments to assert_equal() in Test_termdebug_basic().
          (zeertzjq)

closes: #15288

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-18 20:35:42 +02:00
Ubaldo Tiberi
2736cc725d
runtime(termdebug): gdb file/folder check is now performed only in CWD.
closes: #15268

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 20:16:02 +02:00
Ubaldo Tiberi
27f53346a3
runtime(termdebug): quote filename arguments using double quotes
closes: #15270

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 20:15:07 +02:00
Ubaldo Tiberi
c3837a46ff
runtime(termdebug): fix a few issues
Fix a few minor issues:
1. filename with whitespaces issue should be fixed now, fixes: #12357
2. ":Termdebug args" should work now, fixes: #15254

closes: #15261

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
2024-07-14 16:58:32 +02:00
Ubaldo Tiberi
e54fd3f7d8
runtime(termdebug): Add Deprecation warnings
closes: #15091

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 17:14:03 +02:00
Ubaldo Tiberi
225d4d9212
runtime(termdebug): Refactored StartDebug_term and EndDebug functions
- Functions are way too long. Readability and maintainability should
be slightly improved.

- Some variables are re-assigned to their initial value at teardown.
This should not be needed since all internal variables are
re-initialized at startup of every Termdebug session.

closes: #15086

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-23 17:25:05 +02:00
Yinzuo Jiang
549ecc8636
runtime(termdebug): Change some variables to Enums
Problem:  The types of some script variables in Termdebug
          can be changed for readability
Solution: Change the type of some vars from string to `enum`
          (Yinzuo Jiang)

closes: #15068

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-22 16:28:19 +02:00
Ubaldo Tiberi
f7f8f0b76d
patch 9.1.0508: termdebug plugin can be further improved
Problem:  termdebug plugin can be further improved
Solution: add sanity-check, timeout config, change vars to bool
          update docs, add more tests (Ubaldo Tiberi)

fixes: #15061
closes: #15057

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-20 22:24:26 +02:00
Ubaldo Tiberi
46f2823807
patch 9.1.0501: too complicated mapping restore in termdebug
Problem:  too complicated mapping restore in termdebug
Solution: simplify unmapping logic, add a few more tests
          (Ubaldo Tiberi)

closes: #15046

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 19:50:32 +02:00
Ubaldo Tiberi
a48637c105
patch 9.1.0497: termdebug can be further improved
Problem:  termdebug can be further improved
Solution: refactor save/restore, update docs,
          add a new save/restore test (Ubaldo Tiberi)

closes: #15032

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 20:24:54 +02:00
shane.xb.qian
a5af73ae34
runtime(termdebug): properly check mapping variables using null_dict
closes: #15013

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 16:44:53 +02:00
shane.xb.qian
f127dce188
runtime(termdebug): using wrong type for PlaceSign()
Make sure to convert them to numbers.

fixes: #14994
closes: #15015

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 08:37:23 +02:00
Damien Riegel
17e702a51a
runtime(termdebug): make TermDebugSendCommand() a global function again
TermDebugSendCommand lost it's global visibility when converted to
vim9script. Restore it.

Fixes: 23f29ffc6427 ("runtime(termdebug): convert termdebug plugin to
       Vim9 script")
closes: #14997

Signed-off-by: Damien Riegel <damien@riegel.io>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:42:35 +02:00
Damien Riegel
fce324f557
runtime(termdebug): close all buffers in the same way
For ASM and Variables buffer, check were done to make sure they existed
before attempting to close them, but not for debugged program or gdb
communication. The debugged program window is a user-facing one and
user might close it manually, so it's better to check if it exists.

Signed-off-by: Damien Riegel <damien@riegel.io>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:41:36 +02:00
Ubaldo Tiberi
ef8eab86e2
patch 9.1.0482: termdebug plugin needs more love
Problem:  termdebug plugin needs more love
Solution: start with some more Vim9 refactoring
          to improve maintenance and readability
          (Ubaldo Tiberi)

List of Changes and the Reasoning Behind Them:

1) Introduction of InitScriptVariables() Function:

Reasoning: This function has been introduced to ensure that when you open and
close Termdebug, and then open it again, there are no leftover script variable
values from the previous session. Leftover values could potentially cause
issues. The goal is for each Termdebug session to be independent of previous
sessions. At startup, all script variables are initialized. The only exception
is g:termdebug_loaded located at the very beginning of the script to prevent
sourcing the script twice. The variables are declared at script level and
defined in InitScriptVariables().

2) More Descriptive Variable Names:

Reasoning: The names of variables have been made more comprehensive. Almost
every Termdebug buffer now has a variable to indicate its name and another
variable to indicate its number, improving code readability and
maintainability. Due to the latest discussion around the &mousemodel option
save/restore mechanism, perhaps some other variables shall be prepended with
saved_.

3) Consistent Naming for GDB Terminal Buffers:

Reasoning: The name of the GDB terminal buffer now matches the name of the GDB
program being used, e.g., 'gdb', 'mygdb', 'arm-eabi-none-gdb', etc. This
ensures clarity and consistency in identifying buffers.

4) Other minor improvements:
Moved EchoErr() on top, added another test, some refactoring, mainly changed
several 0 and 1 to true and false

closes: #14980

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 19:23:07 +02:00
Yegappan Lakshmanan
83d0028026
runtime(termdebug): Use string interpolation instead of string concat
closes: #14972

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-12 20:37:05 +02:00
Yegappan Lakshmanan
971378eed9
runtime(termdebug): remove line-continuation characters
Those are no longer needed for Vim9.

related: #14961

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:17:36 +02:00
Ernie Rael
dfc21db0b0
runtime(termdebug): fix mousemodel restoration by comparing against null_string
closes: #14951

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 18:12:07 +02:00
laburnumT
477402ecf9
runtime(termdebug): Fix saved_mousemodel check
Fix issue introduced by 23f29ffc64276dd790581f98b86a0a6435b7eb22 where
saved_mousemodel is introduced as a variable, so the exists check will
always be true.

Move to check the value of saved_mousemodel instead.

closes: #14946

Signed-off-by: laburnumT <laburnumtec@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 18:38:37 +02:00
Yegappan Lakshmanan
03a3df15ca
runtime(termdebug: Fix errors in using the latest termdebug.vim
closes: #14941

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 16:42:45 +02:00
Christian Brabandt
ae4641d68e
runtime(termdebug): Fix wrong email address
related: #14903

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 22:24:24 +02:00
Ubaldo Tiberi
23f29ffc64
runtime(termdebug): convert termdebug plugin to Vim9 script
closes: #14903

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 21:37:53 +02:00
Ubaldo Tiberi
62ccaa60d5
runtime(termdebug): check for gdb file/dir before using as buffer name
Add test so that this doesn't regress.

fixes: #12718
closes: #14792

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-21 23:33:03 +02:00
Mihai Ciuraru
d3c0ff5d5a
runtime(termdebug): allow multibyte characters as breakpoint signs (#14274)
Allow multibyte characters as termdebug signs using slice() function

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Mihai Ciuraru <mihai.ciuraru@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-24 09:11:06 +01:00
iam28th
323dda1484
runtime(termdebug): add Tbreak command
closes: #13656

Signed-off-by: iam28th <artyom28th@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:33:43 +01:00
Shane-XB-Qian
2dd613f57b
runtime(termdebug): improve the breakpoint sign label (#13525)
// related #12589
// that should be the last chat (I) with Bram, r.i.p

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 16:53:39 +01:00
shane.xb.qian
ca48202b6f
runtime(termdebug): improve window handling, shorten var types
closes #13474

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 22:03:26 +01:00
shane.xb.qian
7fbbd7fdc6
runtime(termdebug): handle buffer-local mappings properly
closes: #13475

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 21:46:30 +01:00
Viktor Szépe
dbf749bd5a
runtime: Fix more typos (#13354)
* Fix more typos

* Fix typos in ignored runtime/ directory

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-16 09:53:37 +02:00
Sean Dewar
3d3a9152fa
runtime(termdebug): more termdebug fixes and improvements (#12892)
- Fix and attempt to simplify :Frame/:Up/:Down documentation.

- Accept a count instead for :Up/:Down/+/-.

- Update the "Last Change" dates.

- Fix a missing :let (caused an error if gdb fails to start).

- Wipe the prompt buffer when ending prompt mode (if it exists and wasn't wiped
  by the user first). Avoids issues with stale prompt buffers (such as E95 when
  starting a new prompt mode session).

- Kill the gdb job if the prompt buffer is unloaded (similar to what's done for
  a terminal buffer). Fixes not being able to start a new termdebug session if
  the buffer was wiped by the user, for example.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-23 17:14:49 +01:00
Simon Sobisch
2ae7ffe0bc
runtime(termdebug): add frame related commands (#12511)
implementing `:Frame`, `:Up` and `:Down'

partially fixing #10393

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-22 22:19:14 +02:00
Sean Dewar
a76f3221cd
runtime(termdebug): Fix various Termdebug issues (#12875)
* Fix some Termdebug issues after #12403

Problem: Cleanup for :Var and :Asm buffers did not apply to prompt mode, and
E86 was possible if they were hidden.
Solution: Move cleanup to s:EndDebugCommon. Check that the buffers exist before
switching.

* Fix :Asm in Termdebug prompt mode

Problem: :Asm does not work in prompt mode.
Solution: Make it work by handling disassembly-related messages properly.

The previous implementation depended on the typed or sent (via s:SendCommand())
"disassemble ..." message being visible to s:CommOutput(), but this was only
true for the terminal-based job.

A more robust solution would be to use GDB MI's -data-disassemble command. I may
implement this in a future PR.

* Fix Termdebug s:DecodeMessage escaping logic

Problem: Termdebug does not escape gdb messages properly.
Solution: Improve the logic. Do not mangle messages if they have inner escaped
quotes. Use line continuation comments properly.

Interestingly, due to the missing line continuation comments (`"\`), most of
these substitutions were ignored.

Presumably, this logic still isn't exact. For example, if a message ends in
`\\"`, the quote may be preserved, even though it's the `\` being escaped
(similar issues may exist for the other escapes). This may not be a problem in
practice, though.
2023-08-22 19:30:29 +01:00
Shane-XB-Qian
f6fb52b667
runtime(termdebug): refactor error printing (#12856)
// vs not act like exception from vim or termdebug

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
2023-08-20 20:07:49 +02:00
Shane-XB-Qian
19968fc4ec
runtime(termdebug): re-indent lines (#12857)
Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
2023-08-20 20:06:49 +02:00
laburnumT
9f29621415
Runtime(termdebug): Add support to view local and argument variables
closes: 12403

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-08-20 20:00:27 +02:00
skywind3000
e7d9ca2b3b patch 9.0.1671: Termdebug: error with more than 99 breakpoints
Problem:    Termdebug: error with more than 99 breakpoints.
Solution:   Use a different sign for breakpoint 100 and over. (closes #12589,
            closes #12588)
2023-06-28 23:27:28 +01:00
Christian Brabandt
c9a4a8ab28 patch 9.0.1663: Termdebug on MS-Windows: some file names are not recognized
Problem:    Termdebug on MS-Windows: some file names are not recognized.
Solution:   Do not always change \t and \n. (Christian Brabandt,
            closes #12565, closes #12560, closes #12550)
2023-06-24 20:02:25 +01:00
Christian Brabandt
279de0cd1f patch 9.0.1659: Termdebug: default highlight cleared if changing colorscheme
Problem:    Termdebug: default highlight cleared when changing colorscheme.
Solution:   Use a ColorScheme autocommand. (Christian Brabandt, closes #12566,
            closes #12555)
2023-06-24 14:20:36 +01:00
Bram Moolenaar
71badf9547 Update runtime files 2023-04-22 22:40:14 +01:00
Bram Moolenaar
d13166e788 Update runtime files 2022-11-18 21:49:57 +00:00
Bram Moolenaar
e1dc76fbf3 Update runtime files 2022-06-25 18:01:32 +01:00
Bram Moolenaar
8cc5b559f7 Update runtime files 2022-06-23 13:04:20 +01:00
Bram Moolenaar
c9a431c763 patch 8.2.5010: the terminal debugger uses various global variables
Problem:    The terminal debugger uses various global variables.
Solution:   Add a dictionary to hold the terminal debugger preferences.
2022-05-23 21:49:41 +01:00
Bram Moolenaar
921bde8880 Update runtime files, translations 2022-05-09 19:50:35 +01:00