This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Crash of Archer's gdb on mingw (passing null argument to vasprintf)
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Joost van der Sluis <joost at cnoc dot nl>
- Cc: gdb at sourceware dot org
- Date: Mon, 3 Oct 2011 07:59:04 -0700
- Subject: Re: Crash of Archer's gdb on mingw (passing null argument to vasprintf)
- References: <1317634777.28003.15.camel@feddie.cnoc.lan>
> In gdbtypes.c there's this code:
>
> warning (_("Range for type %s has invalid bounds %s..%s"),
> TYPE_NAME (type), plongest (TYPE_LOW_BOUND (range_type)),
> plongest (TYPE_HIGH_BOUND (range_type)));
>
> This goes wrong when TYPE_NAME (type) is null.
We should several example of us handling this type of situation.
Typically we use:
TYPE_NAME (type) ? TYPE_NAME (type) : "<anonymous>"
or something like that.
--
Joel