public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: tromey@redhat.com (Tom Tromey)
Cc: pierre.muller@ics-cnrs.unistra.fr (Pierre Muller),
	       gdb-patches@sourceware.org, eliz@gnu.org ('Eli Zaretskii')
Subject: Re: [RFA-v3] Allow explicit 16 or 32 char in 'x /s'
Date: Mon, 05 Jul 2010 10:17:00 -0000	[thread overview]
Message-ID: <201007051017.o65AHXIE004417@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <m3lj9tln0a.fsf@fleche.redhat.com> from "Tom Tromey" at Jul 02, 2010 01:08:53 PM

Tom Tromey wrote:
> >>>>> "Ulrich" =3D=3D Ulrich Weigand <uweigand@de.ibm.com> writes:
> 
> Ulrich> This test required that malloc is present in the inferior; if target
> Ulrich> code is statically linked, we need to make sure the routine gets
> Ulrich> pulled in (just like other testcases already do).
> 
> Ulrich> 	* gdb.base/charset.c (main): Make sure malloc gets linked in.
> 
> With this patch I now get:
> 
> Running ../../../src/gdb/testsuite/gdb.base/charset.exp ...
> gdb compile failed, ../../../src/gdb/testsuite/gdb.base/charset.c: In function 'main':
> ../../../src/gdb/testsuite/gdb.base/charset.c:126: warning: incompatible implicit declaration of built-in function 'malloc'

Huh, sorry about that.

> It isn't safe here to include <stdlib.h>, since this test intentionally
> defines its own "wchar_t".
> 
> Adding:
> 
> extern void *malloc (int);
> 
> works for me, but it seems possibly problematic.

Yes, it really should be size_t, not int (and that may be a real issue
on some 64-bit systems).  But if you cannot include standard headers,
you don't get size_t either ...

> Maybe adding -fno-builtin for gcc is the thing to do?
> 
> I am not really sure what is best.  Any other ideas?

Can we split the testcase so that the parts that require the
non-standard wchar_t definition are separate from the parts
that construct strings in the inferior?

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com

  reply	other threads:[~2010-07-05 10:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <11484.4708740295$1268865815@news.gmane.org>
2010-03-18 22:08 ` [RFC] " Tom Tromey
2010-03-19  7:32   ` Eli Zaretskii
2010-03-22 22:54     ` Pierre Muller
     [not found]     ` <15103.6087111153$1269298497@news.gmane.org>
2010-03-30 20:33       ` Tom Tromey
2010-03-31 16:11         ` [RFC-v2] " Pierre Muller
     [not found]         ` <006101cad0ec$cb7915d0$626b4170$%muller@ics-cnrs.unistra.fr>
2010-03-31 16:17           ` Eli Zaretskii
2010-04-01  9:34             ` Pierre Muller
     [not found]             ` <000f01cad17e$7686f140$6394d3c0$%muller@ics-cnrs.unistra.fr>
2010-04-01 13:17               ` Eli Zaretskii
2010-04-05 23:01                 ` Pierre Muller
     [not found]                 ` <002701cad513$e44a7420$acdf5c60$%muller@ics-cnrs.unistra.fr>
2010-04-06 17:51                   ` Eli Zaretskii
2010-04-08 20:58                     ` [RFA-v3] " Pierre Muller
2010-04-16  8:41                       ` [PING] " Pierre Muller
     [not found]                       ` <48335.255837492$1271407316@news.gmane.org>
2010-04-21 22:49                         ` Tom Tromey
2010-04-21 23:22                           ` Pierre Muller
2010-06-11 17:38                       ` Ulrich Weigand
2010-07-02 19:09                         ` Tom Tromey
2010-07-05 10:17                           ` Ulrich Weigand [this message]
2010-07-20 20:13                             ` [patch] testsuite: regression on failed charset.exp compilation [Re: [RFA-v3] Allow explicit 16 or 32 char in 'x /s'] Jan Kratochvil
2010-07-20 22:00                               ` Tom Tromey
2010-07-20 22:13                                 ` Jan Kratochvil

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=201007051017.o65AHXIE004417@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=pierre.muller@ics-cnrs.unistra.fr \
    --cc=tromey@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).