From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4017 invoked by alias); 6 Nov 2003 20:03:31 -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 3987 invoked from network); 6 Nov 2003 20:03:30 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 6 Nov 2003 20:03:30 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 46E552B8F; Thu, 6 Nov 2003 15:03:25 -0500 (EST) Message-ID: <3FAAA90D.3040104@redhat.com> Date: Thu, 06 Nov 2003 20:03:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "J. Johnston" Cc: Andrew Cagney , Daniel Jacobowitz , Kevin Buettner , Marcel Moolenaar , gdb-patches@sources.redhat.com Subject: [commit] Fix two xfer partial bugs; Was; RFA: ia64 portion of libunwind patch References: <3F986E31.8050201@redhat.com> <1031024175718.ZM3475@localhost.localdomain> <3F996D88.9060505@redhat.com> <1031024185625.ZM9827@localhost.localdomain> <3F9F0180.2010702@redhat.com> <20031029012833.GA11070@nevyn.them.org> <3FA043B2.6090401@redhat.com> <3FA7F97B.4090909@redhat.com> Content-Type: multipart/mixed; boundary="------------070603000900070203040704" X-SW-Source: 2003-11/txt/msg00095.txt.bz2 This is a multi-part message in MIME format. --------------070603000900070203040704 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 589 Jeff, I've just committed the attached. It fixes two bugs when using xfer partial in an existing target. - the "add_target" method was always overriding the child's to_xfer_partial method. The consequence is that the code your patch adds is never called! - the code would all off the end of a stack which this part of the change fixed: * target.c (init_dummy_target): Initialize to_xfer_partial to default. I've one more tweak to the target code. Once thats in can you please confirm that this new child method is called and is needed - seems things work without it? Andrew --------------070603000900070203040704 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 1039 2003-11-06 Andrew Cagney Jeff Johnston * target.c (add_target): Only set "to_xfer_partial" when NULL. (init_dummy_target): Set "to_xfer_partial". Index: target.c =================================================================== RCS file: /cvs/src/src/gdb/target.c,v retrieving revision 1.64 diff -u -r1.64 target.c --- target.c 31 Oct 2003 15:25:34 -0000 1.64 +++ target.c 6 Nov 2003 19:55:45 -0000 @@ -220,7 +220,8 @@ add_target (struct target_ops *t) { /* Provide default values for all "must have" methods. */ - t->to_xfer_partial = default_xfer_partial; + if (t->to_xfer_partial == NULL) + t->to_xfer_partial = default_xfer_partial; if (!target_structs) { @@ -1644,6 +1645,7 @@ dummy_target.to_stratum = dummy_stratum; dummy_target.to_find_memory_regions = dummy_find_memory_regions; dummy_target.to_make_corefile_notes = dummy_make_corefile_notes; + dummy_target.to_xfer_partial = default_xfer_partial; dummy_target.to_magic = OPS_MAGIC; } --------------070603000900070203040704--