public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Marco Barisione <mbarisione@undo.io>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] Move the code to execute a cmd_list_element out from execute_command
Date: Mon, 5 Oct 2020 10:40:19 +0100	[thread overview]
Message-ID: <B2FEF27B-8F94-4225-8EFC-074A1A2E763A@undo.io> (raw)
In-Reply-To: <20201005090804.GF605036@embecosm.com>

On 5 Oct 2020, at 10:08, Andrew Burgess <andrew.burgess@embecosm.com> wrote:
>> gdb/ChangeLog:
>> 
>> 	* gdbcmd.h (execute_cmd_list_command): Add declaration.
>> 	* top.c (execute_command): Move out the code to execute a
>> 	command from a cmd_list_element.
>> 	(execute_cmd_list_command): Add from code originally in
>> 	execute_command.
>> 	* top.h (execute_cmd_list_command): Add declaration.
> 
> Why is execute_cmd_list_command declared twice?  This doesn't feel
> right.

On top of gdbcmd.h there’s this comment:
/* ***DEPRECATED***  The gdblib files must not be calling/using things in any
   of the possible command languages.  If necessary, a hook (that may be
   present or not) must be used and set to the appropriate routine by any
   command language that cares about it.  If you are having to include this
   file you are possibly doing things the old way.  This file will dissapear.
   fnasser@redhat.com    */

This deprecation notice was added 20 years ago in commit
<d318976c46b92e4d8640f1310bb7b6b517c8bcf7>.
I couldn't really work out the details, so I just copied what is currently
done for execute_command, which is declared in two header files:
  $ git grep '\bexecute_command\b' -- '*.h'
  gdbcmd.h:extern void execute_command (const char *, int);
  top.h:extern void execute_command (const char *, int);


-- 
Marco Barisione


  reply	other threads:[~2020-10-05  9:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-14  9:39 Add a way to invoke redefined (overridden) GDB commands Marco Barisione
2020-09-14  9:39 ` [PATCH 1/2] Move the code to execute a cmd_list_element out from execute_command Marco Barisione
2020-10-05  9:08   ` Andrew Burgess
2020-10-05  9:40     ` Marco Barisione [this message]
2020-10-05 17:49       ` Andrew Burgess
2020-09-14  9:39 ` [PATCH 2/2] Add a way to preserve redefined GDB commands for later invocation Marco Barisione
2020-09-14 16:18   ` Eli Zaretskii
2020-09-14 16:51     ` Marco Barisione
2020-10-05 10:24   ` Andrew Burgess
2020-10-05 11:44     ` Marco Barisione
2020-10-05 18:11       ` Andrew Burgess
2020-10-06  7:18         ` Marco Barisione
2020-09-28  7:54 ` [PING] Add a way to invoke redefined (overridden) GDB commands Marco Barisione
2020-10-05  7:42   ` Marco Barisione
2020-10-12 11:50 ` Pedro Alves
2020-10-19 17:41   ` Marco Barisione
2020-10-19 18:05     ` Pedro Alves
2020-10-19 18:47       ` Philippe Waroquiers
2020-10-19 19:28         ` Marco Barisione
2020-10-20 15:06           ` Pedro Alves
2020-10-20 18:19             ` Marco Barisione
2020-10-20 18:32               ` Pedro Alves
2020-10-20 15:15         ` Pedro Alves

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=B2FEF27B-8F94-4225-8EFC-074A1A2E763A@undo.io \
    --to=mbarisione@undo.io \
    --cc=andrew.burgess@embecosm.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).