From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4078 invoked by alias); 7 Jun 2004 15:20:40 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4071 invoked from network); 7 Jun 2004 15:20:39 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 7 Jun 2004 15:20:39 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1BXLvS-0004dE-9n; Mon, 07 Jun 2004 11:20:38 -0400 Date: Mon, 07 Jun 2004 15:20:00 -0000 From: Daniel Jacobowitz To: Randolph Chung Cc: gdb-patches@sources.redhat.com, Andrew Cagney Subject: Re: [patch/rfa] Allow breakpoing to be added after inferior has started Message-ID: <20040607152038.GA17470@nevyn.them.org> Mail-Followup-To: Randolph Chung , gdb-patches@sources.redhat.com, Andrew Cagney References: <20040522023133.GG7207@tausq.org> <40B38DC8.30601@gnu.org> <20040525183043.GH7207@tausq.org> <20040607030413.GD601@tausq.org> <20040522023133.GG7207@tausq.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040607030413.GD601@tausq.org> <20040522023133.GG7207@tausq.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-06/txt/msg00124.txt.bz2 On Fri, May 21, 2004 at 07:31:33PM -0700, Randolph Chung wrote: > The shlib-call.exp test fails on hppa (also ia64) because it tries to > add a breakpoint before the inferior is started, so there's no where > to put the breakpoint. gdb can handle this case if we allow pending > breakpoints in the test. > > this only works on x86 and some other architectures because they put > instructions into the plt; but some architectures put addresses in the > plt. This is a naming issue only. Some architectures call the table of addresses the PLT and have another fancy name for the stubs; other architectures put the table of addresses in .got.plt in the GOT, and call the stubs "PLT entries". Your import stub serves the same purpose as a PLT entry "normally" would. This is why I was so confused by your explanation - PLT slots are "normally" code :) The difference on HPPA is that the undefined symbol for printf has a value of 0 instead of a value pointing at the beginning of the import stub. Some other architectures do this also. It's a generally legitimate thing to do; if we worked really hard at it, we could reconstruct the address of the import stub by grubbing around in the text section, symbols, and relocations, but it would be quite complicated. > > ok to commit? > > randolph > > 2004-05-21 Randolph Chung > > * gdb.base/shlib-call.exp: Allow breakpoint to be added after inferior > has started. OK. -- Daniel Jacobowitz