Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0438ce91
Commit
0438ce91
authored
Apr 26, 2011
by
Daniel Colascione
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement debug-on-event
parent
8f91bf93
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
3 deletions
+58
-3
etc/ChangeLog
etc/ChangeLog
+5
-0
etc/DEBUG
etc/DEBUG
+5
-0
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/cus-start.el
lisp/cus-start.el
+5
-0
src/ChangeLog
src/ChangeLog
+8
-0
src/eval.c
src/eval.c
+1
-1
src/keyboard.c
src/keyboard.c
+29
-1
src/lisp.h
src/lisp.h
+1
-1
No files found.
etc/ChangeLog
View file @
0438ce91
2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
* Document debug-on-event default behavior and utility for
debugging.
2011-04-22 Noah Friedman <friedman@splode.com>
* emacs-buffer.gdb: Add trailing underscores to appropriate member
...
...
etc/DEBUG
View file @
0438ce91
...
...
@@ -405,6 +405,11 @@ stepping, you will see where the loop starts and ends. Also, examine
the data being used in the loop and try to determine why the loop does
not exit when it should.
You can also trying sending Emacs SIGUSR2, which, if `debug-on-event'
has its default value, will cause Emacs to attempt to break it out of
its current loop and into the Lisp debugger. This feature is useful
when a C-level debugger is not conveniently available.
** If certain operations in Emacs are slower than they used to be, here
is some advice for how to find out why.
...
...
lisp/ChangeLog
View file @
0438ce91
2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
* cus-start.el (all): Define customization for debug-on-event.
2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
* subr.el (shell-quote-argument): Escape correctly under Windows.
...
...
lisp/cus-start.el
View file @
0438ce91
...
...
@@ -259,6 +259,11 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(suggest-key-bindings keyboard (choice (const :tag "
off
" nil)
(integer :tag "
time
" 2)
(other :tag "
on
")))
(debug-on-event debug
(choice (const :tag "
None
" nil)
(const :tag "
When
sent
SIGUSR1
" sigusr1)
(const :tag "
When
sent
SIGUSR2
" sigusr2))
"
24.1
")
;; This is not good news because it will use the wrong
;; version-specific directories when you upgrade. We need
...
...
src/ChangeLog
View file @
0438ce91
2011-04-26 Daniel Colascione <dan.colascione@gmail.com>
* lisp.h (Qdebug): List symbol.
* eval.c (Qdebug): restore global linkage.
* keyboard.c (debug-on-event): New variable.
(handle_user_signal): Break into debugger when debug-on-event
matches the current signal symbol.
2011-04-25 Dan Nicolaescu <dann@ics.uci.edu>
* alloc.c (check_sblock, check_string_bytes)
...
...
src/eval.c
View file @
0438ce91
...
...
@@ -88,7 +88,7 @@ static Lisp_Object Qdebug_on_error;
static
Lisp_Object
Qdeclare
;
Lisp_Object
Qinternal_interpreter_environment
,
Qclosure
;
static
Lisp_Object
Qdebug
;
Lisp_Object
Qdebug
;
/* This holds either the symbol `run-hooks' or nil.
It is nil at an early stage of startup, and when Emacs
...
...
src/keyboard.c
View file @
0438ce91
...
...
@@ -7228,12 +7228,29 @@ handle_user_signal (int sig)
{
int old_errno = errno;
struct user_signal_info *p;
const char* special_event_name = NULL;
SIGNAL_THREAD_CHECK (sig);
if (SYMBOLP (Vdebug_on_event))
special_event_name = SDATA (SYMBOL_NAME (Vdebug_on_event));
for (p = user_signals; p; p = p->next)
if (p->sig == sig)
{
if (special_event_name &&
strcmp (special_event_name, p->name) == 0)
{
/* Enter the debugger in many ways. */
debug_on_next_call = 1;
debug_on_quit = 1;
Vquit_flag = Qt;
Vinhibit_quit = Qnil;
/* Eat the event. */
break;
}
p->npending++;
#ifdef SIGIO
if (interrupt_input)
...
...
@@ -12165,6 +12182,17 @@ text in the region before modifying the buffer. The next
`deactivate-mark' call uses this to set the window selection. */);
Vsaved_region_selection = Qnil;
DEFVAR_LISP ("debug-on-event",
Vdebug_on_event,
doc: /* Enter debugger on this event. When Emacs
receives the special event specifed by this variable, it will try to
break into the debugger as soon as possible instead of processing the
event normally through `special-event-map'.
Currently, the only supported values for this
variable are `sigusr1' and `sigusr2'. */);
Vdebug_on_event = intern_c_string ("sigusr2");
/* Create the initial keyboard. */
initial_kboard = (KBOARD *) xmalloc (sizeof (KBOARD));
init_kboard (initial_kboard);
...
...
src/lisp.h
View file @
0438ce91
...
...
@@ -2796,7 +2796,7 @@ extern void syms_of_lread (void);
/* Defined in eval.c. */
extern
Lisp_Object
Qautoload
,
Qexit
,
Qinteractive
,
Qcommandp
,
Qdefun
,
Qmacro
;
extern
Lisp_Object
Qinhibit_quit
,
Qclosure
;
extern
Lisp_Object
Qinhibit_quit
,
Qclosure
,
Qdebug
;
extern
Lisp_Object
Qand_rest
;
extern
Lisp_Object
Vautoload_queue
;
extern
Lisp_Object
Vsignaling_function
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment