public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 2/2] Use first_opcode in another spot
Date: Mon, 19 Dec 2022 11:17:32 -0700	[thread overview]
Message-ID: <20221219181732.469376-3-tromey@adacore.com> (raw)
In-Reply-To: <20221219181732.469376-1-tromey@adacore.com>

I found one place that could use expression::first_opcode.
---
 gdb/printcmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index bbe8d6eb4b2..19bdcf28639 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:
-- 
2.38.1


  parent reply	other threads:[~2022-12-19 18:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-19 18:17 [PATCH 0/2] Two minor expression changes Tom Tromey
2022-12-19 18:17 ` [PATCH 1/2] Convert exp_uses_objfile to a method of expression Tom Tromey
2022-12-19 18:17 ` Tom Tromey [this message]
2023-01-03 22:50 ` [PATCH 0/2] Two minor expression changes Lancelot SIX
2023-01-04 16:47   ` Tom Tromey

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=20221219181732.469376-3-tromey@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).