From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17562 invoked by alias); 21 May 2004 18:21:35 -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 17471 invoked from network); 21 May 2004 18:21:33 -0000 Received: from unknown (HELO pippin.tausq.org) (64.81.244.94) by sourceware.org with SMTP; 21 May 2004 18:21:33 -0000 Received: by pippin.tausq.org (Postfix, from userid 1000) id 56215CD2CB; Fri, 21 May 2004 11:21:38 -0700 (PDT) Date: Fri, 21 May 2004 18:21:00 -0000 From: Randolph Chung To: Andrew Cagney Cc: gdb@sources.redhat.com Subject: Re: [patch/rfc] How to handle stepping into an unresolved plt entry? Message-ID: <20040521182138.GN566@tausq.org> Reply-To: Randolph Chung References: <20040521064435.GJ566@tausq.org> <40AE27AC.6090205@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <40AE27AC.6090205@gnu.org> X-GPG: for GPG key, see http://www.tausq.org/gpg.txt User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-05/txt/msg00150.txt.bz2 > Hmm, should gdb put a greater reliance on SKIP_TRAMPOLINE_CODE. > Something like a new separate clause: > > if (we've stepped into a function > && we're not stopping in this sort of code > && skip trampoline returns something) > run to skip trampoline breakpoint, possibly doing a step into function sounds ok; i'm curious about what are the other trampoline cases that we need to deal with. i found another case on hppa where what needs to happen doesn't really match what infrun.c is doing (i'll describe it below), but it'll be good if somehow we can handle these in a sort of standard way so that h_i_e is actually understandable :) the other problem i've seen is when stepping into a shared library call -- again, this goes through a stub. gdb steps into the stub, but before it has a chance to skip over the stub, it hits this (since the stub has no corresponding symbol): if (step_over_calls == STEP_OVER_UNDEBUGGABLE && ecs->stop_func_name == NULL) { /* The inferior just stepped into, or returned to, an undebuggable function (where there is no symbol, not even a minimal symbol, corresponding to the address where the inferior stopped). Since we want to skip this kind of code, we keep going until the inferior returns from this function. */ [...] /* Set a breakpoint at callee's return address (the address at which the caller will resume). */ insert_step_resume_breakpoint (get_prev_frame (get_current_frame ()), ecs); keep_going (ecs); return; } if i move this block after the next block (that checks for stub frames and does SKIP_TRAMPOLINE_CODE () processing) then it works... I'm still trying to understand why the checks in h_i_e happen in the current order.... so i don't know whether this is a problem with h_i_e or somewhere else... randolph -- Randolph Chung Debian GNU/Linux Developer, hppa/ia64 ports http://www.tausq.org/