This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Interactions of symbol-lookup with language
- From: "Paul N. Hilfinger" <hilfingr at otisco dot mckusick dot com>
- To: carlton at kealia dot com
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sat, 8 Nov 2003 14:55:19 -0800
- Subject: Interactions of symbol-lookup with language
- Reply-to: Hilfinger at gnat dot com
David,
The symbol-lookup facilities are now organized to adapt themselves to
the current language. We've encountered some problems with this.
In particular, in decode_line_1, there is a call to find_imps, an
Objective C function, which in turn calls lookup_symbol. When
decode_line_1 is called while in Ada mode, this latter lookup_symbol
acts like an Ada symbol lookup, which makes little sense given that
find_imps is concerned with Objective C code. We have encountered
cases where the result is anomalous.
Our fix for the moment is simply to put a wrapper around decode_objc
to force the language to objc temporarily. We are a little
uncomfortable with submitting this kind of kludge publicly, and
would prefer something officially blessed. One possibility is to have
a variant of lookup_symbol that allows one to specify a prevailing
language for those cases where it matters. We have at least one other
place where we'd like to "look up a symbol as in C".
In any case, we'd welcome your (and other maintainers') comments.
Paul Hilfinger
ACT, Inc.