> Ok, then how about setting break point as this: > > (gdb) br create_frame_xic > > and use "s" command to step into the function > xic_create_fontset. I use "s" and "n" commands alternatively, the following is my results. BTW, I'm a layman about GDB. ========== zhaohs@ubuntu-edgy:~$ cd cvs-svn/emacs/ zhaohs@ubuntu-edgy:~/cvs-svn/emacs$ cd src/ zhaohs@ubuntu-edgy:~/cvs-svn/emacs/src$ gdb emacs GNU gdb 6.4.90-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i486-linux-gnu"...Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". DISPLAY = :0.0 TERM = xterm Breakpoint 1 at 0x81035b6: file emacs.c, line 464. Breakpoint 2 at 0x811c3c6: file sysdep.c, line 1385. (gdb) br create_frame_xic Breakpoint 3 at 0x80e2319: file xfns.c, line 2238. (gdb) run --enable-font-backend Starting program: /media/hdb6/MyHomeFiles/cvs-svn/emacs/src/emacs --enable-font-backend [Thread debugging using libthread_db enabled] [New Thread -1219709264 (LWP 20555)] [Switching to Thread -1219709264 (LWP 20555)] Breakpoint 4 at 0x80d6f16: file xterm.c, line 8047. Breakpoint 3, create_frame_xic (f=0x8bbfe28) at xfns.c:2238 2238 { (gdb) s 2243 if (FRAME_XIC (f)) (gdb) s 2247 xfs = xic_create_xfontset (gdb) s fontset_ascii (id=2) at fontset.c:917 917 { (gdb) s 921 elt = FONTSET_ASCII (fontset); (gdb) s 917 { (gdb) s 921 elt = FONTSET_ASCII (fontset); (gdb) s 923 if (CONSP (elt)) (gdb) s 929 } (gdb) s xic_create_xfontset (f=0x8bbfe28, base_fontname=0x876da60 "-Adobe-Courier-Medium-R-Normal--14-140-75-75-M-90-ISO8859-1") at xfns.c:2103 2103 if (!base_fontname) (gdb) s 2096 { (gdb) s 2098 char **missing_list = NULL; (gdb) s 2103 if (!base_fontname) (gdb) s 2107 FOR_EACH_FRAME (rest, frame) (gdb) s 2109 struct frame *cf = XFRAME (frame); (gdb) s 2110 if (cf != f && FRAME_LIVE_P (f) && FRAME_X_P (cf) (gdb) s 2122 char *fontsetname = xic_create_fontsetname (base_fontname, False); (gdb) s xic_create_fontsetname ( base_fontname=0x876da60 "-Adobe-Courier-Medium-R-Normal--14-140-75-75-M-90-ISO8859-1", motif=0) at xfns.c:1972 1972 const char *sep = motif ? ";" : ","; (gdb) s 1971 { (gdb) s 1972 const char *sep = motif ? ";" : ","; (gdb) s 1971 { (gdb) s 1972 const char *sep = motif ? ";" : ","; (gdb) s 1976 if (xic_defaut_fontset == base_fontname) (gdb) s 1993 for (i = 0; *p; p++) (gdb) s 1981 strcpy (fontsetname, base_fontname); (gdb) s 1993 for (i = 0; *p; p++) (gdb) s 1994 if (*p == '-') i++; (gdb) s 1993 for (i = 0; *p; p++) (gdb) s 1994 if (*p == '-') i++; (gdb) s 1993 for (i = 0; *p; p++) (gdb) s 1994 if (*p == '-') i++; (gdb) s 1993 for (i = 0; *p; p++) (gdb) s 1994 if (*p == '-') i++; (gdb) s 1993 for (i = 0; *p; p++) (gdb) s 1994 if (*p == '-') i++; (gdb) s 1993 for (i = 0; *p; p++) (gdb) s 1994 if (*p == '-') i++; (gdb) s 1993 for (i = 0; *p; p++) (gdb) s 1994 if (*p == '-') i++; (gdb) s 1993 for (i = 0; *p; p++) (gdb) s 1994 if (*p == '-') i++; (gdb) s 1993 for (i = 0; *p; p++) (gdb) s 1994 if (*p == '-') i++; (gdb) set args (gdb) run --enable-font-backend -fn "Dejavu Sans Mono-14" The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /media/hdb6/MyHomeFiles/cvs-svn/emacs/src/emacs --enable-font-backend -fn "Dejavu Sans Mono-14" [Thread debugging using libthread_db enabled] [New Thread -1220417872 (LWP 20590)] [Switching to Thread -1220417872 (LWP 20590)] Breakpoint 3, create_frame_xic (f=0x8bbfe28) at xfns.c:2238 2238 { (gdb) n 2243 if (FRAME_XIC (f)) (gdb) n 2247 xfs = xic_create_xfontset (gdb) n 2251 xim = FRAME_X_XIM (f); (gdb) n 2252 if (xim) (gdb) n 2251 xim = FRAME_X_XIM (f); (gdb) n 2252 if (xim) (gdb) n 2251 xim = FRAME_X_XIM (f); (gdb) n 2252 if (xim) (gdb) n 2263 if (xic_style == 0) (gdb) n 2259 s_area.x = 0; s_area.y = 0; s_area.width = 1; s_area.height = 1; (gdb) n 2263 if (xic_style == 0) (gdb) n 2259 s_area.x = 0; s_area.y = 0; s_area.width = 1; s_area.height = 1; (gdb) n 2260 spot.x = 0; spot.y = 1; (gdb) n 2263 if (xic_style == 0) (gdb) n 2269 xic_style = best_xim_style (&supported_list, (gdb) n 2223 for (j = 0; j < xim->count_styles; ++j) (gdb) n 2224 if (user->supported_styles[i] == xim->supported_styles[j]) (gdb) n 2223 for (j = 0; j < xim->count_styles; ++j) (gdb) n 2224 if (user->supported_styles[i] == xim->supported_styles[j]) (gdb) s 2223 for (j = 0; j < xim->count_styles; ++j) (gdb) s 2224 if (user->supported_styles[i] == xim->supported_styles[j]) (gdb) s 2223 for (j = 0; j < xim->count_styles; ++j) (gdb) s 2224 if (user->supported_styles[i] == xim->supported_styles[j]) (gdb) s 2223 for (j = 0; j < xim->count_styles; ++j) (gdb) s 2224 if (user->supported_styles[i] == xim->supported_styles[j]) (gdb) s 2223 for (j = 0; j < xim->count_styles; ++j) (gdb) s 2224 if (user->supported_styles[i] == xim->supported_styles[j]) (gdb) s 2223 for (j = 0; j < xim->count_styles; ++j) (gdb) s 2222 for (i = 0; i < user->count_styles; ++i) (gdb) s 2223 for (j = 0; j < xim->count_styles; ++j) (gdb) s 2224 if (user->supported_styles[i] == xim->supported_styles[j]) (gdb) s 2269 xic_style = best_xim_style (&supported_list, (gdb) s 2273 preedit_attr = XVaCreateNestedList (0, (gdb) s s 2284 status_attr = XVaCreateNestedList (0, (gdb) s 2273 preedit_attr = XVaCreateNestedList (0, (gdb) s 2284 status_attr = XVaCreateNestedList (0, (gdb) s 2295 xic = XCreateIC (xim, (gdb) s s ^[2302 XFree (preedit_attr); (gdb) s 2303 XFree (status_attr); (gdb) n 2306 FRAME_XIC (f) = xic; (gdb) n 2307 FRAME_XIC_STYLE (f) = xic_style; (gdb) n 2308 FRAME_XIC_FONTSET (f) = xfs; (gdb) n 2309 } (gdb) ========== Best, Hongsheng. __________________________________________________ ¸Ï¿ì×¢²áÑÅ»¢³¬´óÈÝÁ¿Ãâ·ÑÓÊÏä? http://cn.mail.yahoo.com