-
Notifications
You must be signed in to change notification settings - Fork 573
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
i#7226: Move some macros used in .asm files into header files. #7202
Conversation
The macros are defined in offsets.h and the values are checked at compile time by offsets.c. Change-Id: I0a22ae5c0046769dc3fb763db8904d52530e48af
One could use a helper program on the host to automatically generate the header files that define the offsets, but that would be much more complex to implement and an ongoing maintenance burden in the build system. Since these offsets are very rarely changed, and any change of them will typically involve simultaneous intricate changes to assembly and code that generates assembly I don't think it makes sense to generate the header files automatically. Better just to check the values with something like this approach. One could use the preprocessor to make the source slightly simpler in a way, but it would then be much more complex in another way, and the error message when an offset is incorrect would be less readable, I think. Currently the error message looks like this:
I think that makes perfect sense to a programmer, and, if not, there's the comment preceding it in the source. Another option would be to generate an error message at run time. You would then have total control over what the message looks like, but an error at build time seems better. And using |
Change-Id: If271ed6c8c97ee5e636d2d7c2b012898812cbc28
Move some macros used in .asm files into header files. The macros are defined in offsets.h and the values are checked at compile time by offsets.cpp. Change-Id: If903c6cb8128ca955979eaba5c2d6eaf68374259
Change-Id: If0598cd9327ce075f77c20839dd9bad312a9f96e
Change-Id: Ibbd01c543f8a162557640142d488efd63589d2f2
Change-Id: I300e728dac8d4ca30c72d1b12f366b91c007fa7d
Change-Id: I008235196859c32ec4c2a9891cdbb4e9a6f63d2f
Change-Id: Ie574980db7deb75db6647005443915828147d274
Does this (/~https://github.com/DynamoRIO/dynamorio/actions/runs/12928500203/job/36055907604?pr=7202) make any sense to anyone?
I don't understand how it's getting from |
"#error REG_ enum conflict between DR and ucontext.h! Use DR_REG_ constants instead." Change-Id: I06cea0f27cc0cd817cd40228350ec2303e91d53f
It was added by 96cfabc in Oct 2010 and might not be useful any more? Change-Id: I89564eca250bd8e12745f0523874ec8b0807722f
It was also necessary to move some declarations around. Change-Id: Ib4c0419ae8332150a7b3cc476840384cf83e9e0e
Change-Id: Ie0d7d560a9e3579153e940f5cad851f442a02d6e
Change-Id: Ic1d3496ae991945c0666f8b2b026613d58872086
Change-Id: I3fb53b7067c44f02f80f1116331a907bf3bb5cbc
Change-Id: I28739ad149745f7dc4a9f3ffb3c918dabe14b4d4
Change-Id: I512ec112719549def9f90cd72f7a5316c5bec51a
Change-Id: I0b19252b3f8cc7e74285302d293ffa2a5d550590
Change-Id: I7f38fcc05eb8f923ca8a6ff35ff200b5bc82455e
Change-Id: I87304cd0c963a5de26bec3d28618a4170b4137bc
Change-Id: I011710a7634471237b33c9d4c0cac2f959c7a0a3
Change-Id: Id6e32d70c9f2705c39f2f423f83fa210c779e78d
Change-Id: Icbad0e3d2346bb078bc5c344aeb0bb1bc669bdbb
The macros are defined in asm_offsetsx.h and the values are checked at compile time by asm_offsets.c.
A few other changes were needed to make this work:
Some declarations are moved from mangle.c into a new file mangle_aarch64.h.
A declaration is moved from module_elf.c to module_private.h.
Issue: #7226