> >> > Well, the TRY..CATCH in your prototype would catch any error that may be > >> > thrown in parse_expression, and the `set_language' must take care of > >> > changing the language, so I would say that is enough... > >> > >> OK - I will send an updated patch that makes things a little cleaner. > >> I didn't know whether it was OK to default to type long makes much > >> sense when the probe says the parameter should be using type "mutex_t". > > I remember we had the same problem (i.e., not parsing using language_c) > on SystemTap SDT probes as well. Coincidentally or not, you triggered > the problem twice! The curse of using a cool language on exotic platforms :-). > > The problem occurs while trying to parse a probe's arguument, > > "argument" > > + if (current_language->la_language != language_c) > > + { > > + old_chain = make_cleanup_restore_current_language (); > > + set_language (language_c); > > + } > > Here I think you meant to use "lang" instead of "language_c", right? Duh... Thanks for reviewing the entire patch! Attached is what I just pushed. gdb/ChangeLog: * dtrace-probe.c (dtrace_process_dof_probe): Contain any exception raised while parsing the probe arguments. Force parsing to be done using the C language parser. * expression.h (parse_expression_with_language): Declare. * parse.c (parse_expression_with_language): New function. Tested on sparc-solaris and also on x86_64-linux, just for kicks. -- Joel