]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2002-04-12 Michael Snyder <msnyder@redhat.com>
authorMichael Snyder <msnyder@vmware.com>
Sat, 13 Apr 2002 00:21:40 +0000 (00:21 +0000)
committerMichael Snyder <msnyder@vmware.com>
Sat, 13 Apr 2002 00:21:40 +0000 (00:21 +0000)
From Jim Blandy  <jimb@redhat.com>
        * gdb.base/foo.c (foox): Remove section attribute; the linker
script can handle this instead.
* gdb.base/bar.c (barx): Same.
* gdb.base/baz.c (bazx): Same.
* gdb.base/grbx.c (grbxx): Same.

        * gdb.base/overlays.exp: New test: check that GDB's manual overlay
manager doesn't automatically unmap overlays unnecessarily.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/bar.c
gdb/testsuite/gdb.base/baz.c
gdb/testsuite/gdb.base/foo.c
gdb/testsuite/gdb.base/grbx.c
gdb/testsuite/gdb.base/overlays.exp

index c5554f211cf98725685ea971c41b8017c5870138..a6e520b019a0fcf9f144ba63232c8859aa8bc120 100644 (file)
@@ -1,3 +1,14 @@
+2002-04-12  Michael Snyder  <msnyder@redhat.com>
+From Jim Blandy  <jimb@redhat.com>
+        * gdb.base/foo.c (foox): Remove section attribute; the linker
+       script can handle this instead.
+       * gdb.base/bar.c (barx): Same.
+       * gdb.base/baz.c (bazx): Same.
+       * gdb.base/grbx.c (grbxx): Same.
+
+       * gdb.base/overlays.exp: New test: check that GDB's manual overlay
+       manager doesn't automatically unmap overlays unnecessarily.
+
 2002-04-10  Martin M. Hunt  <hunt@redhat.com>
 
        * gdb.base/ending-run.exp: Fix pattern for Mips targets
index 8a4da9802f8cc6c88154295af547fe85d124c56c..dd0bf923a3d1c1fff46a75dcd6be6c5648b1728e 100644 (file)
@@ -1,4 +1,4 @@
-static int barx __attribute__ ((section (".data01"))) = 'b' + 'a' + 'r';
+static int barx = 'b' + 'a' + 'r';
 
 int bar (int x)
 {
index a13cd16bbbeb684dfc823df6509d6dcf8fd4cfe5..8da4ffa47a18bd4fa07ee799eeb2eafb7ce3b5aa 100644 (file)
@@ -1,4 +1,4 @@
-static int bazx __attribute__ ((section (".data02"))) = 'b' + 'a' + 'z';
+static int bazx = 'b' + 'a' + 'z';
 
 int baz (int x)
 {
index ada9cf471eeb7f7711e35e70b835e2f7fb955404..2553607d5ec1e0e82bb6152c3ee8c4acb8aa2a21 100644 (file)
@@ -1,4 +1,4 @@
-static int foox __attribute__ ((section (".data00"))) = 'f' + 'o' + 'o';
+static int foox = 'f' + 'o' + 'o';
 
 int foo (int x)
 {
index 92f732344a361d739a7d63827c330c2b3a69c580..58034bbbaaedc30c9978d3900c33000f79d120ad 100644 (file)
@@ -1,4 +1,4 @@
-static int grbxx __attribute__ ((section (".data03"))) = 'g' + 'r' + 'b' + 'x';
+static int grbxx = 'g' + 'r' + 'b' + 'x';
 
 int grbx (int x)
 {
index a65adead8aed599d2002f7d7d3140b6be14080a8..9188b2780147879dfdfd631cf05f094d5c0463a6 100644 (file)
@@ -178,6 +178,42 @@ gdb_expect {
     timeout                    { fail "(timeout) Automatic unmapping"   }
 }
 
+# Verify that both sec1 and sec2 can be loaded simultaneously.
+proc simultaneous_pair { sec1 sec2 } {
+    global gdb_prompt
+
+    set pairname "$sec1 and $sec2 mapped simultaneously"
+    gdb_test "overlay map $sec1" "" "$pairname: map $sec1"
+    gdb_test "overlay map $sec2" "" "$pairname: map $sec2"
+
+    set seen_sec1 0
+    set seen_sec2 0
+
+    send_gdb "overlay list\n"
+    gdb_expect {
+        -re ".*[string_to_regexp $sec1], " { set seen_sec1 1; exp_continue }
+        -re ".*[string_to_regexp $sec2], " { set seen_sec2 1; exp_continue }
+        -re ".*$gdb_prompt $" {
+            if {$seen_sec1 && $seen_sec2} {
+                pass "$pairname"
+            } else {
+                fail "$pairname"
+            }
+        }
+        timeout { fail "(timeout) $pairname" }
+    }
+}
+
+simultaneous_pair .ovly0 .ovly2
+simultaneous_pair .ovly0 .ovly3
+simultaneous_pair .ovly1 .ovly2
+simultaneous_pair .ovly1 .ovly3
+
+simultaneous_pair .data00 .data02
+simultaneous_pair .data00 .data03
+simultaneous_pair .data01 .data02
+simultaneous_pair .data01 .data03
+
 # test automatic mode
 
 gdb_test "overlay auto" ""