Porting Wine

Hi,

I’m trying to port Wine on QNX. Seemed like a doomed
attempt from the beginning, but I’m willing to give it
a shot. So, has someone already done this?

Right now I’ve gotten somewhere, but currently need to
set/get the x86 registers for another process. there seems
to be no /sys/ptrace.h that wine would normally use,
and ucontext.h or something seemed to define a
getcontext(…) but it was commented out and seemed to
revolve around a linked list of structures with nothing
but registers. So how do I set regs of a particular pid?

Could I get GDB sources for QNX and find some additional
help there?

-mooz

That should be doable through /proc fs, which is kinda similar to SVR4 but
not quite :wink:
You might want to take a look at SPIN source to see how to deal with it:
http://members.home.com/kovalenko/software/spin.html. It does not set
registers, but source is easy enough to understand so it’s good starting
point. If you follow system headers you might just find what you need among
data structures (I vaguely remember there was something of that sort).

There is pidin source at QNX CVS repository (http://cvs.qnx.com), it can
provide more information about how to pull various stuff out of /proc, but
it’s source is rather hard to follow due to heavy use of function pointers.
Tracing it in debugger might help.

The GDB source is at Colin’s page: http://staff.qnx.com/~cburgess/gnu/

Have fun,

  • Igor

“Mooz” <mooz@welho.com> wrote in message news:9i89ge$is6$1@inn.qnx.com

Hi,

I’m trying to port Wine on QNX. Seemed like a doomed
attempt from the beginning, but I’m willing to give it
a shot. So, has someone already done this?

Right now I’ve gotten somewhere, but currently need to
set/get the x86 registers for another process. there seems
to be no /sys/ptrace.h that wine would normally use,
and ucontext.h or something seemed to define a
getcontext(…) but it was commented out and seemed to
revolve around a linked list of structures with nothing
but registers. So how do I set regs of a particular pid?

Could I get GDB sources for QNX and find some additional
help there?

-mooz

Of course, once you get past that hurdle, you’ll run into another much nastier problem: function name conflicts between windows/wine calls and NTO calls. I think it was DebugBreak() that did it for me.

That’s pretty much where I gave up on trying to port wine to NTO.

Btw, I used the GDB source to get the info for getting and setting registers. There’s a few bits that are a little opaque, but it’s good enough for basic functionality.


Cheers - Tony ‘Nicoya’ Mantler :slight_smile:

Previously, Igor Kovalenko wrote in qdn.public.qnxrtp.porting:

That should be doable through /proc fs, which is kinda similar to SVR4 but
not quite > :wink:
You might want to take a look at SPIN source to see how to deal with it:
http://members.home.com/kovalenko/software/spin.html> . It does not set
registers, but source is easy enough to understand so it’s good starting
point. If you follow system headers you might just find what you need among
data structures (I vaguely remember there was something of that sort).

There is pidin source at QNX CVS repository (> http://cvs.qnx.com> ), it can
provide more information about how to pull various stuff out of /proc, but
it’s source is rather hard to follow due to heavy use of function pointers.
Tracing it in debugger might help.

The GDB source is at Colin’s page: > http://staff.qnx.com/~cburgess/gnu/

Have fun,

  • Igor

“Mooz” <> mooz@welho.com> > wrote in message news:9i89ge$is6$> 1@inn.qnx.com> …
Hi,

I’m trying to port Wine on QNX. Seemed like a doomed
attempt from the beginning, but I’m willing to give it
a shot. So, has someone already done this?

Right now I’ve gotten somewhere, but currently need to
set/get the x86 registers for another process. there seems
to be no /sys/ptrace.h that wine would normally use,
and ucontext.h or something seemed to define a
getcontext(…) but it was commented out and seemed to
revolve around a linked list of structures with nothing
but registers. So how do I set regs of a particular pid?

Could I get GDB sources for QNX and find some additional
help there?

-mooz


\


Tony Mantler | Proud ---- Days since the last
QNX Consulting | of our | 27 |
tony@astra.mb.ca | Record ---- “Gerbil Incident”