This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch 3/3] Fortran modules namespaces [rediff]
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 01 Jun 2010 16:01:26 -0600
- Subject: Re: [patch 3/3] Fortran modules namespaces [rediff]
- References: <20100430182409.GC19190@host0.dyn.jankratochvil.net> <20100508055452.GA27443@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> Small update due to the checked-in `[patch 1/3] Make obconcat use stdarg'.
Thanks. I'm sorry about the long delay in reviewing this.
Jan> This case sensitivy problem is a bug of all of gdb, gfortran, PGF
Jan> and iFort, filed as GDB PR fortran/11560 and GCC PR debug/43950.
Yeah, and Pascal.
Jan> There has to be made a decision how to make fully-qualified reference of
Jan> symbols in modules. Fortran language itself must always import any such
Jan> symbol into the local namespace. C++ uses just "::" for such case.
Jan> iDB (Intel Debugger) uses character `
[...]
Jan> As GDB prints just "void" (or "VOID") on "$any$garbage" the
Jan> character $ is not usable and I have chosen '. If there are no
Jan> concerns about some compatibility with iDB I would vote for "::".
I think that if there is no choice arising from the language (I don't
know Fortran) then it is up to you.
Jan> --- a/gdb/cp-namespace.c
Jan> +++ b/gdb/cp-namespace.c
Jan> @@ -32,6 +32,7 @@
Jan> #include "command.h"
Jan> #include "frame.h"
Jan> #include "buildsym.h"
Jan> +#include "language.h"
Jan> static struct symbol *lookup_namespace_scope (const char *name,
Jan> const struct block *block,
Jan> @@ -260,6 +261,15 @@ cp_lookup_symbol_in_namespace (const char *namespace,
Jan> {
Jan> return lookup_symbol_file (name, block, domain, 0);
Jan> }
Jan> + else if (current_language->la_language == language_fortran)
I don't think we should introduce uses of current_language into this code.
It should probably just be an argument.
Tom