daniel@ps3ubuntu:~/work/xorg/xorg-server-1.4.1~git20080131$ sudo gdb /usr/bin/Xorg GNU gdb 6.8-debian Copyright (C) 2008 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 "powerpc-linux-gnu"... (gdb) help break Set breakpoint at specified line or function. break [LOCATION] [thread THREADNUM] [if CONDITION] LOCATION may be a line number, function name, or "*" and an address. If a line number is specified, break at start of code for that line. If a function is specified, break at start of code for that function. If an address is specified, break at that exact address. With no LOCATION, uses current execution address of selected stack frame. This is useful for breaking on return to a stack frame. THREADNUM is the number from "info threads". CONDITION is a boolean expression. Multiple breakpoints at one place are permitted, and useful if conditional. Do "help breakpoints" for info on other commands dealing with breakpoints. (gdb) break chooseVideoDriver Breakpoint 1 at 0x1009cae8: file ../../../../hw/xfree86/common/xf86AutoConfig.c, line 347. (gdb) run -keeptty -dumbSched Starting program: /usr/bin/Xorg -keeptty -dumbSched [Thread debugging using libthread_db enabled] This is a pre-release version of the X server from The X.Org Foundation. It is not supported in any way. Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/. Select the "xorg" product for bugs you find in this release. Before reporting bugs in pre-release versions please check the latest version in the X.Org Foundation git repository. See http://wiki.x.org/wiki/GitPage for git access instructions. X.Org X Server 1.4.0.90 Release Date: 5 September 2007 X Protocol Version 11, Revision 0 Build Operating System: Linux Ubuntu (xorg-server 2:1.4.1~git20080131-1ubuntu9) Current Operating System: Linux ps3ubuntu 2.6.24-16-powerpc64-smp #1 SMP Thu Apr 10 13:55:52 UTC 2008 ppc64 Build Date: 18 April 2008 11:50:42PM Before reporting problems, check http://wiki.x.org to make sure that you have the latest version. Module Loader present Markers: (--) probed, (**) from config file, (==) default setting, (++) from command line, (!!) notice, (II) informational, (WW) warning, (EE) error, (NI) not implemented, (??) unknown. (==) Log file: "/var/log/Xorg.0.log", Time: Sat Apr 19 01:37:03 2008 (==) Using config file: "/etc/X11/xorg.conf" [New Thread 0xf7fcb000 (LWP 4866)] [Switching to Thread 0xf7fcb000 (LWP 4866)] Breakpoint 1, chooseVideoDriver () at ../../../../hw/xfree86/common/xf86AutoConfig.c:347 347 char *line = NULL; (gdb) list 342 { 343 pciVideoPtr *pciptr, info = NULL; 344 DIR *idsdir; 345 FILE *fp; 346 struct dirent *direntry; 347 char *line = NULL; 348 char *chosen_driver = NULL; 349 size_t len; 350 ssize_t read; 351 char path_name[256], vendor_str[5], chip_str[5]; (gdb) next 342 { (gdb) list 337 return ptr; 338 } 339 340 char* 341 chooseVideoDriver(void) 342 { 343 pciVideoPtr *pciptr, info = NULL; 344 DIR *idsdir; 345 FILE *fp; 346 struct dirent *direntry; (gdb) next 357 matches[i] = NULL; (gdb) list 352 int vendor, chip; 353 int i, j; 354 char *matches[20]; /* If we have more than 20 drivers we're in trouble */ 355 356 for (i=0 ; i<20 ; i++) 357 matches[i] = NULL; 358 359 /* Find the primary device, and get some information about it. */ 360 if (xf86PciVideoInfo) { 361 for (pciptr = xf86PciVideoInfo; (info = *pciptr); pciptr++) { (gdb) next 347 char *line = NULL; (gdb) list 342 { 343 pciVideoPtr *pciptr, info = NULL; 344 DIR *idsdir; 345 FILE *fp; 346 struct dirent *direntry; 347 char *line = NULL; 348 char *chosen_driver = NULL; 349 size_t len; 350 ssize_t read; 351 char path_name[256], vendor_str[5], chip_str[5]; (gdb) next 357 matches[i] = NULL; (gdb) break 360 Breakpoint 2 at 0x1009cb30: file ../../../../hw/xfree86/common/xf86AutoConfig.c, line 360. (gdb) cont Continuing. Breakpoint 2, chooseVideoDriver () at ../../../../hw/xfree86/common/xf86AutoConfig.c:360 360 if (xf86PciVideoInfo) { (gdb) list 355 356 for (i=0 ; i<20 ; i++) 357 matches[i] = NULL; 358 359 /* Find the primary device, and get some information about it. */ 360 if (xf86PciVideoInfo) { 361 for (pciptr = xf86PciVideoInfo; (info = *pciptr); pciptr++) { 362 if (xf86IsPrimaryPci(info)) { 363 break; 364 } (gdb) print xf86 Display all 1118 possibilities? (y or n) (gdb) print xf86PciVideoInfo $1 = (pciVideoPtr *) 0x0 (gdb) next 370 ErrorF("xf86PciVideoInfo is not set\n"); (gdb) list 365 } 366 if (!info) { 367 ErrorF("Primary device is not PCI\n"); 368 } 369 } else { 370 ErrorF("xf86PciVideoInfo is not set\n"); 371 } 372 373 if (!info) { 374 ErrorF("Could not get primary PCI info\n"); (gdb) next xf86PciVideoInfo is not set 374 ErrorF("Could not get primary PCI info\n"); (gdb) next Could not get primary PCI info 475 while (matches[i]) { (gdb) list 470 471 xf86Msg(X_DEFAULT, "Matched %s for the autoconfigured driver\n", chosen_driver); 472 473 end: 474 i = 0; 475 while (matches[i]) { 476 if (matches[i] != chosen_driver) { 477 xfree(matches[i]); 478 } 479 i++; (gdb) print matches[i] $2 = 0x0 (gdb) next 481 xfree(line); (gdb) list 476 if (matches[i] != chosen_driver) { 477 xfree(matches[i]); 478 } 479 i++; 480 } 481 xfree(line); 482 483 return chosen_driver; 484 } (gdb) print chosen_driver $3 = 0x0 (gdb) next 484 } (gdb) list 479 i++; 480 } 481 xfree(line); 482 483 return chosen_driver; 484 } (gdb) bt full #0 chooseVideoDriver () at ../../../../hw/xfree86/common/xf86AutoConfig.c:484 pciptr = info = (pciVideoPtr) 0x10217ed0 idsdir = (DIR *) 0x10217a38 fp = (FILE *) 0x3 direntry = line = 0x0 chosen_driver = 0x0 len = 264013940 path_name = "\000\000\000\000\000\000\000\001\000\000\000\001\017���\020!\224\200�\221\024\200\017��8\020\036���\221\025t\020\034\237X\020\"=P\020!r\004\020!r\024\020\0379�\000\000\000\001\020\037\032(\000\000\000\003�\221\024�\020\033k��\221\025t\020\035?4\020\034X`$\000\004B\020\034��\000\000\000\006�\221\024�\000\000\000\003\020\036�0\020\"=h�\221\0250\020\037\000\000�\221\031\004\020\037\000\000\020!z8\020\037<@\000\000\000\000\020\033�\224�\221\025|�\221\025xkbd\000\000\000\000\000�\221\025 \000\000\000\024\017���\017�\000\034\020!z8\020\037<@\000\000\000\000\020\033�\224�\221\025|"... vendor_str = "\001�\221\024P" chip_str = "��\000\000" chip = i = j = matches = {0x0 } #1 0x1009d084 in autoConfigDevice (preconf_device=0x1021ffd0) at ../../../../hw/xfree86/common/xf86AutoConfig.c:327 ptr = (GDevPtr) 0x1021ffd0 #2 0x1007041c in InitOutput (pScreenInfo=0x10217ed0, argc=3, argv=0xff911904) at ../../../../hw/xfree86/common/xf86Init.c:355 configured_device = i = j = k = scr_index = modulelist = (char **) 0x10223e80 optionlist = (pointer *) 0x10223ea0 layout = screenpix24 = pix24 = pix24From = autoconfig = 0 generation = 1 #3 0x1002bb08 in main (argc=3, argv=0xff911904, envp=) at ../../dix/main.c:369 i = error = -134424580 alwaysCheckForInput = {0, 1} (gdb)