Article View: gnu.gdb.bug
Article #152cannot print 'this' (again)
From: Dave Daney
Date: Sat, 01 Aug 1992 13:54
Date: Sat, 01 Aug 1992 13:54
51 lines
1970 bytes
1970 bytes
This should probably superceed my previous report.
These are the changes I made to gdb-4.6 so I could print 'this'
from a c++ program. My system is Interactive UNIX 2.2.1 (Sys-V/386 R3.2)
with gcc-2.2.2.
The compiler and gdb seem to disagree on what to call 'this' also
gdb seems to be internaly inconsistant ".this" or "this"???.
Perhaps the name of 'this' should be stored only in one place, and
probably will change depending on the c++ compiler used.
*** valops.c~ Mon Jul 6 12:11:19 1992
--- valops.c Sat Aug 1 18:46:15 1992
***************
*** 1508,1514 ****
struct symbol *func, *sym;
struct block *b;
int i;
! static const char funny_this[] = "this";
value this;
if (selected_frame == 0)
--- 1508,1514 ----
struct symbol *func, *sym;
struct block *b;
int i;
! static const char funny_this[] = ".t";
value this;
if (selected_frame == 0)
*** c-exp.y~ Tue Jul 14 02:34:19 1992
--- c-exp.y Sat Aug 1 17:58:37 1992
***************
*** 1393,1399 ****
&& !strncmp (tokstart, "this", 4))
{
static const char this_name[] =
! { CPLUS_MARKER, 't', 'h', 'i', 's', '\0' };
if (lookup_symbol (this_name, expression_context_block,
VAR_NAMESPACE, 0, NULL))
--- 1393,1399 ----
&& !strncmp (tokstart, "this", 4))
{
static const char this_name[] =
! { CPLUS_MARKER, 't', '\0' };
if (lookup_symbol (this_name, expression_context_block,
VAR_NAMESPACE, 0, NULL))
Dave Daney daney@mermaid.micro.umn.edu
Technical Details
Message-ID:
<199208012354.AA21139@mermaid.micro.umn.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mermaid.micro.umn.edu!daneyShow Full Headers
Complete Article Headers
Newsgroups: gnu.gdb.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!mermaid.micro.umn.edu!daney From: daney@mermaid.micro.umn.edu (Dave Daney) Subject: cannot print 'this' (again) Message-ID: <199208012354.AA21139@mermaid.micro.umn.edu> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Sat, 1 Aug 1992 13:54:29 GMT Approved: bug-gdb@prep.ai.mit.edu Lines: 52