diff options
| author | Yuan Fu | 2019-10-07 18:47:54 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2020-01-31 11:39:12 +0200 |
| commit | 2b1e18ae852c1490dfa22adc71f7582a1258da60 (patch) | |
| tree | a32d5a5e57cebf8f7c86828a99db7423a15e2bf8 | |
| parent | baceb8e84d350bd8f981ff8289381ec55887c970 (diff) | |
| download | emacs-2b1e18ae852c1490dfa22adc71f7582a1258da60.tar.gz emacs-2b1e18ae852c1490dfa22adc71f7582a1258da60.zip | |
Protect against errors in gdb-mi.el handlers
* lisp/progmodes/gdb-mi.el (gdb-handle-reply): Handle errors
in 'handler-function' so the cleanup code after it runs
safely. (Bug#39178)
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 2978d4a7672..4b0fd66c7ed 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -324,7 +324,10 @@ in `gdb-handler-list' and clears all pending handlers invalidated | |||
| 324 | by the reception of this reply." | 324 | by the reception of this reply." |
| 325 | (let ((handler-function (gdb-get-handler-function token-number))) | 325 | (let ((handler-function (gdb-get-handler-function token-number))) |
| 326 | (when handler-function | 326 | (when handler-function |
| 327 | (funcall handler-function) | 327 | (condition-case err |
| 328 | ;; protect against errors in handler-function | ||
| 329 | (funcall handler-function) | ||
| 330 | (error (message (error-message-string err)))) | ||
| 328 | (gdb-delete-handler token-number)))) | 331 | (gdb-delete-handler token-number)))) |
| 329 | 332 | ||
| 330 | (defun gdb-remove-all-pending-triggers () | 333 | (defun gdb-remove-all-pending-triggers () |