From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17079 invoked by alias); 2 Nov 2005 17:37:44 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 16947 invoked by uid 22791); 2 Nov 2005 17:37:40 -0000 Received: from sadr.equallogic.com (HELO sadr.equallogic.com) (66.155.203.134) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Wed, 02 Nov 2005 17:37:40 +0000 Received: from sadr.equallogic.com (localhost.localdomain [127.0.0.1]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id jA2HbcXd022534 for ; Wed, 2 Nov 2005 12:37:38 -0500 Received: from M31.equallogic.com (M31.equallogic.com [172.16.1.31]) by sadr.equallogic.com (8.12.8/8.12.8) with SMTP id jA2Hbb5G022529; Wed, 2 Nov 2005 12:37:37 -0500 Received: from pkoning.equallogic.com ([172.16.1.181]) by M31.equallogic.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 2 Nov 2005 12:37:37 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17256.63840.511458.853135@gargle.gargle.HOWL> Date: Wed, 02 Nov 2005 17:37:00 -0000 From: Paul Koning To: fzchuan@eos.cs.nthu.edu.tw Cc: gdb@sourceware.org Subject: Re: set breakpoints in remote debugging References: <20051102171409.M10763@eos.cs.nthu.edu.tw> <20051102173427.M31340@eos.cs.nthu.edu.tw> X-SW-Source: 2005-11/txt/msg00041.txt.bz2 >>>>> "fzchuan" == fzchuan writes: fzchuan> Hi all: fzchuan> I encountered some problems in GDB remote debugging. In fzchuan> most of time, GDB host would send correct breakpoint address fzchuan> to target which I asked it. But sometimes it would send fzchuan> strange address. That is,in GDB host side,I set breakpoint fzchuan> on some address,i.e.: (gdb)b *0x8 fzchuan> Then, in target side, target will receive the request. I fzchuan> print the message received from GDB host, and it shows that fzchuan> GDB ask target to stop at 0xc6 fzchuan> I use GDB disassemble to query 0x8, and is shows that it is fzchuan> a Call (JUMP) instruction and jump target address is 0xc6. fzchuan> Why? thanks You probably did a step command. Step is usually done by setting a breakpoint at the address after the instruction. For jumps, that "next" address is the target address. paul