From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Breakpoint ignored. Date: Sun, 18 Oct 2009 06:19:00 +0200 Message-ID: <83hbtxgwqz.fsf@gnu.org> References: <877hutz9zb.fsf@telefonica.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: QUOTED-PRINTABLE X-Trace: ger.gmane.org 1255839685 22318 80.91.229.12 (18 Oct 2009 04:21:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 18 Oct 2009 04:21:25 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?windows-1252?Q?=D3scar_Fuentes?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 18 06:21:16 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MzNGd-0002TT-Gn for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2009 06:21:15 +0200 Original-Received: from localhost ([127.0.0.1]:33732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzNGc-0006IB-L7 for ged-emacs-devel@m.gmane.org; Sun, 18 Oct 2009 00:21:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzNGY-0006Hp-3h for emacs-devel@gnu.org; Sun, 18 Oct 2009 00:21:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzNGS-0006Cg-OE for emacs-devel@gnu.org; Sun, 18 Oct 2009 00:21:08 -0400 Original-Received: from [199.232.76.173] (port=51481 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzNGS-0006CZ-GU for emacs-devel@gnu.org; Sun, 18 Oct 2009 00:21:04 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:41824) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MzNGS-0007dn-2O for emacs-devel@gnu.org; Sun, 18 Oct 2009 00:21:04 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0KRO00K00ZVC3300@a-mtaout22.012.net.il> for emacs-devel@gnu.org; Sun, 18 Oct 2009 06:21:03 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.70.117.47]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KRP00HBR0322O70@a-mtaout22.012.net.il>; Sun, 18 Oct 2009 06:21:03 +0200 (IST) In-reply-to: <877hutz9zb.fsf@telefonica.net> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:116221 Archived-At: > From: =D3scar_Fuentes > Date: Sun, 18 Oct 2009 04:55:52 +0200 >=20 > C-h k =E1 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 break= point > on it, but gdb does not stop when a character is typed (and display= ed), > as if no breakpoint was active. >=20 > 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= : =09 else if (EQ (Vthis_command, Qself_insert_command) =09=09 /* Try this optimization only on char keystrokes. */ =09=09 && NATNUMP (last_command_event) =09=09 && CHAR_VALID_P (XFASTINT (last_command_event), 0)) =09=09{ =09=09 unsigned int c =09=09 =3D translate_char (Vtranslation_table_for_input, =09=09=09=09 XFASTINT (last_command_event)); =09=09 int value; =09=09 if (NILP (Vexecuting_kbd_macro) =09=09 && !EQ (minibuf_window, selected_window)) =09=09 { =09=09 if (!nonundocount || nonundocount >=3D 20) =09=09=09{ =09=09=09 Fundo_boundary (); =09=09=09 nonundocount =3D 0; =09=09=09} =09=09 nonundocount++; =09=09 } =09=09 lose =3D ((XFASTINT (XWINDOW (selected_window)->last_modified= ) =09=09=09 < MODIFF) =09=09=09 || (XFASTINT (XWINDOW (selected_window)->last_overlay_modi= fied) =09=09=09 < OVERLAY_MODIFF) =09=09=09 || (XFASTINT (XWINDOW (selected_window)->last_point) =09=09=09 !=3D PT) =09=09=09 || MODIFF <=3D SAVE_MODIFF =09=09=09 || windows_or_buffers_changed =09=09=09 || !EQ (current_buffer->selective_display, Qnil) =09=09=09 || detect_input_pending () =09=09=09 || !NILP (XWINDOW (selected_window)->column_number_display= ed) =09=09=09 || !NILP (Vexecuting_kbd_macro)); =09=09 value =3D internal_self_insert (c, 0); =09=09 if (value =3D=3D 2) =09=09 nonundocount =3D 0; frame_make_pointer_invisible (); =09=09 if (! NILP (Vpost_command_hook)) =09=09 /* Put this before calling adjust_point_for_property =09=09 so it will only get called once in any case. */ =09=09 goto directly_done; =09=09 /* VALUE =3D=3D 1 when AFTER-CHANGE functions are =09=09 installed which is the case most of the time =09=09 because FONT-LOCK installs one. */ =09=09 if (!lose && !value) =09=09 direct_output_for_insert (c); =09=09 goto directly_done; =09=09}