🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #816

FWD: RE: Bug in GAS inhibits DEBUGger functioning.

#816
From: munroe
Date: Tue, 18 Aug 1992 17:45
371 lines
12640 bytes
> 
> >garning(debugger output):Forward reference error, dbx type 66
> >gcc-as warning(debugger output):Forward reference error, dbx type 71
> >gcc-as warning(debugger output):Unable to resolve 1 circular references.
> 
> 	OK, I have looked at the problem, and the core issue is that the
> compiler is generating incomplete debugging information.  In particular,
> the declaration:
> 
> .stabs "K560_R_TRACKING_DATA:T73=u10
> 	k560_t_asCharacter:74=ar1;0;9;11,0,80;
> 	k560_r_asReply:75=ar1;0;1;76,0,80;
> 	k560_r_asDevices:77,0,80;;",128,0,0,0
> 
> references an array in k560_r_asReply of dbx type 76, and dbx type 76
> is not defined anywhere in the file.  This is what is responsible for
> the unresolved circular reference.  The other two messages, about dbx
> types 66 and 71 represent similar situations, where a dbx type is
> used, but not defined.  In these two cases the references are such
> that the assembler can work around the problem, but the circular
> reference really throws the assembler off.
> 
> 	The reason that I am giving this to you is that I would like you to
> make a bug report to the mailing list bug-g++@prep.ai.mit.edu (it appears
> to be g++ code), and you will need to supply source code and my explanation
> of what the trouble it.
> 
> 	In the mean time, I will try to come up with a patch to the
> assembler that will make it more fault tolerant.  In this situation, I
> will fix it so that structure elements of undefined dbx types will not
> be visible from the debugger.
> 
> 	I also want to mention that I am about to go away for a week,
> and I may not get back to this for a little while.  I hope that you
> can find a work-around in the mean time.
> 
> -Eric
> 

VAX/VMS V5.4-2

GCC/G++ version:

%GCC-I-VERSION, this is version 2.1.0 of the GCC-VMS driver.
GNU CPP version 2.2.2 (vax vms)

This is the error generated:

$ gcc/inc=inc$/mach/plus/debug/noopt foo.cxx
foo.cxx: In function `int  main ()':
foo.cxx:6: warning: implicit declaration of function `printf'
gcc-as warning(debugger output):Forward reference error, dbx type 30
gcc-as warning(debugger output):Forward reference error, dbx type 35
gcc-as warning(debugger output):Unable to resolve 1 circular references.

An example program and the necessary source code to reproduce the problem
follow:

--
Dick Munroe				Internet: munroe@dmc.com
Doyle Munroe Consultants, Inc.		UUCP: ...uunet!thehulk!munroe
267 Cox St.				Office: (508) 568-1618
Hudson, Ma. 01749 USA			FAX: (508) 562-1133

GET CONNECTED!!! Send mail to info@dmc.com to find out about DMConnection.

//------------------------------------------------------------------------------
//---------------------------------- foo.cxx -----------------------------------
//------------------------------------------------------------------------------
#include "sqs-k560.h"

