This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/9 v2] Introduce nat/linux-namespaces.[ch]
- From: Pedro Alves <palves at redhat dot com>
- To: James Greenhalgh <james dot greenhalgh at arm dot com>
- Cc: Gary Benson <gbenson at redhat dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Eli Zaretskii <eliz at gnu dot org>, Doug Evans <dje at google dot com>, Iago López Galeiras <iago at endocode dot com>
- Date: Thu, 11 Jun 2015 12:04:36 +0100
- Subject: Re: [PATCH 2/9 v2] Introduce nat/linux-namespaces.[ch]
- Authentication-results: sourceware.org; auth=none
- References: <555DF224 dot 8020101 at redhat dot com> <20150611084023 dot GA7361 at arm dot com>
On 06/11/2015 09:40 AM, James Greenhalgh wrote:
> I would expect that to mean this is broken for any
> "long int != ssize_t" target. I'm not sure which C standards GDB requires
> compatability with, but I believe the portable C99 way of printing a
> ssize_t would be "%zd".
GDB is written in C90 currently.
The usual way to handle this is to use plongest (with %s). As this
is native GNU/Linux code, casting to long (thus keep %ld) would
be fine too.
Thanks,
Pedro Alves