This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Calling class-methods in pascal (fpc)

Hi all,

I've tried to call a method from a class in a pascal (fpc) application.
It didn't work when the language is set to Pascal. In that case it can't
find the method within the class definition. But when the language is
set to c++, it is possible to call the method.

What's happening is that in print_command_1() first parse_expression()
is called and thereafter evaluate_expression(). Now if lang=pascal,
parse_expression raises an error, because it doesn't recognize the
method as a member of the class-structure. (Because
lookup_struct_elt_type() does not check for nfn fields, but that's
beside the point)
But when lang=c++, parse_expression does not raise an exception, and
evaluate_expression does resolve the methodname. But even when the
class-member does not exist, parse_expression does not raise an
exception. The exception is raised in evaluate_expression.

Now to be able to fix this properly, I need to know what the function of
parse_expression() is compared to evaluate_expression()? To me it looks
like it that parse_expression is not needed at all.


Joost van der Sluis.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]