I tried gdb-6.4 on my Solaris 10 box with two Opteron processors. But failed to run gdb. Gdb is compiled as 64-bit binary. What's wrong?
I ran: $ cd $HOME $ wget -q -O - http://ftp.gnu.org/gnu/gdb/gdb-6.4.tar.bz2 | bunzip2 | gtar xvf - $ CC="cc -xarch=amd64" ./configure --enable-64-bit-bfd=yes --enable-werror=no --enable-build-warnings=no --enable-maintainer-mode=no $ gmake all And got a "File format not recognized" error, $ cd ~/gdb-6.4/gdb $ ./gdb ./gdb GNU gdb 6.4 Copyright 2005 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 "i386-pc-solaris2.10"..."/export/home/nakaji/gdb-6.4/gdb/gdb": not in executable format: File format not recognized Setting up the environment for debugging gdb. No symbol table is loaded. Use the "file" command. No symbol table is loaded. Use the "file" command. .gdbinit:8: Error in sourced command file: No breakpoint number 0. (gdb) In addition, when I compiled it with CC="cc -xtarget=opteron" and the same configure option, that is, compiled gdb is 32-bit binary, gdb dumps core. $ CC="cc -xtarget=opteron" ./configure --enable-werror=no --enable-build-warnings=no --enable-maintainer-mode=no --disable-nls && gmake $ cd gdb $ $ ./gdb ./gdb GNU gdb 6.4 Copyright 2005 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 "i386-pc-solaris2.10"...Segmentation fault (core dumped) $ dbx ./gdb core For information about new features see `help changes' To remove this message, put `dbxenv suppress_startup_message 7.5' in your .dbxrc Reading gdb core file header read successfully Reading ld.so.1 Reading libdl.so.1 Reading libcurses.so.1 Reading libsocket.so.1 Reading libnsl.so.1 Reading libm.so.2 Reading libc.so.1 Reading ja.so.3 Reading methods_ja_JP.eucJP.so.3 Reading libc_db.so.1 program terminated by signal SEGV (no mapping at the fault address) Current function is dwarf_decode_lines 6581 dir = lh->include_dirs[fe->dir_index - 1]; (dbx) print *fe *fe = { name = 0x94c81af "" dir_index = 156011231U mod_time = 1701602143U length = 161U included_p = 1701996127 } (dbx) where =>[1] dwarf_decode_lines(lh = 0x875e000, comp_dir = (nil), abfd = 0x848d3d8, cu = 0x8046470, pst = 0x87b3334), line 6581 in "dwarf2read.c" [2] dwarf2_build_include_psymtabs(cu = 0x8046470, pdi = 0x80475c8, pst = 0x87b3334), line 1375 in "dwarf2read.c" [3] dwarf2_build_psymtabs_hard(objfile = 0x84a1e88, mainline = 0), line 1543 in "dwarf2read.c" [4] dwarf2_build_psymtabs(objfile = 0x84a1e88, mainline = 0), line 1222 in "dwarf2read.c" [5] elf_symfile_read(objfile = 0x84a1e88, mainline = 0), line 612 in "elfread.c" [6] syms_from_objfile(objfile = 0x84a1e88, addrs = 0x848f530, offsets = (nil), num_offsets = 0, mainline = 1, verbo = 0), line 828 in "symfile.c" [7] symbol_file_add_with_addrs_or_offsets(abfd = 0x848d3d8, from_tty = 0, addrs = (nil), offsets = (nil), num_offsets = 0, mainline = 1, flags = 0), line 941 in "symfile.c" [8] symbol_file_add_from_bfd(abfd = 0x848d3d8, from_tty = 0, addrs = (nil), mainline = 1, flags = 0), line 1041 in "symfile.c" [9] symbol_file_add(name = 0x8047b62 "./gdb", from_tty = 0, addrs = (nil), mainline = 1, flags = 0), line 1053 in "symfile.c" [10] symbol_file_add_main_1(args = 0x8047b62 "./gdb", from_tty = 0, flags = 0), line 1074 in "symfile.c" [11] symbol_file_add_main(args = 0x8047b62 "./gdb", from_tty = 0), line 1068 in "symfile.c" [12] catch_command_errors(command = 0x81b6800 = &symbol_file_add_main(char *args, int from_tty), arg = 0x8047b62 "./gdb", from_tty = 0, mask = 6), line 530 in "exceptions.c" [13] captured_main(data = 0x8047a18), line 676 in "main.c" [14] catch_errors(func = 0x8114670 = &`gdb`main.c`captured_main(void *data), func_args = 0x8047a18, errstring = 0x8419100 "", mask = 6), line 515 in "exceptions.c" [15] gdb_main(args = 0x8047a18), line 838 in "main.c" [16] main(argc = 2, argv = 0x8047a5c), line 35 in "gdb.c" (dbx) -- NAKAJI Hiroyuki _______________________________________________ Bug-gdb mailing list Bug-gdb@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gdb