[binutils-gdb] Use first_opcode in another spot

Tom Tromey tromey@sourceware.org
Wed Jan 4 17:01:33 GMT 2023


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d654ad96eb4bee13f672e9b1549b52b499cf9ae1

commit d654ad96eb4bee13f672e9b1549b52b499cf9ae1
Author: Tom Tromey <tromey@adacore.com>
Date:   Mon Dec 19 11:15:55 2022 -0700

    Use first_opcode in another spot
    
    I found one place that could use expression::first_opcode.
    
    Reviewed-By: Lancelot Six <lancelot.six@amd.com>

Diff:
---
 gdb/printcmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 13b979c3720..c3c2e5ad612 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1500,7 +1500,7 @@ set_command (const char *exp, int from_tty)
 {
   expression_up expr = parse_expression (exp);
 
-  switch (expr->op->opcode ())
+  switch (expr->first_opcode ())
     {
     case UNOP_PREINCREMENT:
     case UNOP_POSTINCREMENT:


More information about the Gdb-cvs mailing list