Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 580873: Remove error checking on dprintf parameters #90

Merged

Conversation

jonahgraham
Copy link
Member

The parser for dprintf parameters was much too simplistic andprevents real uses cases from operating.

It is not necessary to remove the , between the arguments to dprintf, so don't try to split on that anymore. That also means we can't check for and error on mismatch between format specifiers and number of arguments.

e.g. "===> XML_EVENT_TEXT(%s)\n", (char *)strtok(Text,"\n") should be permitted.

The alternative would be to write a more complete parser for both the printf specification and the arguments. Well out of scope and unnecessary.

Some inputs may now be accepted by the GUI and then when inserted with GDB fail. These errors are displayed in the GUI already anyway.

@jonahgraham jonahgraham marked this pull request as draft October 7, 2022 16:23
@jonahgraham
Copy link
Member Author

jonahgraham commented Oct 7, 2022

This is a draft because it needs:

  • tests updated
  • API notes updated due to removal of Messages from API
  • N&N entry(?)

@jonahgraham jonahgraham added this to the 11.0.0 milestone Oct 9, 2022
@jonahgraham jonahgraham marked this pull request as ready for review October 9, 2022 20:26
@jonahgraham jonahgraham marked this pull request as draft October 9, 2022 20:29
@github-actions
Copy link

github-actions bot commented Oct 9, 2022

Test Results

     645 files       645 suites   46m 1s ⏱️
11 454 tests 11 317 ✔️ 133 💤 4
11 417 runs  11 280 ✔️ 133 💤 4

For more details on these failures, see this check.

Results for commit c4c57c0.

♻️ This comment has been updated with latest results.

The parser for dprintf parameters was much too simplistic and
prevents real uses cases from operating.

It is not necessary to remove the , between the arguments to
dprintf, so don't try to split on that anymore. That also
means we can't check for and error on mismatch between format
specifiers and number of arguments.

e.g. "===> XML_EVENT_TEXT(%s)\n", (char *)strtok(Text,"\n")
should be permitted.

The alternative would be to write a more complete parser for
both the printf specification and the arguments. Well out of
scope and unnecessary.

Some inputs may now be accepted by the GUI and then when
inserted with GDB fail. These errors are displayed in the
GUI already anyway.
@jonahgraham jonahgraham marked this pull request as ready for review October 20, 2022 14:27
@jonahgraham jonahgraham merged commit 6cd2e97 into eclipse-cdt:main Oct 20, 2022
@jonahgraham jonahgraham deleted the better_dprintf_error_handling branch October 20, 2022 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant