The language must be known in order to correctly set the name_type_mask for languages like Pascal and Java. For example, to set a breakpoint on 'ns.foo' for a Pascal function 'foo' in namespace 'ns', we need to know that the language is Pascal in order to set the lookup masks to (eFunctionNameTypeMethod | eFunctionNameTypeBase) and the basename to "foo", just as we would in C++ for 'ns::foo'.
Previous patch (rejected):
This patch solves this problem by using the language of the selected frame (similar to gdb). Getting the language from user settings is also planned. This patch (and others) paves the way for the PascalLanguageRuntime support to come, which will be called if the language is Pascal.
New patch:
Target and breakpoints options were added:
breakpoint set --language lang --name func settings set target.language pascal
These specify the Language to use when interpreting the breakpoint's expression (note: currently only implemented for breakpoints on identifiers). If the breakpoint language is not set, the target.language setting is used. These are needed This support is required by Pascal, for example, to set breakpoint at 'ns.foo' for function 'foo' in namespace 'ns'.
Tests on the language were also added to Module::PrepareForFunctionNameLookup for efficiency.