From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11686 invoked by alias); 20 Sep 2010 14:41:58 -0000 Received: (qmail 11676 invoked by uid 22791); 20 Sep 2010 14:41:56 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE X-Spam-Check-By: sourceware.org Received: from mail-qy0-f176.google.com (HELO mail-qy0-f176.google.com) (209.85.216.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 20 Sep 2010 14:41:47 +0000 Received: by qyk2 with SMTP id 2so4956045qyk.0 for ; Mon, 20 Sep 2010 07:41:45 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.104.153 with SMTP id p25mr5870150qao.98.1284993705395; Mon, 20 Sep 2010 07:41:45 -0700 (PDT) Received: by 10.229.230.194 with HTTP; Mon, 20 Sep 2010 07:41:45 -0700 (PDT) Date: Mon, 20 Sep 2010 14:41:00 -0000 Message-ID: Subject: remote debugging: "call" just leads to "Cannot insert breakpoint 0" From: Steffen Dettmer 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-09/txt/msg00112.txt.bz2 Hi, using gdb-arm-elf (non-linux) running on x86 linux I think remote functions can be invoked (such as "(gdb) print strlen(str)"), but I just get "Cannot insert breakpoint 0". Why is gdb trying to break at 0? Any ideas what could cause this? Do I do something wrong? Do I need to setup anything special? This issue was reported for a wide range of gdb versions (6.4, 6.8, 7.1/7.2), actually never worked for us, but I think it should work, shouldn't it? The trace shows that when you type the "call" command, GDB sets up the registers, sets a breakpoint (to be reached at the end of the function execution, I believe), and resumes the execution. The problem is that the breakpoint is always set at address 0, on 4 bytes: "Sending packet: $Z0,0,4#46...Ack" -> It makes no sense to set such a breakpoint at address 0, and BTW this breakpoint is never reached. It fails immediately because it is impossible to set this breakpoint. p &toto p &toto $1 = (int ()) 0xc0000248 set debug remote 1 set debug remote 1 call toto() call toto() Sending packet: $Pe=00000000#72...Ack Packet received: OK Packet P (set-register) is supported Sending packet: $Pd=980702c0#be...Ack Packet received: OK Sending packet: $Pf=480200c0#b4...Ack Packet received: OK Sending packet: $Z0,0,4#46...Ack Packet received: E00 Sending packet: $Pd=a00702c0#de...Ack Packet received: OK Sending packet: $Pe=100200c0#a8...Ack Packet received: OK Sending packet: $Pf=520200c0#af...Ack Packet received: OK Warning: Cannot insert breakpoint 0. Error accessing memory address 0x0: Unknown error 4294967295. Any hints appreciated. oki, Steffen