From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32720 invoked by alias); 9 Nov 2010 10:16:40 -0000 Received: (qmail 32712 invoked by uid 22791); 9 Nov 2010 10:16:39 -0000 X-SWARE-Spam-Status: No, hits=1.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,TW_XF,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-wy0-f169.google.com (HELO mail-wy0-f169.google.com) (74.125.82.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 09 Nov 2010 10:16:34 +0000 Received: by wyf23 with SMTP id 23so7231017wyf.0 for ; Tue, 09 Nov 2010 02:16:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.20.66 with SMTP id o44mr2112136weo.59.1289297791820; Tue, 09 Nov 2010 02:16:31 -0800 (PST) Received: by 10.217.0.135 with HTTP; Tue, 9 Nov 2010 02:16:31 -0800 (PST) Date: Tue, 09 Nov 2010 10:16:00 -0000 Message-ID: Subject: "Program received signal SIGILL, Illegal instruction" on putting breakpoint while using gdb-gdbserver for remote debugging From: himanshu sardana To: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-11/txt/msg00036.txt.bz2 I am trying to remote debug an application which resides in an Intel x86 system. I am using gdbserver on the target machine and gdb on the host machine which is Intel x86 as well. The application is a single threaded application. The code was compiled using gcc with '-g' switch to enable debugging. gcc -g -o main_app main_app.c I am facing problems if I put any breakpoint once the debug session is running and connected with the remote machine. Following steps were done to start debugging: ===================================================== $> gdb ./main_app (gdb) target remote 192.168.202.156:2108 Remote debugging using 192.168.202.156:2108 0xfc140020 in ?? () (gdb) ===================================================== After these steps if I simply 'continue' the program, the program executes fine and then terminates properly. But, If I put a breakpoint and then continue execution I get the following problem: Program received signal SIGILL, Illegal instruction. 0x52034000 in ?? () What may be the problem due to which I get the above error. Also, when I execute "target remote 192.168.202.156:2108", I get QUESTION MARKS (??) alone with the address info i.e. "0xfc140020 in ?? ()". I am suspecting that I should get the application name i.e. "main_app" instead of '??'. I am not sure on this but I tried remote-debugging using a similar setup long time back and I have a slight memory that there was application name instead of '??'. But, again, I am not very sure of that. Also I tried an another command in gdb which was (gdb) add-symbol-file main_app 0xfc140020 This asks me to Enter 'y' to read symbol file and it shows no error on reading but still I get same problem. Any suggestions will be highly appreciable. Thanks, Himanshu