This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Build question
- From: Eli Zaretskii <eliz at gnu dot org>
- To: danny dot backx at scarlet dot be
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 05 Sep 2009 19:09:31 +0300
- Subject: Re: Build question
- References: <1250803105.11282.96.camel@pavilion> <m3fxbl2jib.fsf@fleche.redhat.com> <83d46pgjkq.fsf@gnu.org> <1250877901.11282.116.camel@pavilion> <83ab1tgh9h.fsf@gnu.org> <1250880746.11282.128.camel@pavilion> <m3r5v425lu.fsf@fleche.redhat.com> <1250931899.11282.142.camel@pavilion> <83skfkfa4n.fsf@gnu.org> <1251095160.16357.352.camel@pavilion> <1251828295.6106.119.camel@pavilion> <83zl9e8nro.fsf@gnu.org> <1251835928.6106.124.camel@pavilion> <83vdk281xb.fsf@gnu.org> <1252143311.6106.252.camel@pavilion>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Danny Backx <danny.backx@scarlet.be>
> Cc: gdb@sourceware.org
> Date: Sat, 05 Sep 2009 11:35:11 +0200
Patches should be sent to gdb-patches@ (redirected).
> ESR said "early and often", right ? Here is a first draft of my work.
> Showing this early allows you to steer me in the right direction.
Thanks.
> Otherwise, this code appears to work for me. I hardcoded the variable in
> gdb/main.c, set this to both 0 and 1 for testing, and saw the expected
> results.
Later we should probably have a user option to control that.
> Should I copy code that handles a variable like "solib-search-path" or
> "annotate" to set the _have_dos_based_file_system at runtime ?
Yes, IMO.
> +/* Filesystem type */
> +int _have_dos_based_file_system = 1;
I don't like its starting with an underline. This is a normal
variable, no need to pretend it's internal or something.
> + if (_have_dos_based_file_system) {
Please use the GNU style of brace-placing.
> + } else {
Ditto.
> +/*
> + * Defined in gdb/main.c
> + *
> + * This determines whether we have
> + * as a separator : / or \
> + * a prefix [a-z]: or not
> + * Replaces HAVE_DOS_BASED_FILE_SYSTEM and FILENAME_PREFIX_LEN.
> + *
> + * Case sensitive/insensitive file name comparison is *not* influenced by this.
> + */
This is not the GNU style of comments.
> +static inline int _isalpha(int c)
> +{
> + if (c <= 'Z' && c >= 'A')
> + return TRUE;
> + if (c <= 'z' && c >= 'a')
> + return TRUE;
> + return FALSE;
> +}
I'm not sure what The Powers That Be think about defining inline
functions in a header. In general, if a host does not support the
`inline' keyword, it will be defined away, so you get several
identically-named functions in the same program (although I think
`static' prevents them from causing a link error).