From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31914 invoked by alias); 10 Apr 2012 14:00:22 -0000 Received: (qmail 31801 invoked by uid 22791); 10 Apr 2012 14:00:17 -0000 X-SWARE-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Apr 2012 14:00:02 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SHbc0-0001p6-9B from Yao_Qi@mentor.com ; Tue, 10 Apr 2012 07:00:00 -0700 Received: from SVR-ORW-FEM-02.mgc.mentorg.com ([147.34.96.206]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 10 Apr 2012 06:59:59 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-fem-02.mgc.mentorg.com (147.34.96.168) with Microsoft SMTP Server id 14.1.289.1; Tue, 10 Apr 2012 06:59:59 -0700 Message-ID: <4F843CB0.5020302@codesourcery.com> Date: Tue, 10 Apr 2012 14:00:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Pedro Alves CC: Mark Kettenis , Subject: Re: [PATCH] Use sized types in tracepoint. References: <1331905618-2631-1-git-send-email-yao@codesourcery.com> <201203161550.q2GFoQhS029855@glazunov.sibelius.xs4all.nl> <4F6362F0.2050906@redhat.com> In-Reply-To: <4F6362F0.2050906@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 X-SW-Source: 2012-04/txt/msg00179.txt.bz2 On 03/16/2012 11:57 PM, Pedro Alves wrote: > On 03/16/2012 03:50 PM, Mark Kettenis wrote: > >> We have gnulib/stdint.h so using typedefs like int32_t should be ok. > > > GDBserver doesn't use gnulib, unfortunately. Thought, it looks like > the Linux, Windows and Lynx backends already unconditionally include stdint.h. > The NTO backend doesn't, so I'm not sure if we can include it unconditionally. > Unless I miss something, I don't see NTO-backend use stdint.h. $ grep stdint *.c *.h ax.c: be to import stdint.h from gnulib. */ linux-i386-ipa.c:#include lynx-i386-low.c:#include lynx-ppc-low.c:#include thread-db.c:#include tracepoint.c:#include win32-low.c:#include tracepoint.c is the only one file using stdint.h conditionally. > On 03/16/2012 01:46 PM, Yao Qi wrote: >> +#include >> #if HAVE_STDINT_H > ^^^^^^^^^^^^^ >> #include >> #endif > > So I'd like to see that HAVE_STDINT_H removed first. If this causes > trouble, the option would be for gdbserver to use gnulib proper. > What kind of trouble you expect to see? Unable to build? I removed HAVE_STDINT_H, and successfully build gdbserver on linux, gdbserver on mingw32, and gdbserver on tic6x-uclinux. Is it qualified as "cause no trouble"? In parallel, I am writing a patch to use gnulib in gdbserver. I am not sure how to place gnulib source tree. We have to choices here, - Import gnulib separately in gdbserver. We have to gnulib source trees in gdb and gdbserver respectively, some duplication. However, we gain some flexibility when gdb and gdbserver wants to import different modules of gnulib. - Use gnulib in gdb. Since gnulib is designed as a sub-dir of any project, if we don't import gnulib in gdbserver, we have to copy gnulib source to gdbserver source tree during build, and remove it when finished. Since we have a single source of gnulib, we have to import any modules that GDB or GDBserver needs. Former approach looks better for me. What do you think? -- Yao (齐尧)