From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28608 invoked by alias); 18 Jul 2014 19:27:21 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 28547 invoked by uid 89); 18 Jul 2014 19:27:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 18 Jul 2014 19:27:19 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6IJRIS9028241 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 18 Jul 2014 15:27:18 -0400 Received: from barimba.redhat.com (ovpn-113-27.phx2.redhat.com [10.3.113.27]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6IJRHfs019114 for ; Fri, 18 Jul 2014 15:27:17 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Subject: [PATCH 0/4] baby step toward multi-target Date: Fri, 18 Jul 2014 19:27:00 -0000 Message-Id: <1405711635-1102-1-git-send-email-tromey@redhat.com> X-SW-Source: 2014-07/txt/msg00513.txt.bz2 My multi-target branch is basically dead, I think, mostly due to heavy conflicts with all the other target changes that have happened in the meantime. However recently I realized that there is a less invasive way to achieve many of the same effects, and a way to salvage some of the smaller cleanups done there. In particular on the branch I attempted to split target_ops into a vtable-like object and a target state object. As you might imagine this patch touches a large amount of code and is hard both to keep up to date, and to test. This little series, on the other hand, takes a less invasive approach. The idea here is that rather than doing a huge target_ops split, instead just sometimes make copies of the target_ops when pushing. This lets the copies keep their own state; copies are needed in the long run because multiple target stacks will be active and a given target_ops only has one "beneath" pointer. Here corelow is used as the example of how to do a conversion. There's a bit of cleanup and infrastructure initially, and then the final patch moves the corelow global state into a new subclass of target_ops, which is instantiated and pushed. If this approach seems reasonable then it's not too hard to pull over some of the other target conversions from the branch. This series also shows the spots to change if you want to make the debug target wrap each stratum in the target stack -- each wrapping debug target would be to_xclose-ish, and spots like target_is_pushed would be taught to unwrap. Built and regtested on x86-64 Fedora 20.