From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25523 invoked by alias); 5 Mar 2003 17:38:16 -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 25510 invoked from network); 5 Mar 2003 17:38:15 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by 172.16.49.205 with SMTP; 5 Mar 2003 17:38:15 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id 2595959D356; Wed, 5 Mar 2003 18:38:14 +0100 (CET) Received: from suse.cz (naga.suse.cz [10.20.1.16]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id h25HcE410094; Wed, 5 Mar 2003 18:38:14 +0100 X-Authentication-Warning: chimera.suse.cz: Host naga.suse.cz [10.20.1.16] claimed to be suse.cz Message-ID: <3E663605.6030105@suse.cz> Date: Wed, 05 Mar 2003 17:38:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: Andrew Cagney Cc: GDB Patches Subject: Re: [patch/rfc] Add a sentinel frame References: <3E305670.3020700@redhat.com> <3E48378E.6090007@suse.cz> <3E492953.8010001@redhat.com> <3E52173B.1030800@suse.cz> <3E538770.6070209@redhat.com> <3E5B98D8.3030002@suse.cz> <3E5BAB7D.8090801@redhat.com> <3E5BD957.9010605@suse.cz> <3E5BDCBD.2030205@redhat.com> <3E5C7512.2080207@suse.cz> <3E5E58FC.3080704@redhat.com> <3E5F5DEE.3030505@suse.cz> <3E5F8559.1020708@redhat.com> In-Reply-To: <3E5F8559.1020708@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg00124.txt.bz2 Andrew Cagney wrote: > Well, to fix this specific bug I think you'd just need to implement: > > save_dummy_frame_tos() > unwind_dummy_id() (see uncommitted patch I posted). > > And ensure that the top-of-stack value saved by save_dummy_frame_tos() > matches the id.base value returned by unwind_dummy_id(). I added this: Index: dummy-frame.c =================================================================== RCS file: /cvs/src/src/gdb/dummy-frame.c,v retrieving revision 1.10 diff -u -p -r1.10 dummy-frame.c --- dummy-frame.c 19 Jan 2003 17:39:16 -0000 1.10 +++ dummy-frame.c 5 Mar 2003 17:30:56 -0000 @@ -246,6 +246,17 @@ generic_save_dummy_frame_tos (CORE_ADDR dummy_frame_stack->top = sp; } +struct frame_id +generic_unwind_dummy_id (struct gdbarch *gdbarch, struct frame_info *frame) +{ + static struct frame_id id; + + id.base = dummy_frame_stack->top; + id.pc = frame->pc; + + return id; +} + /* Record the upper/lower bounds on the address of the call dummy. */ void and registered to the target: set_gdbarch_save_dummy_frame_tos (gdbarch,generic_save_dummy_frame_tos); set_gdbarch_unwind_dummy_id (gdbarch, generic_unwind_dummy_id); I don't know if everything works as it should, but at least simple (gdb) print func(123) doesn't segfault and surprisingly even returns a result! Does the above look correct to you? Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * (+420) 296.545.373 * http://www.suse.cz