ispras / qdt

QEMU Development Toolkit
Other
36 stars 8 forks source link

Code generation fails for MemoryAliasNode #86

Open alexian79 opened 1 year ago

alexian79 commented 1 year ago

project.zip

Hi, I am having issue with generating machine that has MemoryAliasNode. I have attached compressed project.py. I am using QEMU 5.0.1 generation fails then checking for Type.exists, node.allias_offset is assigned to CINT object that is not string image

I am able to fix this in my case by adding this check image

but I am not sure that this is the right way. BR. Oleksiy

laerreal commented 1 year ago

Hi! This is acceptable workaround. But real problem is in machine.py.

Previously, alias_offset could be string only (containing either integer literal or name of a macro). Now it also can be a source.CConst's descendant.

There already are fixes for same problems in devel branch. I also will push a solution for this issue soon (in devel).

Please note, that master branch currently frizzing because we are busy in other projects. All bug fixes and new features now can be found in devel. With new bugs, of course. One day they will appear in master. Fixes and features, probably, will appear too.

laerreal commented 1 year ago

Done. Works for me with the project you provided.

alexian79 commented 1 year ago

Thanks for the tips about devel branch, will use that. Having a chance I would like to ask, Is there any work done on supporting qemu 6 and up, witch uses meson build? any chance devel branch was updated to use Python >= 3.9 Thanks, for replies.

laerreal commented 1 year ago

Hi!

I am currently developing models for 7.0.50 using devel. It should work for 6 too, probably. meson is supported. QDT has mechanism to keep compatibility with all versions of Qemu it ever supported. However, some new features may not work with old Qemu versions (which were actual before the features are added).

Yes, we also trying to support new versions of python. While still not dropping 2.7. As soon as Py3 tends to give compatibility surprises, an idea to drop it at all and maintain Py2 only (as it will never change) looks attracting to me...

alexian79 commented 1 year ago

Thanks for update, I am trying to follow your advice to use devel branch, and I see your fix to reported problem, but there are issues with pulling submodules. Looks like some of them have been relocated. I have attached log to see what is failing. I could find some of them in different places on github. Any advice on that will be appreciated. submodule_fails.txt

laerreal commented 1 year ago

Try to revert this patch. f5ebc8d598bffb2440700b3d2d39063cfbfb07b3 Other submodule references also should use https, as it's appear to require less rights for user.

laerreal commented 1 year ago

Updated devel.

laerreal commented 1 year ago

Now all modules use HTTPS.

alexian79 commented 1 year ago

That did the trick, submodule update works now. Thank you.