From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Schalit To: gdb@sourceware.cygnus.com Subject: Re: Need help with a backtrace Date: Thu, 15 Feb 2001 05:33:00 -0000 Message-id: <3A888BCA.84305AE1@pacbell.net> References: <3A883607.BF2396E4@pacbell.net> <3A883F3C.6DB5C98D@cygnus.com> X-SW-Source: 2001-02/msg00172.html Fernando Nasser wrote: > > Matt, Thanks for the excellent tutorial. > Look at the backtrace (it goes backwards from the last > function to be called to the caller of it, the caller > of this caller and so on). Ok. It looks like it only lists an entry when a function calls another function, like main() calling printf()? But it doesn't seem to list things like loops or if/case tests or variable values? I know how to write C programs. How would I backtrace or step my way through hello-world.c if it exits normally, and I just want to see how the trace looks? > The call to gnome_app_create_menus() failed miserably. > If you look further on the stack you'll notice that the > function create_label() in gnome-app-helper.c at line 402 > called gtk_label_parse_uline() and one of the parameters seem > to be an invalid pointer: > > #3 0xbfb9048b in gtk_label_parse_uline (label=0x8139180, > > string=0xc615
) at gtklabel.c:1005 Ok I took a look at gnome-app-helper.c and gtklabel.c and I see how the bt correlates to the functions code. > It is either a bug in the gnome library or the GnomeUIInfo > structure was not set properly. Isn't it possible that my development platform could be missing a key app, like gnu sed or gnu's install program or something along those lines? I say that as a possibility, because I read a Solairis Gnome Install Howto that mentioned those were needed, and I've noticed, when doing a truss on some of these programs that I get an extra '/' showing up in paths to applications that are being called, as in: xstat(2, "./gnome/config-override//Gnome", 0x08047614) Err#2 ENOENT xstat(2, "/usr/local/etc/gnome/config//Gnome", 0x08047614) Err#2 ENOENT xstat(2, "./gnome/config//Gnome", 0x08047614) Err#2 ENOENT xstat(2, "/home/matthew/.gnome//Gnome", 0x08047674) = 0 open("/home/matthew/.gnome//Gnome", O_RDONLY, 0666) = 6 I guess the last two lines do show a file being found using the odd path. > It goes always like that. See who called who and what the > arguments were. > > Using the up and down commands you can go up and down the > stack and look at variables at that context. Is up and down how I see what variables get set to which values while moving through a function? And finally, where does > > #4 0xbfd95397 in create_label ^^^^^^^^^^ that value come from, or what man page should I look at for the decoding formula? Thanks again, Matt > Good luck. > > Regards, > Fernando > Matt Schalit wrote: > > > > Hi all, > > > > Thanks for reading this. I'm new to debugging and don't understand > > enough to read a backtrace. I could use a little help with that. > > > > I'm running an i586-sco-sysv5uw7.1.1, and getting SIGSEGV's whenever > > I try to run gnomecc-1.2.2 (gnome control center) via > > enlightenment-0.16.5. I never see a window. > > > > Regardless of whether I try to open any windows in Gnome, as soon > > as I start the desktop, I do see one warning about MIT-SHM not > > working correctly and to disable to Enlightenment Pager snapshots. > > I don't think that issue is relate to gnomecc. > > > > Can someone tell me what this means or point me to a nifty howto? > > Thanks a lot, > > Matthew > > > > ---------------------------------------------------------------------------- > > $ gdb > > > > (gdb) file /usr/local/bin/gnomecc > > Reading symbols from /usr/local/bin/gnomecc...done. > > (gdb) run > > Starting program: /usr/local/bin/gnomecc > > warning: Lowest section in /usr/lib/libdl.so.1 is .hash at 00000094 > > [New LWP 1] > > [New LWP 2] > > > > Program received signal SIGSEGV, Segmentation fault. > > 0xbfa6f929 in _Xwcslen () from /usr/lib/libX11.so.6.1 > > [New Thread 1] > > (gdb) bt > > #0 0xbfa6f929 in _Xwcslen () from /usr/lib/libX11.so.6.1 > > #1 0x400 in ?? () > > #2 0xbfa6fa28 in _XwcTextListToTextProperty () from /usr/lib/libX11.so.6.1 > > #3 0xbfb9048b in gtk_label_parse_uline (label=0x8139180, > > string=0xc615
) at gtklabel.c:1005 > > #4 0xbfd95397 in create_label (label_text=0xbfe0a339 "", keyval=0x8047878) > > at gnome-app-helper.c:402 > > #5 0xbfd9630e in create_menu_item (menu_shell=0x8137ed0, uiinfo=0x809c770, > > is_radio=0, radio_group=0x81379f8, uibdata=0x8047988, > > accel_group=0x812ea40, uline_accels=1, pos=134510536) > > at gnome-app-helper.c:933 > > #6 0xbfd96f1a in gnome_app_fill_menu_custom (menu_shell=0x8137ed0, > > uiinfo=0x809c770, uibdata=0x8047988, accel_group=0x812ea40, > > uline_accels=1, pos=1) at gnome-app-helper.c:1326 > > #7 0xbfd96fa9 in gnome_app_fill_menu_custom (menu_shell=0x812bd28, > > uiinfo=0x809c84c, uibdata=0x8047988, accel_group=0x812ea40, > > uline_accels=1, pos=1) at gnome-app-helper.c:1341 > > #8 0xbfd976a1 in gnome_app_create_menus_custom (app=0x812db90, > > uiinfo=0x809c820, uibdata=0x8047988) at gnome-app-helper.c:1516 > > #9 0xbfd97163 in gnome_app_create_menus (app=0x812db90, uiinfo=0x809c820) > > at gnome-app-helper.c:1395 > > #10 0x804e967 in create_window () at main.c:200 > > #11 0x804ecf8 in main (argc=1, argv=0x8047a0c) at main.c:282 > > (gdb) > > ------------------------------------------------------------------------- > > -- > Fernando Nasser > Red Hat - Toronto E-Mail: fnasser@redhat.com > 2323 Yonge Street, Suite #300 > Toronto, Ontario M4P 2C9