Hello,
why is this devctl call returning a blank (all zero) nval structure when
I use the gcc V3.3.1 compiler ??
resp = devctl(fd, DCMD_IO_NET_GET_CONFIG, &nval, sizeof(nval), NULL);
I get correct values if I compile with gcc 2.95.3
Regards
–Armin
Armin Steinhoff wrote:
why is this devctl call returning a blank (all zero) nval structure
when I use the gcc V3.3.1 compiler ??
resp = devctl(fd, DCMD_IO_NET_GET_CONFIG, &nval, sizeof(nval), NULL);
I get correct values if I compile with gcc 2.95.3
Does the behaviour change at different optimisation levels (try -O, -O1,
-O2)?
Does the behaviour change if you memset() nval to all 0 before the call?
I assume you’re already doing this if it’s coming out all zero…
Is there an OS patch you haven’t installed yet?
Just wild guesses here, by the way.
–
Chris Herborth (cherborth@qnx.com) - Senior Zombiologist and Tech Writer
Never send a monster to do the work of an evil scientist.
Monthly QNX newsletter - http://www.qnx.com/news/forms/newsletter.html
Armin Steinhoff wrote:
why is this devctl call returning a blank (all zero) nval structure
when
I use the gcc V3.3.1 compiler ??
resp = devctl(fd, DCMD_IO_NET_GET_CONFIG, &nval, sizeof(nval), NULL);
I get correct values if I compile with gcc 2.95.3
WAG: size/alignment of nic_config_t depends on compiler. Is resp
really EOK, or actually ENOTTY (due to size change) in the failure case?
John Garvey wrote:
Armin Steinhoff wrote:
why is this devctl call returning a blank (all zero) nval structure when
I use the gcc V3.3.1 compiler ??
resp = devctl(fd, DCMD_IO_NET_GET_CONFIG, &nval, sizeof(nval), NULL);
I get correct values if I compile with gcc 2.95.3
WAG: size/alignment of nic_config_t depends on compiler. Is resp
really EOK, or actually ENOTTY (due to size change) in the failure case?
The returned value of resp is 48 → ENOTSUP
Best Regards
–Armin
Chris Herborth wrote:
Armin Steinhoff wrote:
why is this devctl call returning a blank (all zero) nval structure
when I use the gcc V3.3.1 compiler ??
resp = devctl(fd, DCMD_IO_NET_GET_CONFIG, &nval, sizeof(nval), NULL);
I get correct values if I compile with gcc 2.95.3
Does the behaviour change at different optimisation levels (try -O, -O1,
-O2)?
Good question …
Does the behaviour change if you memset() nval to all 0 before the call?
I assume you’re already doing this if it’s coming out all zero…
Is there an OS patch you haven’t installed yet? >
Yes … I have installed SP1
Best Regards
–Armin
Just wild guesses here, by the way.
Armin Steinhoff wrote:
Chris Herborth wrote:
Armin Steinhoff wrote:
why is this devctl call returning a blank (all zero) nval structure
when I use the gcc V3.3.1 compiler ??
resp = devctl(fd, DCMD_IO_NET_GET_CONFIG, &nval, sizeof(nval), NULL);
I get correct values if I compile with gcc 2.95.3
Does the behaviour change at different optimisation levels (try -O,
-O1, -O2)?
Good question …
and the answer is: the problem doesn’t depend on the -O switch!
The problem exists also without optimization!!
No problems with the 2.93.x compiler …
Best Regards
–Armin
Does the behaviour change if you memset() nval to all 0 before the
call? I assume you’re already doing this if it’s coming out all zero…
Is there an OS patch you haven’t installed yet? >
Yes … I have installed SP1 >
Best Regards
–Armin
Just wild guesses here, by the way.
Armin Steinhoff wrote:
Armin Steinhoff wrote:
Chris Herborth wrote:
[ clip …]
and the answer is: the problem doesn’t depend on the -O switch!
The problem exists also without optimization!!
No problems with the 2.93.x compiler …
The problem is the use of the -fpack-struct option =:-/
After recompiling with this option
devctl(fd, DCMD_IO_NET_GET_CONFIG, &nval, sizeof(nval), NULL);
returns ENOTSUP.
Best Regards
–Armin
Armin Steinhoff wrote:
Armin Steinhoff wrote:
Armin Steinhoff wrote:
Chris Herborth wrote:
[ clip …]
and the answer is: the problem doesn’t depend on the -O switch!
The problem exists also without optimization!!
No problems with the 2.93.x compiler …
The problem is the use of the -fpack-struct option =:-/
After recompiling with this option
devctl(fd, DCMD_IO_NET_GET_CONFIG, &nval, sizeof(nval), NULL);
It’s realy hard to fix … the devctl call works only without the option
-fpack_struct and the compiler version 2.95.3
It doesn’t work in generally with the gcc version 3.3.1
What’s the problem with gcc 3.3.1 ??
BR
–Armin
Hi Armin,
Out of curiosity, what target platform are you seeing this problem on?
Thanks,
-Jay.
Armin Steinhoff wrote:
Armin Steinhoff wrote:
Armin Steinhoff wrote:
Armin Steinhoff wrote:
Chris Herborth wrote:
[ clip …]
and the answer is: the problem doesn’t depend on the -O switch!
The problem exists also without optimization!!
No problems with the 2.93.x compiler …
The problem is the use of the -fpack-struct option =:-/
After recompiling with this option
devctl(fd, DCMD_IO_NET_GET_CONFIG, &nval, sizeof(nval), NULL);
It’s realy hard to fix … the devctl call works only without the option
-fpack_struct and the compiler version 2.95.3
It doesn’t work in generally with the gcc version 3.3.1
What’s the problem with gcc 3.3.1 ??
BR
–Armin
We experienced the same problem. When we asked QNX about it, they said that
the format / header / struct / something for the DCMD_IO_NET_GET_CONFIG
devctrl call was changed for the new compiler but they forgot to include the
new .h files. I was told that it was fixed with either SP1 or SP2. We
recompiled our code under SP2 and it does work.
“Armin Steinhoff” <a-steinhoff@web.de> wrote in message
news:e41v47$k8q$1@inn.qnx.com…
Hello,
why is this devctl call returning a blank (all zero) nval structure when I
use the gcc V3.3.1 compiler ??
resp = devctl(fd, DCMD_IO_NET_GET_CONFIG, &nval, sizeof(nval), NULL);
I get correct values if I compile with gcc 2.95.3
Regards
–Armin
Mark Dornbush wrote:
We experienced the same problem. When we asked QNX about it, they said that
the format / header / struct / something for the DCMD_IO_NET_GET_CONFIG
devctrl call was changed for the new compiler but they forgot to include the
new .h files. I was told that it was fixed with either SP1 or SP2. We
recompiled our code under SP2 and it does work.
OK … thank’s for your reply. It answers two questions: the initial one
and the questions why of QSSL wasn’t answering in the public NG
Best Regards
–Armin
“Armin Steinhoff” <> a-steinhoff@web.de> > wrote in message
news:e41v47$k8q$> 1@inn.qnx.com> …
Hello,
why is this devctl call returning a blank (all zero) nval structure when I
use the gcc V3.3.1 compiler ??
resp = devctl(fd, DCMD_IO_NET_GET_CONFIG, &nval, sizeof(nval), NULL);
I get correct values if I compile with gcc 2.95.3
Regards
–Armin
\