unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: Breakpoint ignored.
Date: Sun, 18 Oct 2009 06:19:00 +0200	[thread overview]
Message-ID: <83hbtxgwqz.fsf@gnu.org> (raw)
In-Reply-To: <877hutz9zb.fsf@telefonica.net>

> From: Óscar_Fuentes <ofv@wanadoo.es>
> Date: Sun, 18 Oct 2009 04:55:52 +0200
> 
> C-h k á says `self-insert-command' is invoked, wich is a built-in
> function. So I follow the link to the source code to learn that the C
> function is Fself_insert_command, then invoke emacs and set a breakpoint
> on it, but gdb does not stop when a character is typed (and displayed),
> as if no breakpoint was active.
> 
> What I'm missing?

You are probably missing the fact that Emacs tries to optimize the
case of insertion of a single character.  See this part of keyboard.c:

	      else if (EQ (Vthis_command, Qself_insert_command)
		       /* Try this optimization only on char keystrokes.  */
		       && NATNUMP (last_command_event)
		       && CHAR_VALID_P (XFASTINT (last_command_event), 0))
		{
		  unsigned int c
		    = translate_char (Vtranslation_table_for_input,
				      XFASTINT (last_command_event));
		  int value;
		  if (NILP (Vexecuting_kbd_macro)
		      && !EQ (minibuf_window, selected_window))
		    {
		      if (!nonundocount || nonundocount >= 20)
			{
			  Fundo_boundary ();
			  nonundocount = 0;
			}
		      nonundocount++;
		    }

		  lose = ((XFASTINT (XWINDOW (selected_window)->last_modified)
			   < MODIFF)
			  || (XFASTINT (XWINDOW (selected_window)->last_overlay_modified)
			      < OVERLAY_MODIFF)
			  || (XFASTINT (XWINDOW (selected_window)->last_point)
			      != PT)
			  || MODIFF <= SAVE_MODIFF
			  || windows_or_buffers_changed
			  || !EQ (current_buffer->selective_display, Qnil)
			  || detect_input_pending ()
			  || !NILP (XWINDOW (selected_window)->column_number_displayed)
			  || !NILP (Vexecuting_kbd_macro));

		  value = internal_self_insert (c, 0);

		  if (value == 2)
		    nonundocount = 0;

                  frame_make_pointer_invisible ();

		  if (! NILP (Vpost_command_hook))
		    /* Put this before calling adjust_point_for_property
		       so it will only get called once in any case.  */
		    goto directly_done;

		  /* VALUE == 1 when AFTER-CHANGE functions are
		     installed which is the case most of the time
		     because FONT-LOCK installs one.  */
		  if (!lose && !value)
		    direct_output_for_insert (c);
		  goto directly_done;
		}





  reply	other threads:[~2009-10-18  4:19 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-18  2:55 Breakpoint ignored Óscar Fuentes
2009-10-18  4:19 ` Eli Zaretskii [this message]
2009-10-18 14:39   ` Stefan Monnier
2009-10-18 18:46     ` Óscar Fuentes
2009-10-19  2:39   ` Richard Stallman
2009-10-19  3:18     ` Stefan Monnier
2009-10-19  6:22       ` Miles Bader
2009-10-19 13:19         ` Stefan Monnier
2009-10-19 22:53         ` Richard Stallman
2009-10-20  0:59           ` David Kastrup
2009-10-20  1:44             ` Óscar Fuentes
2009-10-20  2:03               ` Stefan Monnier
2009-10-21  4:58             ` Richard Stallman
2009-10-19  3:35     ` Daniel Colascione
2009-10-19  9:20     ` Andreas Schwab
2009-10-19 13:21       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83hbtxgwqz.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).