🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #10176

Re: gdb 3.5 on V.3 68k

#10176
From: Ian G Batten
Date: Thu, 12 Apr 1990 09:04
35 lines
1987 bytes
I.G.Batten@fulcrum.bt.co.uk (Ian G Batten) (me) writes:
> 
> I'm tidying up a port of gdb 3.5 to the local System V.3 680[23]0
> machines.  I have two outstanding problems

> (2) The V.3 machines are compiled entirely with gcc 1.35.  Therefore
> small structures are returned in a set of registers.  If a function is
> written which returns a structure, executing it from a print or set
> (again!) errors as the structure doesn't seem to be where it's expected.
> Moreover, I can't see any code to do this right.  Anyone have any ideas?

There is code to do this, but it doesn't work quite right.

Firstly, the gcc_compile_flag in the block structure needs to be driven
to 1.  I can't see a way to look at COFF stuff and see which compiler
was used, so since the machine only has gcc I've simply set this flag to
one.

This made one word structures work, and 3 word structures worked OK, but
failed for two.  I believe this problem is generic; I suggest that the
line

      if (!(BLOCK_GCC_COMPILED (b) && TYPE_LENGTH (value_type) < 8))

at line 976 in values.c should be

      if (!(BLOCK_GCC_COMPILED (b) && TYPE_LENGTH (value_type) <= 8))

to handle the case of two word structures being returned in registers
(in my case d0 and d1).

ian

-- 
Ian G Batten, BT Fulcrum - igb@fulcrum.bt.co.uk - ...!uunet!ukc!fulcrum!igb
Technical Details
Message-ID: <FNQ#N5#@masalla.fulcrum.bt.co.uk>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!ukc!axion!masalla.fulcrum.bt.co.uk!igb
References: <W|Q#R-#@masalla.fulcrum.bt.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f5053,c4526e32ea6e975f
X-Google-Attributes: gidf5053,public
X-Google-ArrivalTime: 1990-04-12 02:04:56 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!ukc!axion!masalla.fulcrum.bt.co.uk!igb
From: I.G.Batten@fulcrum.bt.co.uk (Ian G Batten)
Newsgroups: gnu.gdb.bug
Subject: Re: gdb 3.5 on V.3 68k
Message-ID: <FNQ#N5#@masalla.fulcrum.bt.co.uk>
Date: 12 Apr 90 09:04:56 GMT
References: <W|Q#R-#@masalla.fulcrum.bt.co.uk>
Sender: root@fulcrum.bt.co.uk (Root on Masalla)
Distribution: gnu
Organization: BT Fulcrum, Birmingham, England.
Lines: 35
Posted: Thu Apr 12 10:04:56 1990