]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
WIP Fix poke_command to reset lexical cuckolding after error users/mnabipoor/poke-gdb
authorMohammad-Reza Nabipoor <mnabipoor@gnu.org>
Wed, 25 Sep 2024 10:05:09 +0000 (12:05 +0200)
committerMohammad-Reza Nabipoor <mnabipoor@gnu.org>
Wed, 25 Sep 2024 10:05:09 +0000 (12:05 +0200)
gdb/poke.c

index 37801bb6b56e536463b339e94a6b5377910e675a..d8957fab55bedf3a2ff0e4118ddba0b24aa1a31d 100644 (file)
@@ -929,8 +929,8 @@ poke_command (const char *args, int from_tty)
                             &exit_exception)
              != PK_OK
          || exit_exception != PK_NULL)
-       /* Poke compiler will right error message to the output.  */
-       goto error;
+       /* Poke compiler will write error message to the output.  */
+       goto done;
     }
   else
     {
@@ -941,7 +941,7 @@ poke_command (const char *args, int from_tty)
                                &exit_exception)
              != PK_OK
          || exit_exception != PK_NULL)
-       goto error;
+       goto done;
 
       if (val != PK_NULL)
        {
@@ -950,9 +950,9 @@ poke_command (const char *args, int from_tty)
        }
     }
 
+done:
   pk_set_lexical_cuckolding_p (poke_compiler (), 0);
 
-error:
   if (exit_exception != PK_NULL)
     poke_handle_exception (exit_exception);
 }