OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Programming => Topic started by: Mentore on June 22, 2015, 11:58:01 am

Title: ptrace and QtCreator
Post by: Mentore on June 22, 2015, 11:58:01 am
Hello all, kind of a different question. Once sure that Qt programs are compiled, I got back porting QtCreator 2.1 (the latest under Qt 4.7, AFAIK).

I got stuck, still, in compiling qtcreator_process_stub, an utility executable which was present also in the 1.3.1 version of Qt Creator for OS/2.

The source makes use of two ptrace calls, which I had to modify to make it compile (I'm not listing the modifications I'm making: Qt Creator 2.1 is really old, so I don't think it would be possible to include them in the official sources). And it compiles well but fails linking, complaining the absence of _ptrace from symbols.

This is indeed correct: I searched for ptrace in my development tree and found only the ptrace.h neader file - no .c, .cpp, .cc nor library file. Searching in the usual places didn't take me further.

From Wikipedia I'm seeing ptrace is useful but rather obsolete, so I was wondering if there's a ptrace for OS/2 or I have to delete those calls to make our version of QtCreator work. The one who developed the 1.3.1 version for OS/2 would be really of help in this circumstance.

Thanks in advance,
Mentore
Title: Re: ptrace and QtCreator
Post by: Dave Yeo on June 22, 2015, 07:29:53 pm
Well we do have sys/ptrace.h and it is listed as _ptrace() in emx/syscalls.h but I can only find it in emx.dll.
Look at the above mentioned headers, perhaps try calling _ptrace() instead of ptrace.
Looking at the kLIBC source there is a ptrace.asm file but seems to be from EMX. You might have to ask bird.
Title: Re: ptrace and QtCreator
Post by: Mentore on June 22, 2015, 08:26:20 pm
Well we do have sys/ptrace.h and it is listed as _ptrace() in emx/syscalls.h but I can only find it in emx.dll.
Look at the above mentioned headers, perhaps try calling _ptrace() instead of ptrace.
Looking at the kLIBC source there is a ptrace.asm file but seems to be from EMX. You might have to ask bird.

So there seems kLIBC still lacks something. I wonder if I got rid of ptrace calls what would happen... Thanks a lot Dave, you're always useful.

Mentore

EDIT: I took a look at an old porting guide (translated in Italian by me) and saw that one of the ptrace calls is useless (PTRACE_TRACEME) under emx, so I decided to try and remove both calls (the other is PTRACE_DETACH, and should just let the process end by itself. Maybe it won't harm to remove it.) I'm keeping notice of these modifications, also thanks to this discussion. Of course, removing ptrace let the compilation continue (until the next error of course ;) )
Title: Re: ptrace and QtCreator
Post by: Silvan Scherrer on June 23, 2015, 05:48:16 pm
Well we do have sys/ptrace.h and it is listed as _ptrace() in emx/syscalls.h but I can only find it in emx.dll.
Look at the above mentioned headers, perhaps try calling _ptrace() instead of ptrace.
Looking at the kLIBC source there is a ptrace.asm file but seems to be from EMX. You might have to ask bird.

So there seems kLIBC still lacks something. I wonder if I got rid of ptrace calls what would happen... Thanks a lot Dave, you're always useful.

Mentore

EDIT: I took a look at an old porting guide (translated in Italian by me) and saw that one of the ptrace calls is useless (PTRACE_TRACEME) under emx, so I decided to try and remove both calls (the other is PTRACE_DETACH, and should just let the process end by itself. Maybe it won't harm to remove it.) I'm keeping notice of these modifications, also thanks to this discussion. Of course, removing ptrace let the compilation continue (until the next error of course ;) )

Just a small note: you know that we have QtCreator 2.2.1 and that there is even a rpm for it?

regards
Silvan
Title: Re: ptrace and QtCreator
Post by: Mentore on June 26, 2015, 09:57:59 am
Well we do have sys/ptrace.h and it is listed as _ptrace() in emx/syscalls.h but I can only find it in emx.dll.
Look at the above mentioned headers, perhaps try calling _ptrace() instead of ptrace.
Looking at the kLIBC source there is a ptrace.asm file but seems to be from EMX. You might have to ask bird.

So there seems kLIBC still lacks something. I wonder if I got rid of ptrace calls what would happen... Thanks a lot Dave, you're always useful.

Mentore

EDIT: I took a look at an old porting guide (translated in Italian by me) and saw that one of the ptrace calls is useless (PTRACE_TRACEME) under emx, so I decided to try and remove both calls (the other is PTRACE_DETACH, and should just let the process end by itself. Maybe it won't harm to remove it.) I'm keeping notice of these modifications, also thanks to this discussion. Of course, removing ptrace let the compilation continue (until the next error of course ;) )

Just a small note: you know that we have QtCreator 2.2.1 and that there is even a rpm for it?

regards
Silvan

WHA?
Didn't know this. Where can I fetch it from?
To be honest, porting QtCreator is kind of a complex work, so it would have been interesting to complete it. But I'm having a little too many problems, so if there were a newer version available I would gladly welcome it.

Mentore
Title: Re: ptrace and QtCreator
Post by: Silvan Scherrer on June 26, 2015, 11:36:08 am
Quote


WHA?
Didn't know this. Where can I fetch it from?
To be honest, porting QtCreator is kind of a complex work, so it would have been interesting to complete it. But I'm having a little too many problems, so if there were a newer version available I would gladly welcome it.

Mentore
yum install qtcreator installs it nicely