Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: Pedro Alves <palves@redhat.com>
Cc: Mark Kettenis <mark.kettenis@xs4all.nl>, <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Use sized types in tracepoint.
Date: Tue, 10 Apr 2012 14:00:00 -0000	[thread overview]
Message-ID: <4F843CB0.5020302@codesourcery.com> (raw)
In-Reply-To: <4F6362F0.2050906@redhat.com>

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 <stdint.h>
lynx-i386-low.c:#include <stdint.h>
lynx-ppc-low.c:#include <stdint.h>
thread-db.c:#include <stdint.h>
tracepoint.c:#include <stdint.h>
win32-low.c:#include <stdint.h>

tracepoint.c is the only one file using stdint.h conditionally.

> On 03/16/2012 01:46 PM, Yao Qi wrote:
>> +#include <inttypes.h>
>>  #if HAVE_STDINT_H
>        ^^^^^^^^^^^^^
>>  #include <stdint.h>
>>  #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 (齐尧)


  reply	other threads:[~2012-04-10 14:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-16 13:48 Yao Qi
2012-03-16 15:50 ` Mark Kettenis
2012-03-16 15:57   ` Pedro Alves
2012-04-10 14:00     ` Yao Qi [this message]
2012-04-10 14:17       ` Pedro Alves
2012-04-10 14:45         ` Aleksandar Ristovski
2012-04-10 15:29           ` Aleksandar Ristovski
2012-04-12 13:59           ` Yao Qi
2012-04-12 15:11             ` gdbserver: include stdint.h unconditionally Pedro Alves
2012-03-16 19:05   ` [PATCH] Use sized types in tracepoint Tom Tromey
2012-03-16 23:17     ` Mark Kettenis
2012-03-20 20:49       ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F843CB0.5020302@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mark.kettenis@xs4all.nl \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox