* strange behavioI under GCC
@ 1998-01-06 5:00 Philippe Le Foll
0 siblings, 0 replies; only message in thread
From: Philippe Le Foll @ 1998-01-06 5:00 UTC (permalink / raw)
I try porting a software from Linux 32bit to Linux Alpha, I am
currentelly lock on following
probleme. I have a pointer to a valid structure, I copy the adress value
to an other pointer
and even with both pointers having the same value, when printing contend
they differ:
Here after a small trace:
- cmd is the original pointer
- staticCmd is a copy
They both point on 0x12012a160 adress and have the same type
(gdb) print cmd ->$4 = (BenchCommand *) 0x12012a160
(gdb) print staticQuit ->$5 = (BenchCommand *) 0x12012a160
Looking inside give a different value execpt for 3 first values !!!
(gdb) print *staticCmd
$2 = {inFileId = -1, outFileId = 14, nbUnderflow = 0,
nbOverflow = 2748779069440, maxMissed = 16384, blockNum = 0,
blockSize = 0,
hertz = 0, ticMs = 0, bufferSize = 0, bufferSum = 0,
bufferTicSize = 0,
bufferTicIdx = -4616189618054758400, ticPerBlock =
13830554455654793216,
askedSpeed = 4817, askedTimer = 1, lowLevel = 4832904016, hop =
0, rtc = 0,
realtime = 0, cpu = 0, user = 4.9406564584124654e-324}
(gdb) print *cmd
$3 = {inFileId = -1, outFileId = 14, nbUnderflow = 0, nbOverflow =
0,
maxMissed = 0, blockNum = 640, blockSize = 16384, hertz = 0, ticMs
= 0,
bufferSize = 0, bufferSum = 0, bufferTicSize = 0, bufferTicIdx =
0,
ticPerBlock = 0, askedSpeed = 0, askedTimer = 1000, lowLevel = 0,
hop = 0,
rtc = 0, realtime = 0, cpu = -1, user = -1}
Note:
1:Originally pointer was passed as an argument, I change for static
and public values
but it does not change any thing.
2: I compile with no optimisation and add -no-defert-retrurn-pop bit
it as no influence
3: The only original thing with my procedure is that it takes one
parameters but is call
from a generic entry point with 10 parameters, nevertheless it
should not be a probleme
and furthermore works even on Linux-alpha in all other procedure,
only this on create trouble.
It is also the first structure a pas with this method
Any idea ????
Thank for your help
Philippe
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1998-01-06 5:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-01-06 5:00 strange behavioI under GCC Philippe Le Foll
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox