From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4623 invoked by alias); 12 Aug 2013 08:36:22 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 4614 invoked by uid 89); 12 Aug 2013 08:36:22 -0000 X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.2 Received: from mail-lb0-f173.google.com (HELO mail-lb0-f173.google.com) (209.85.217.173) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 12 Aug 2013 08:36:21 +0000 Received: by mail-lb0-f173.google.com with SMTP id 10so4608967lbf.32 for ; Mon, 12 Aug 2013 01:36:19 -0700 (PDT) X-Received: by 10.152.36.198 with SMTP id s6mr10951968laj.67.1376296579239; Mon, 12 Aug 2013 01:36:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.152.130.194 with HTTP; Mon, 12 Aug 2013 01:36:04 -0700 (PDT) From: Yue Lu Date: Mon, 12 Aug 2013 08:36:00 -0000 Message-ID: Subject: How to share code between [gdb]/gnu-nat.c with [gdb]/gdbserver/gnu-hurd-low.c? To: gdb@sourceware.org Cc: Luis Machado , Thomas Schwinge Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SW-Source: 2013-08/txt/msg00063.txt.bz2 Hi all, When I working with porting gdbserver to GNU/Hurd I found I alway need to duplicate code from [gdb]/gnu-nat.c to my new file [gdb]/gdb/server/gnu-hurd.low.c. There are too many functions and structures can be shared between the two file only need a little change or even without any change. I don't have good ideal to share the code, can you give me any suggestions? Thank you. --=20 Yue Lu (=E9=99=86=E5=B2=B3)