Skip to content

[M680X] Fix #1483: errors logged to stderr, using abort (2)#1489

Merged
aquynh merged 1 commit intocapstone-engine:nextfrom
aladur:stderr2
May 20, 2019
Merged

[M680X] Fix #1483: errors logged to stderr, using abort (2)#1489
aquynh merged 1 commit intocapstone-engine:nextfrom
aladur:stderr2

Conversation

@aladur
Copy link
Copy Markdown
Contributor

@aladur aladur commented May 18, 2019

  • This is not suitable for an application framework
    especially for kernel code.
  • All these error conditions do not occur under normal conditions.
    They only can occur if a maintainer (in the future) would make
    inappropriate changes to the M680X code base.
  • Added CS_ASSERT macro which allows to use assertions when debugging.

Comment thread arch/M680X/M680XDisassembler.c Outdated
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef CAPSTONE_DEBUG
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could move this into cs_priv.h so that other files don't need to manually include.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@tmfink
Copy link
Copy Markdown
Contributor

tmfink commented May 18, 2019

We should also document this macro.

@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented May 19, 2019 via email

…t (2)

- This is not suitable for an application framework
  especially for kernel code.
- All these error conditions do not occur under normal conditions.
  They only can occur if a maintainer (in the future) would make
  inappropriate changes to the M680X code base.
- Added CS_ASSERT macro which allows to use assertions when debugging
  by defining CAPSTONE_DEBUG.
- Updated compiler documenation
@tmfink
Copy link
Copy Markdown
Contributor

tmfink commented May 19, 2019

Looks good to me.

@aquynh aquynh merged commit f9ebfae into capstone-engine:next May 20, 2019
@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented May 20, 2019

merged, thanks!

aquynh pushed a commit that referenced this pull request May 20, 2019
- This is not suitable for an application framework
  especially for kernel code.
- All these error conditions do not occur under normal conditions.
  They only can occur if a maintainer (in the future) would make
  inappropriate changes to the M680X code base.
- Added CS_ASSERT macro which allows to use assertions when debugging
  by defining CAPSTONE_DEBUG.
- Updated compiler documenation
@tmfink
Copy link
Copy Markdown
Contributor

tmfink commented May 20, 2019

@aladur nice work! Could you make a PR for v4 branch also? This is a backwards-compatible change.

@aquynh
Copy link
Copy Markdown
Collaborator

aquynh commented May 20, 2019 via email

@tmfink
Copy link
Copy Markdown
Contributor

tmfink commented May 20, 2019

@aquynh I'll handle RISCV

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.

3 participants