redknight@jetstar:~/git/emacs/src$ gdb bootstrap-emacs GNU gdb (GDB) 7.4.1-debian Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /home/redknight/git/emacs/src/bootstrap-emacs...done. SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] DISPLAY = :0 TERM = dumb Breakpoint 1 at 0x812e7a0: file emacs.c, line 363. Temporary breakpoint 2 at 0x81476b0: file sysdep.c, line 1071. (gdb) source .gdbinit SIGINT is used by the debugger. Are you sure you want to change it? (y or n) [answered Y; input not from terminal] Redefine command "xgetptr"? (y or n) [answered Y; input not from terminal] Redefine command "xgetint"? (y or n) [answered Y; input not from terminal] Redefine command "xgettype"? (y or n) [answered Y; input not from terminal] Redefine command "xgetsym"? (y or n) [answered Y; input not from terminal] Redefine command "xsymname"? (y or n) [answered Y; input not from terminal] Redefine command "pr"? (y or n) [answered Y; input not from terminal] Redefine command "pp"? (y or n) [answered Y; input not from terminal] Redefine command "pv"? (y or n) [answered Y; input not from terminal] Redefine command "ppt"? (y or n) [answered Y; input not from terminal] Redefine command "pitmethod"? (y or n) [answered Y; input not from terminal] Redefine command "pitx"? (y or n) [answered Y; input not from terminal] Redefine command "pit"? (y or n) [answered Y; input not from terminal] Redefine command "prowx"? (y or n) [answered Y; input not from terminal] Redefine command "prow"? (y or n) [answered Y; input not from terminal] Redefine command "pcursorx"? (y or n) [answered Y; input not from terminal] Redefine command "pcursor"? (y or n) [answered Y; input not from terminal] Redefine command "pwinx"? (y or n) [answered Y; input not from terminal] Redefine command "pwin"? (y or n) [answered Y; input not from terminal] Redefine command "pbiditype"? (y or n) [answered Y; input not from terminal] Redefine command "pgx"? (y or n) [answered Y; input not from terminal] ---Type to continue, or q to quit--- Redefine command "pg"? (y or n) [answered Y; input not from terminal] Redefine command "pgi"? (y or n) [answered Y; input not from terminal] Redefine command "pgn"? (y or n) [answered Y; input not from terminal] Redefine command "pgrowx"? (y or n) [answered Y; input not from terminal] Redefine command "pgrow"? (y or n) [answered Y; input not from terminal] Redefine command "pgrowit"? (y or n) [answered Y; input not from terminal] Redefine command "prowlims"? (y or n) [answered Y; input not from terminal] Redefine command "pmtxrows"? (y or n) [answered Y; input not from terminal] Redefine command "xtype"? (y or n) [answered Y; input not from terminal] Redefine command "pvectype"? (y or n) [answered Y; input not from terminal] Redefine command "xvectype"? (y or n) [answered Y; input not from terminal] Redefine command "pvecsize"? (y or n) [answered Y; input not from terminal] Redefine command "xvecsize"? (y or n) [answered Y; input not from terminal] Redefine command "xmisctype"? (y or n) [answered Y; input not from terminal] Redefine command "xint"? (y or n) [answered Y; input not from terminal] Redefine command "xptr"? (y or n) [answered Y; input not from terminal] Redefine command "xmarker"? (y or n) [answered Y; input not from terminal] Redefine command "xoverlay"? (y or n) [answered Y; input not from terminal] Redefine command "xmiscfree"? (y or n) [answered Y; input not from terminal] Redefine command "xsymbol"? (y or n) [answered Y; input not from terminal] Redefine command "xstring"? (y or n) [answered Y; input not from terminal] Redefine command "xvector"? (y or n) [answered Y; input not from terminal] Redefine command "xprocess"? (y or n) [answered Y; input not from terminal] ---Type to continue, or q to quit--- Redefine command "xframe"? (y or n) [answered Y; input not from terminal] Redefine command "xcompiled"? (y or n) [answered Y; input not from terminal] Redefine command "xwindow"? (y or n) [answered Y; input not from terminal] Redefine command "xwinconfig"? (y or n) [answered Y; input not from terminal] Redefine command "xsubr"? (y or n) [answered Y; input not from terminal] Redefine command "xchartable"? (y or n) [answered Y; input not from terminal] Redefine command "xsubchartable"? (y or n) [answered Y; input not from terminal] Redefine command "xboolvector"? (y or n) [answered Y; input not from terminal] Redefine command "xbuffer"? (y or n) [answered Y; input not from terminal] Redefine command "xhashtable"? (y or n) [answered Y; input not from terminal] Redefine command "xcons"? (y or n) [answered Y; input not from terminal] Redefine command "nextcons"? (y or n) [answered Y; input not from terminal] Redefine command "xcar"? (y or n) [answered Y; input not from terminal] Redefine command "xcdr"? (y or n) [answered Y; input not from terminal] Redefine command "xlist"? (y or n) [answered Y; input not from terminal] Redefine command "xfloat"? (y or n) [answered Y; input not from terminal] Redefine command "xscrollbar"? (y or n) [answered Y; input not from terminal] Redefine command "xpr"? (y or n) [answered Y; input not from terminal] Redefine command "xprintstr"? (y or n) [answered Y; input not from terminal] Redefine command "xprintsym"? (y or n) [answered Y; input not from terminal] Redefine command "xcoding"? (y or n) [answered Y; input not from terminal] Redefine command "xcharset"? (y or n) [answered Y; input not from terminal] ---Type to continue, or q to quit--- Redefine command "xfontset"? (y or n) [answered Y; input not from terminal] Redefine command "xfont"? (y or n) [answered Y; input not from terminal] Redefine command "xbacktrace"? (y or n) [answered Y; input not from terminal] Redefine command "xprintbytestr"? (y or n) [answered Y; input not from terminal] Redefine command "xwhichsymbols"? (y or n) [answered Y; input not from terminal] Redefine command "hookpost-backtrace"? (y or n) [answered Y; input not from terminal] Redefine command "ff"? (y or n) [answered Y; input not from terminal] DISPLAY = :0 TERM = dumb Breakpoint 3 at 0x812e7a0: file emacs.c, line 363. Temporary breakpoint 4 at 0x81476b0: file sysdep.c, line 1071. (gdb) b Flogcount Breakpoint 5 at 0x818bf10: file data.c, line 3078. (gdb) r -Q Starting program: /home/redknight/git/emacs/src/bootstrap-emacs -Q [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/i386-linux-gnu/i686/cmov/libthread_db.so.1". [New Thread 0xb630ab70 (LWP 32328)] [New Thread 0xb5bd1b70 (LWP 32329)] [New Thread 0xb5657b70 (LWP 32330)] Breakpoint 5, Flogcount (value=38910) at data.c:3078 3078 { (gdb) bt #0 Flogcount (value=38910) at data.c:3078 #1 0x081a1bdd in eval_sub (form=form@entry=143562403) at eval.c:2231 #2 0x081a4448 in Feval (form=143562403, lexical=0) at eval.c:2051 #3 0x081a24d4 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0xbfffede4) at eval.c:2766 #4 0x081d7407 in exec_byte_code (bytestr=, vector=137612637, maxdepth=66, args_template=args_template@entry=1030, nargs=nargs@entry=1, args=, args@entry=0xbfffef5c) at bytecode.c:629 #5 0x081a21ff in funcall_lambda (fun=137612597, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0xbfffef5c) at eval.c:2967 #6 0x081a2453 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xbfffef58) at eval.c:2780 #7 0x081d7407 in exec_byte_code (bytestr=, vector=137612973, maxdepth=18, args_template=args_template@entry=1030, nargs=nargs@entry=1, args=, args@entry=0xbffff0bc) at bytecode.c:629 #8 0x081a21ff in funcall_lambda (fun=137612925, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0xbffff0bc) at eval.c:2967 #9 0x081a2453 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xbffff0b8) at eval.c:2780 #10 0x081d7407 in exec_byte_code (bytestr=, vector=137611573, maxdepth=14, args_template=args_template@entry=1026, nargs=nargs@entry=1, args=, args@entry=0xbffff278) at bytecode.c:629 #11 0x081a21ff in funcall_lambda (fun=137611525, nargs=nargs@entry=1, ---Type to continue, or q to quit--- arg_vector=arg_vector@entry=0xbffff278) at eval.c:2967 #12 0x081a2453 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xbffff274) at eval.c:2780 #13 0x0819e8b4 in Ffuncall_interactively (nargs=2, args=0xbffff274) at callint.c:252 #14 0x081a24d4 in Ffuncall (nargs=nargs@entry=3, args=args@entry=0xbffff270) at eval.c:2766 #15 0x0819f2f1 in Fcall_interactively (function=4798944, record_flag=0, keys=139307989) at callint.c:841 #16 0x081a24d4 in Ffuncall (nargs=nargs@entry=4, args=args@entry=0xbffff3bc) at eval.c:2766 #17 0x081d7407 in exec_byte_code (bytestr=, vector=137301917, maxdepth=54, args_template=args_template@entry=4102, nargs=nargs@entry=1, args=, args@entry=0xbffff5bc) at bytecode.c:629 #18 0x081a21ff in funcall_lambda (fun=137301877, nargs=nargs@entry=1, arg_vector=arg_vector@entry=0xbffff5bc) at eval.c:2967 #19 0x081a2453 in Ffuncall (nargs=nargs@entry=2, args=args@entry=0xbffff5b8) at eval.c:2780 #20 0x081a28d7 in call1 (fn=fn@entry=8064, arg1=4798944) at eval.c:2617 #21 0x0813c7f3 in command_loop_1 () at keyboard.c:1482 #22 0x081a0e30 in internal_condition_case ( bfun=bfun@entry=0x813c460 , handlers=handlers@entry=10536, hfun=hfun@entry=0x8132790 ) ---Type to continue, or q to quit--- at eval.c:1332 #23 0x081316a4 in command_loop_2 (ignore=ignore@entry=0) at keyboard.c:1110 #24 0x081a0ebd in internal_catch (tag=tag@entry=25488, func=func@entry=0x8131680 , arg=arg@entry=0) at eval.c:1097 #25 0x08131661 in command_loop () at keyboard.c:1089 #26 0x081323b3 in recursive_edit_1 () at keyboard.c:695 #27 0x081326b4 in Frecursive_edit () at keyboard.c:766 #28 0x0805c513 in main (argc=2, argv=0xbffff914) at emacs.c:1713 Lisp Backtrace: "logcount" (0xbfffed00) "eval" (0xbfffede8) "elisp--eval-last-sexp" (0xbfffef5c) "eval-last-sexp" (0xbffff0bc) "eval-print-last-sexp" (0xbffff278) "funcall-interactively" (0xbffff274) "call-interactively" (0xbffff3c0) "command-execute" (0xbffff5bc) (gdb) disas Dump of assembler code for function Flogcount: => 0x0818bf10 <+0>: sub $0x1c,%esp 0x0818bf13 <+3>: mov 0x20(%esp),%eax 0x0818bf17 <+7>: mov %eax,%edx 0x0818bf19 <+9>: and $0x3,%edx 0x0818bf1c <+12>: cmp $0x2,%edx 0x0818bf1f <+15>: jne 0x818bf3e 0x0818bf21 <+17>: mov %eax,%edx 0x0818bf23 <+19>: sar $0x2,%edx 0x0818bf26 <+22>: sar $0x1f,%eax 0x0818bf29 <+25>: xor %eax,%edx 0x0818bf2b <+27>: mov %edx,(%esp) 0x0818bf2e <+30>: call 0x822ede0 <__popcountsi2> 0x0818bf33 <+35>: add $0x1c,%esp 0x0818bf36 <+38>: lea 0x2(,%eax,4),%eax 0x0818bf3d <+45>: ret 0x0818bf3e <+46>: mov %eax,0x4(%esp) 0x0818bf42 <+50>: movl $0x3c00,(%esp) 0x0818bf49 <+57>: call 0x818bcb0 End of assembler dump. (gdb) fin Dump of assembler code for function Flogcount: => 0x0818bf10 <+0>: sub $0x1c,%esp 0x0818bf13 <+3>: mov 0x20(%esp),%eax 0x0818bf17 <+7>: mov %eax,%edx 0x0818bf19 <+9>: and $0x3,%edx 0x0818bf1c <+12>: cmp $0x2,%edx 0x0818bf1f <+15>: jne 0x818bf3e 0x0818bf21 <+17>: mov %eax,%edx 0x0818bf23 <+19>: sar $0x2,%edx 0x0818bf26 <+22>: sar $0x1f,%eax 0x0818bf29 <+25>: xor %eax,%edx 0x0818bf2b <+27>: mov %edx,(%esp) 0x0818bf2e <+30>: call 0x822ede0 <__popcountsi2> 0x0818bf33 <+35>: add $0x1c,%esp 0x0818bf36 <+38>: lea 0x2(,%eax,4),%eax 0x0818bf3d <+45>: ret 0x0818bf3e <+46>: mov %eax,0x4(%esp) 0x0818bf42 <+50>: movl $0x3c00,(%esp) 0x0818bf49 <+57>: call 0x818bcb0 End of assembler dump. (gdb) fin Run till exit from #0 Flogcount (value=38910) at data.c:3078 0x081a1bdd in eval_sub (form=form@entry=143562403) at eval.c:2231 2231 val = (XSUBR (fun)->function.a1 (argvals[0])); Value returned is $1 = 46 (gdb) cont Continuing. Breakpoint 5, Flogcount (value=39998) at data.c:3078 3078 { (gdb) fin Run till exit from #0 Flogcount (value=39998) at data.c:3078 0x081a1bdd in eval_sub (form=form@entry=143591699) at eval.c:2231 2231 val = (XSUBR (fun)->function.a1 (argvals[0])); Value returned is $2 = 34 (gdb)