[RFA] Constify find_condition_and_thread
Tom Tromey
tromey@redhat.com
Fri Mar 1 19:33:00 GMT 2013
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> An alternative would be to perhaps make the interface of
Pedro> parse_exp_1 similar to strtol -- split input and output
Pedro> pointers, with the explicit guarantee that the output pointer
Pedro> points somewhere within the input string. Is it really that
Pedro> messy? There doesn't seem to be many parse_exp_1 callers.
I think the problem is that the parsers probably do modify the input
string. So, you couldn't pass in a readonly string.
E.g., see c-exp.y:parse_number. It modifies the string, but then
modifies it back.
Tom
More information about the Gdb-patches
mailing list