From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10977 invoked by alias); 6 Oct 2003 23:24:36 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 10970 invoked from network); 6 Oct 2003 23:24:35 -0000 Received: from unknown (HELO msrvr.intellambda.com) (207.5.82.234) by sources.redhat.com with SMTP; 6 Oct 2003 23:24:35 -0000 Message-ID: <3F81F918.4010202@intellambda.com> Date: Mon, 06 Oct 2003 23:24:00 -0000 From: Ming Sun MIME-Version: 1.0 To: gdb@sources.redhat.com Subject: Help needed for gdbserver on redhat 9, thanks! Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00111.txt.bz2 I got two PCs. One is running target and run gdbserber and the other is host and run gdb. Both are redhat 9. I am constantly get SIGSEGV before it reaches main(). Gdb works fine in local machine. Does anyone know what is my problem? Thanks in advance for your help! Ming Here are the outputs from both target and host. ==============TARGET============== root@pc28 x86]# gdbserver foo:5432 test Process test created; pid = 3569 Remote debugging from host 192.168.0.57 ==============HOST============== [root@mings x86]# gdb test GNU gdb Red Hat Linux (5.3post-0.20021129.18rh) Copyright 2003 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-redhat-linux-gnu"... (gdb) target remote 192.168.0.155:5432 Remote debugging using 192.168.0.155:5432 0x40000c10 in ?? () (gdb) symbol-file test Load new symbol table from "test"? (y or n) y Reading symbols from test...done. (gdb) list main 1 #include 2 3 main (int argc, 4 char *argv[]) 5 { 6 printf ("test gdbserver\n"); 7 } (gdb) br main Breakpoint 1 at 0x8048338: file test.c, line 6. (gdb) c Continuing. Program received signal SIGSEGV, Segmentation fault. 0x0c011ad7 in ?? () (gdb) where #0 0x0c011ad7 in ?? () #1 0x40001365 in ?? () #2 0x4000eebf in ?? () #3 0x40000f53 in ?? () (gdb) quit The program is running. Exit anyway? (y or n) y [root@mings x86]# gcc -v Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux Thread model: posix gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)