main()
{
union K560_R_INVENTORY_TABLE foo ;
printf("%0.*s\n", sizeof(foo.k560_r_asReply[1]), &foo.k560_r_asReply[1]) ;
return 1 ;
} ;
//------------------------------------------------------------------------------
//--------------------------------- sqs-k560.h ---------------------------------
//------------------------------------------------------------------------------
/* Created by SDL V3.2-12    */
/* Source:  6-AUG-1992 18:07:00 USER1:[TOOLSHED.SQUIRREL-STORE.BLD]SQS-K560.SDI */
#ifndef _SQS_K560_H_
#define _SQS_K560_H_
#ifdef __cplusplus
extern "C" {
#endif
 
/*** MODULE K560 ***/
#define K560_K_ACK "+"
#define K560_K_NAK "-"
#define K560_K_COMMAND_FORMAT "%02X%02D%02D%02D%02D"
#define K560_K_COMMAND_PACKET_FORMAT "%02X%-0.10s%02X"
struct K560_R_COMMAND {
    char k560_t_command [2];
    char k560_t_parameter1 [2];
    char k560_t_parameter2 [2];
    char k560_t_parameter3 [2];
    char k560_t_parameter4 [2];
} ;
struct K560_R_COMMAND_PACKET {
    char k560_t_sequenceNumber [2];
    char k560_t_command [10];
    char k560_t_checksum [2];
    char k560_t_cr;
} ;
#define K560_K_COMPLETION_SUCCESS "00"
#define K560_K_COMPLETION_FAILURE "01"
#define K560_K_COMPLETION_WARNING "02"
struct K560_R_RESPONSE {
    char k560_t_completion [2];
    char k560_t_rotor [2];
    char k560_t_misc [4];
    char k560_t_error [4];
} ;
struct K560_R_RESPONSE_PACKET {
    char k560_t_sequenceNumber [2];
    char k560_t_response [12];
    char k560_t_checksum [2];
    char k560_t_cr;
} ;
#define K560_K_F_COMMAND_2_ARGUMENTS "%02X%02X%02X0000"
#define K560_K_F_COMMAND_1_ARGUMENT "%02X%02X000000"
#define K560_K_F_COMMAND_0_ARGUMENTS "%02X00000000"
#define K560_K_HOME 0
#define K560_K_F_HOME "%02X00000000"
#define K560_K_OPEN_MAILBOX 3
#define K560_K_F_OPEN_MAILBOX "%02X00000000"
#define K560_K_VOLUME_TO_MAILBOX 6
#define K560_K_F_VOLUME_TO_MAILBOX "%02X%02X000000"
#define K560_K_VOLUME_TO_DRIVE 7
#define K560_K_F_VOLUME_TO_DRIVE "%02X%02X%02X0000"
#define K560_K_DRIVE_TO_VOLUME 8
#define K560_K_F_DRIVE_TO_VOLUME "%02X%02X%02X0000"
#define K560_K_MAILBOX_TO_DRIVE 9
#define K560_K_F_MAILBOX_TO_DRIVE "%02X%02X000000"
#define K560_K_DRIVE_TO_MAILBOX 16
#define K560_K_F_DRIVE_TO_MAILBOX "%02X%02X000000"
#define K560_K_DRIVE_TO_DRIVE 17
#define K560_K_F_DRIVE_TO_DRIVE "%02X%02X%02X0000"
#define K560_K_FLIP_IN_DRIVE 18
#define K560_K_F_FLIP_IN_DRIVE "%02X%02X%02X0000"
#define K560_K_ROTOR_TO_VOLUME 22
#define K560_K_F_ROTOR_TO_VOLUME "%02X%02X%02X0000"
#define K560_K_MAILBOX_STATE 32
#define K560_K_F_MAILBOX_STATE "%02X00000000"
#define K560_K_TAKE_INVENTORY 33
#define K560_K_F_TAKE_INVENTORY "%02X00000000"
#define K560_K_INVENTORY_TABLE_PART_1 34
#define K560_K_F_INVENTORY_TABLE_PART_1 "%02X00000000"
#define K560_K_INVENTORY_TABLE_PART_2 35
#define K560_K_F_INVENTORY_TABLE_PART_2 "%02X00000000"
#define K560_K_CONFIGURATION_TABLE_PART_1 36
#define K560_K_F_CONFIG_TABLE_PART_1 "%02X00000000"
#define K560_K_CONFIGURATION_TABLE_PART_2 37
#define K560_K_F_CONFIG_TABLE_PART_2 "%02X00000000"
#define K560_K_TRACKING_DATA_PART_1 40
#define K560_K_F_TRACKING_DATA_PART_1 "%02X00000000"
#define K560_K_TRACKING_DATA_PART_2 41
#define K560_K_F_TRACKING_DATA_PART_2 "%02X00000000"
union K560_R_INVENTORY_TABLE {
    char k560_t_asCharacter [10];
    struct {
        unsigned drive0 : 1;
        unsigned drive1 : 1;
        unsigned drive2 : 1;
        unsigned drive3 : 1;
        unsigned drive4 : 1;
        unsigned drive5 : 1;
        unsigned drive6 : 1;
        unsigned drive7 : 1;
        unsigned slot00 : 1;
        unsigned slot01 : 1;
        unsigned slot02 : 1;
        unsigned slot03 : 1;
        unsigned slot04 : 1;
        unsigned slot05 : 1;
        unsigned slot06 : 1;
        unsigned slot07 : 1;
        unsigned slot08 : 1;
        unsigned slot09 : 1;
        unsigned slot0A : 1;
        unsigned slot0B : 1;
        unsigned slot0C : 1;
        unsigned slot0D : 1;
        unsigned slot0E : 1;
        unsigned slot0F : 1;
        unsigned slot10 : 1;
        unsigned slot11 : 1;
        unsigned slot12 : 1;
        unsigned slot13 : 1;
        unsigned slot14 : 1;
        unsigned slot15 : 1;
        unsigned slot16 : 1;
        unsigned slot17 : 1;
        unsigned slot18 : 1;
        unsigned slot19 : 1;
        unsigned slot1A : 1;
        unsigned slot1B : 1;
        unsigned slot1C : 1;
        unsigned slot1D : 1;
        unsigned slot1E : 1;
        unsigned slot1F : 1;
        unsigned slot20 : 1;
        unsigned slot21 : 1;
        unsigned slot22 : 1;
        unsigned slot23 : 1;
        unsigned slot24 : 1;
        unsigned slot25 : 1;
        unsigned slot26 : 1;
        unsigned slot27 : 1;
        unsigned slot28 : 1;
        unsigned slot29 : 1;
        unsigned slot2A : 1;
        unsigned slot2B : 1;
        unsigned slot2C : 1;
        unsigned slot2D : 1;
        unsigned slot2E : 1;
        unsigned slot2F : 1;
        unsigned slot30 : 1;
        unsigned slot31 : 1;
        unsigned slot32 : 1;
        unsigned slot33 : 1;
        unsigned slot34 : 1;
        unsigned slot35 : 1;
        unsigned slot36 : 1;
        unsigned slot37 : 1;
        unsigned slot38 : 1;
        unsigned slot39 : 1;
        unsigned slot3A : 1;
        unsigned slot3B : 1;
        unsigned slot3C : 1;
        unsigned slot3D : 1;
        unsigned slot3E : 1;
        unsigned slot3F : 1;
        unsigned slot40 : 1;
        unsigned slot41 : 1;
        unsigned slot42 : 1;
        unsigned unused : 1;
        unsigned b : 1;
        unsigned a : 1;
        unsigned mailbox : 1;
        unsigned mailboxStatus : 1;
        } k560_r_asBits;
    struct {
        char reply [5];
        } k560_r_asReply [2];
    struct {
        char drives;
        char slots [9];
        } k560_r_asDevices;
} ;
union K560_R_CONFIGURATION_TABLE {
    char k560_t_asCharacter [10];
    struct {
        unsigned drive0 : 1;
        unsigned drive1 : 1;
        unsigned drive2 : 1;
        unsigned drive3 : 1;
        unsigned drive4 : 1;
        unsigned drive5 : 1;
        unsigned drive6 : 1;
        unsigned drive7 : 1;
        unsigned slot00 : 1;
        unsigned slot01 : 1;
        unsigned slot02 : 1;
        unsigned slot03 : 1;
        unsigned slot04 : 1;
        unsigned slot05 : 1;
        unsigned slot06 : 1;
        unsigned slot07 : 1;
        unsigned slot08 : 1;
        unsigned slot09 : 1;
        unsigned slot0A : 1;
        unsigned slot0B : 1;
        unsigned slot0C : 1;
        unsigned slot0D : 1;
        unsigned slot0E : 1;
        unsigned slot0F : 1;
        unsigned slot10 : 1;
        unsigned slot11 : 1;
        unsigned slot12 : 1;
        unsigned slot13 : 1;
        unsigned slot14 : 1;
        unsigned slot15 : 1;
        unsigned slot16 : 1;
        unsigned slot17 : 1;
        unsigned slot18 : 1;
        unsigned slot19 : 1;
        unsigned slot1A : 1;
        unsigned slot1B : 1;
        unsigned slot1C : 1;
        unsigned slot1D : 1;
        unsigned slot1E : 1;
        unsigned slot1F : 1;
        unsigned slot20 : 1;
        unsigned slot21 : 1;
        unsigned slot22 : 1;
        unsigned slot23 : 1;
        unsigned slot24 : 1;
        unsigned slot25 : 1;
        unsigned slot26 : 1;
        unsigned slot27 : 1;
        unsigned slot28 : 1;
        unsigned slot29 : 1;
        unsigned slot2A : 1;
        unsigned slot2B : 1;
        unsigned slot2C : 1;
        unsigned slot2D : 1;
        unsigned slot2E : 1;
        unsigned slot2F : 1;
        unsigned slot30 : 1;
        unsigned slot31 : 1;
        unsigned slot32 : 1;
        unsigned slot33 : 1;
        unsigned slot34 : 1;
        unsigned slot35 : 1;
        unsigned slot36 : 1;
        unsigned slot37 : 1;
        unsigned slot38 : 1;
        unsigned slot39 : 1;
        unsigned slot3A : 1;
        unsigned slot3B : 1;
        unsigned slot3C : 1;
        unsigned slot3D : 1;
        unsigned slot3E : 1;
        unsigned slot3F : 1;
        unsigned slot40 : 1;
        unsigned slot41 : 1;
        unsigned slot42 : 1;
        unsigned unused : 1;
        unsigned b : 1;
        unsigned a : 1;
        unsigned mailbox : 1;
        unsigned mailboxStatus : 1;
        } k560_r_asBits;
    struct {
        char reply [5];
        } k560_r_asReply [2];
    struct {
        char drives;
        char slots [9];
        } k560_r_asDevices;
} ;
#define K560_K_TRACKING_DATA_INVALID 255
#define K560_K_ROTORA 1
#define K560_K_ROTORB 2
union K560_R_TRACKING_DATA {
    unsigned char k560_t_asCharacter [10];
    struct {
        unsigned char reply [5];
        } k560_r_asReply [2];
    struct {
        unsigned char drives [8];
        unsigned char rotors [2];
        } k560_r_asDevices;
} ;
struct K560_R_MAILBOX_STATE {
    unsigned k560_v_cartridgeLoaded : 1;
    unsigned k560_v_mailboxOpen : 1;
    unsigned k560_v_unused : 6;
    char k560_t_unused1 [4];
} ;
#define K560_K_MAILBOX_POSITION_A 134
#define K560_K_MAILBOX_POSITION_B 135
#define K560_K_NUMBER_OF_SLOTS 67
#define K560_K_NUMBER_OF_DRIVES 8
#ifdef __cplusplus
}
#endif
#endif
Technical Details
Message-ID: <0095F484.F8C4DF80.2001@DMC.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!dmc.COM!munroe

Show Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!dmc.COM!munroe
From: munroe@dmc.COM
Subject: FWD: RE: Bug in GAS inhibits DEBUGger functioning.
Message-ID: <0095F484.F8C4DF80.2001@DMC.COM>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 18 Aug 1992 17:45:47 GMT
Approved: bug-g++@prep.ai.mit.edu
Lines: 373