Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* axp/gcc the double cast gets trashed on return ( really a GDB BUG )
@ 1997-10-07 12:53 Uncle George
  0 siblings, 0 replies; 2+ messages in thread
From: Uncle George @ 1997-10-07 12:53 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2465 bytes --]

--------------5882E66C177C4E5ED3A7EF8D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Volker Barthelmann wrote:

> On Mon, 6 Oct 1997, Uncle George wrote:
> The code is basically broken. Reading another member of a union than the
> one which was last written causes implementation defined behaviour (IMHO
> it should even be undefined behaviour).

This is not a broken feature, but rather a porting implimentation problem. The
long on alpha is 64 bit, the double on a alpha is 64 bit. a union would make the
space ONE. in reality quite a few people do this for the exact same reasons, so
long as u understand how things are getting stored ( including packed/unpacked
structs!)

BTW. i ran the pgm without gdb, and it prints out the right contents,
    I ran GDB without any breakpoints, and the printed values were correct.
                BUT
    running gdb, using  next stepping caused the values to be mixed up. SO I GUESS
its a gdb/ptrace bug! (fudge!!!)

> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

--------------5882E66C177C4E5ED3A7EF8D
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

 

Volker Barthelmann wrote:
On Mon, 6 Oct 1997, Uncle George wrote:

The code is basically broken. Reading another member of a union than
the

one which was last written causes implementation defined behaviour
(IMHO

it should even be undefined behaviour).
This is not a broken feature, but rather a porting implimentation problem.
The long on alpha is 64 bit, the double on a alpha is 64 bit. a union would
make the space ONE. in reality quite a few people do this for the
exact same reasons, so long as u understand how things are getting stored
( including packed/unpacked structs!)

BTW. i ran the pgm without gdb, and it prints out the right contents,

    I ran GDB without any breakpoints, and the printed
values were correct.

               
BUT

    running gdb, using  next stepping caused the
values to be mixed up. SO I GUESS its a gdb/ptrace bug! (fudge!!!)

--

To unsubscribe: send e-mail to axp-list-request@redhat.com with

'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
 

--------------5882E66C177C4E5ED3A7EF8D--

--
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com

^ permalink raw reply	[flat|nested] 2+ messages in thread
[parent not found: <343A30B1.CD60EA8F@voicenet.com>]

end of thread, other threads:[~1997-10-07 12:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1997-10-07 12:53 axp/gcc the double cast gets trashed on return ( really a GDB BUG ) Uncle George
     [not found] <343A30B1.CD60EA8F@voicenet.com>
1997-10-07 12:33 ` Volker Barthelmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox