stretch$ gdb /usr/new/bin/emacs GNU gdb (Debian 7.12-6) 7.12.0.20161007-git Copyright (C) 2016 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 "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/new/bin/emacs...done. (gdb) break xg_scroll_callback Breakpoint 1 at 0x4be140: file xterm.c, line 5644. (gdb) run -Q Starting program: /usr/new/bin/emacs -Q [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffe8636700 (LWP 1991)] [New Thread 0x7fffe6748700 (LWP 1992)] [New Thread 0x7fffe5d3a700 (LWP 1993)] Thread 1 "emacs" hit Breakpoint 1, xg_scroll_callback (range=0x2f006f0, scroll=GTK_SCROLL_JUMP, value=7069105, user_data=0x1493c30 ) at xterm.c:5644 5644 { (gdb) print *range $1 = {widget = {parent_instance = {g_type_instance = {g_class = 0x2e20400}, ref_count = 3, qdata = 0x344fd10}, priv = 0x2f00600}, priv = 0x2f00520} (gdb) next 5648 GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (range)); (gdb) next 5649 struct frame *f = g_object_get_data (G_OBJECT (range), XG_FRAME_DATA); (gdb) next 5648 GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (range)); (gdb) next 5649 struct frame *f = g_object_get_data (G_OBJECT (range), XG_FRAME_DATA); (gdb) print adj $2 = (GtkAdjustment *) 0x2fc9c80 (gdb) print *adj $3 = {parent_instance = {g_type_instance = {g_class = 0x2cde5e0}, ref_count = 1, qdata = 0x0}, priv = 0x2fc9c10} (gdb) next 5651 if (xg_ignore_gtk_scrollbar) return false; (gdb) next 5653 switch (scroll) (gdb) next 5657 if (FRAME_DISPLAY_INFO (f)->grabbed != 0 (gdb) next 5660 if (bar->horizontal) (gdb) next 5663 whole = (int)(gtk_adjustment_get_upper (adj) - (gdb) print whole $4 = 0 (gdb) next 5660 if (bar->horizontal) (gdb) print whole $5 = 0 (gdb) next 5671 whole = gtk_adjustment_get_upper (adj) - (gdb) next 5672 gtk_adjustment_get_page_size (adj); (gdb) next 5671 whole = gtk_adjustment_get_upper (adj) - (gdb) next 5672 gtk_adjustment_get_page_size (adj); (gdb) next 5673 portion = min ((int)value, whole); (gdb) print whole $6 = 0 (gdb) print gtk_adjustment_get_upper(adj) $7 = 50109456 (gdb) print gtk_adjustment_get_page_size(adj) $8 = 50109456 (gdb) cont Continuing.