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] |
Although I wrote `isalnum' it is a wrong character class, for example isalnum ('_') == 0 but `_' is a valid identifier character.
All these cases should be written like p[6] both for the IMO better readability and for making it less fragile against bugs like `(*p + 6)'.
There may be also "task" catching but that is used by Ada and it already worked before without such exception so it is probably OK.
It seems to me here could be sufficient instead of is_overloaded just: if (*p == '(')
Or do you have a countercase where it would not work?
*(p + 5) == '\'' -> strchr (get_gdb_completer_quote_characters (), p[5]) != NULL
Underrun of the strings you reported as present even in pre-physname GDB so I have just filed it as: decode_linespec_1 vagrind errors on "" http://sourceware.org/bugzilla/show_bug.cgi?id=12535
+ if (current_language->la_language == language_cplus + || current_language->la_language == language_java) + p = keep_name_info (p);
Wrong indentation.
It seems to me here could be sufficient instead of is_overloaded just: if (strchr (copy, '(') != NULL)
Or do you have a countercase where it would not work?
It is approved with these changes if you agree with them. I do not expect anyone else is going to futher review it.
Attachment:
linespec.c.patch
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |