This is the mail archive of the gdb-patches@sourceware.org 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]

Re: [RFA] Constify find_condition_and_thread


>>>>> "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


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