Fix crash in Ada "catch exception"
authorTom Tromey <tromey@adacore.com>
Fri, 20 Sep 2019 17:34:21 +0000 (11:34 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 20 Sep 2019 17:34:21 +0000 (11:34 -0600)
PR ada/24919 concerns a crash that Tom de Vries noticed when running
the "catch_ex" Ada test case.  He sent a test executable and tracked
this down to commit f21c2bd7b7 ("Fix Fortran regression with variables
in nested functions").

Looking at that patch, you can see the obvious error:

    -  return 0;
    +  return true;

Oops!  This patch fixes the bug.

Tested on x86-64 Fedora 29.

gdb/ChangeLog
2019-09-20  Tom Tromey  <tromey@adacore.com>

PR ada/24919:
* block.c (contained_in): Fix final return value.

gdb/ChangeLog
gdb/block.c

index 5314b2746bc35d4c0d499b43e2d4a71c6f4a1fa9..b1c4db854b41350351e29c68bae541a9d337ef20 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-20  Tom Tromey  <tromey@adacore.com>
+
+       PR ada/24919:
+       * block.c (contained_in): Fix final return value.
+
 2019-09-20  Alan Modra  <amodra@gmail.com>
 
        * gdb_bfd.c (gdb_bfd_ref, gdb_bfd_unref): Use bfd_set_usrdata.
index ca4dc22cf306657408bd6c8d50d5cc4040ee980b..5ba44d47ba79d4f26f3ef3d09ff8c76ffb516994 100644 (file)
@@ -86,7 +86,7 @@ contained_in (const struct block *a, const struct block *b,
     }
   while (a != NULL);
 
-  return true;
+  return false;
 }
 
 
This page took 0.031796 seconds and 4 git commands to generate.