🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gdb.bug
Article #77

display a: :b still crashes

#77
From: Doug Moore
Date: Tue, 14 Apr 1992 04:44
40 lines
1685 bytes
The following patch, which I submitted a few weeks ago for gdb 4.4, is
also necessary for gdb 4.5.  Without the patch, 

display A::b

will crash gdb, when debugging C++ code in which A is a class and b is
a static member datum of that class.

Well, maybe it'll make gdb 4.6.  Sigh.

Doug Moore
(dougm@cs.rice.edu)

*** expprint.c~	Tue Mar  3 17:22:35 1992
--- expprint.c	Mon Apr 13 23:39:24 1992
***************
*** 76,87 ****
      case OP_SCOPE:
        myprec = PREC_PREFIX;
        assoc = 0;
!       (*pos) += 2;
!       print_subexp (exp, pos, stream,
! 		    (enum precedence) ((int) myprec + assoc));
        fputs_filtered (" :: ", stream);
        nargs = strlen (&exp->elts[pc + 2].string);
!       (*pos) += 1 + (nargs + sizeof (union exp_element)) / sizeof (union exp_element);
  
        fputs_filtered (&exp->elts[pc + 2].string, stream);
        return;
--- 76,85 ----
      case OP_SCOPE:
        myprec = PREC_PREFIX;
        assoc = 0;
!       type_print (exp->elts[pc + 1].type, "", stream, 0);
        fputs_filtered (" :: ", stream);
        nargs = strlen (&exp->elts[pc + 2].string);
!       (*pos) += 4 + (nargs + sizeof (union exp_element)) / sizeof (union exp_element);
  
        fputs_filtered (&exp->elts[pc + 2].string, stream);
        return;
Technical Details
Message-ID: <9204140444.AA12652@cs.rice.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.rice.edu!dougm

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!cs.rice.edu!dougm
From: dougm@cs.rice.edu (Doug Moore)
Subject: display a: :b still crashes
Message-ID: <9204140444.AA12652@cs.rice.edu>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 14 Apr 1992 04:44:28 GMT
Approved: bug-gdb@prep.ai.mit.edu
Lines: 41