Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Fernando Nasser <fnasser@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: [Jim Blandy <jimb@redhat.com>] RFA: Check that `Local' is not in scope when it shouldn't be
Date: Fri, 20 Dec 2002 10:56:00 -0000	[thread overview]
Message-ID: <vt2bs3gpmfb.fsf@zenia.red-bean.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 33 bytes --]


Ping on this test suite patch.


[-- Attachment #2: Type: message/rfc822, Size: 4823 bytes --]

From: Jim Blandy <jimb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: RFA: Check that `Local' is not in scope when it shouldn't be
Date: 14 Nov 2002 15:11:15 -0500
Message-ID: <vt2wunfoqsc.fsf@zenia.red-bean.com>


See http://sources.redhat.com/ml/gdb/2002-11/msg00153.html for the
problem being addressed.  I've filed a new PR for the problem this
patch uncovers, and used its number in the kfail for the new test
here.

gdb/testsuite/ChangeLog:
2002-11-14  Jim Blandy  <jimb@redhat.com>

	* local.exp: Don't expect Local to be in scope in main; it's local
	to foobar.  Check for it there, and check that it's not present in
	main.
	* local.cc (marker2): New function.
	(foobar): Call marker1.
	(main): Call marker2 instead of marker1.

Index: gdb/testsuite/gdb.c++/local.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/local.cc,v
retrieving revision 1.2
diff -c -r1.2 local.cc
*** gdb/testsuite/gdb.c++/local.cc	10 Apr 2002 03:52:21 -0000	1.2
--- gdb/testsuite/gdb.c++/local.cc	14 Nov 2002 20:20:27 -0000
***************
*** 4,9 ****
--- 4,12 ----
  { 
  }
  
+ void marker2 (void)
+ {
+ }
    
  int foobar (int x)
  {
***************
*** 20,25 ****
--- 23,30 ----
    static Local l1;
    char  c;
  
+   marker1 ();
+ 
    l.loc1 = 23;
  
    c = l.loc_foo('x');
***************
*** 56,61 ****
  
     il.ilc = 'b';
     il.ip = &c;
!    marker1();
   }
  }
--- 61,66 ----
  
     il.ilc = 'b';
     il.ip = &c;
!    marker2();
   }
  }
Index: gdb/testsuite/gdb.c++/local.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.c++/local.exp,v
retrieving revision 1.9
diff -c -r1.9 local.exp
*** gdb/testsuite/gdb.c++/local.exp	27 May 2002 18:00:14 -0000	1.9
--- gdb/testsuite/gdb.c++/local.exp	14 Nov 2002 20:20:28 -0000
***************
*** 67,73 ****
      continue
  }
  
! gdb_test "up" ".*main.*" "up from marker1"
  
  # Local classes in g++ get names like "main.1::InnerLocal", just like local
  # static variables.  Some targets use "___" instead of ".".
--- 67,73 ----
      continue
  }
  
! gdb_test "up" ".*foobar.*" "up from marker1"
  
  # Local classes in g++ get names like "main.1::InnerLocal", just like local
  # static variables.  Some targets use "___" instead of ".".
***************
*** 110,115 ****
--- 110,128 ----
    -re ".*$gdb_prompt $"   {  fail "ptype Local" }
    timeout             { fail "(timeout) ptype Local" }
  }
+ 
+ if ![runto 'marker2'] then {
+     perror "couldn't run to marker2"
+     continue
+ }
+ 
+ gdb_test "up" ".*main.*" "up from marker2"
+ 
+ # Make sure that `Local' isn't in scope here; it's local to foobar.
+ # setup_kfail "gdb/825"
+ gdb_test "ptype Local" "No symbol \"Local\" in current context.*" \
+          "Local out of scope (gdb/825)"
+ 
  
  # DTS CLLbs14316 and CLLbs17058
  # coulter - I added a clause for HP's aCC compiler.  We print out the type



             reply	other threads:[~2002-12-20 18:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-20 10:56 Jim Blandy [this message]
2002-12-20 11:19 ` Daniel Jacobowitz
2002-12-20 12:05   ` David Carlton
2002-12-20 12:01 ` David Carlton
2002-12-20 12:18   ` David Carlton
2003-02-04 22:02 ` Jim Blandy
2003-02-04 22:16   ` David Carlton
2003-02-05  5:49     ` Jim Blandy
2002-12-20 21:12 Michael Elizabeth Chastain
2002-12-23 22:51 Michael Elizabeth Chastain
2003-02-05  6:23 Michael Elizabeth Chastain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vt2bs3gpmfb.fsf@zenia.red-bean.com \
    --to=jimb@redhat.com \
    --cc=fnasser@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox