Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Gary Benson <gbenson@redhat.com>, gdb-patches@sourceware.org
Cc: Doug Evans <dje@google.com>, Tom Tromey <tromey@redhat.com>
Subject: Re: [PATCH 05/11 v5] Add target/target.h
Date: Wed, 20 Aug 2014 12:01:00 -0000	[thread overview]
Message-ID: <53F48E22.6010202@redhat.com> (raw)
In-Reply-To: <1406888377-25795-6-git-send-email-gbenson@redhat.com>

On 08/01/2014 11:19 AM, Gary Benson wrote:

> diff --git a/gdb/target.h b/gdb/target.h
> index 4d91b6b..1a10744 100644
> --- a/gdb/target.h
> +++ b/gdb/target.h
> @@ -58,6 +58,7 @@ struct dcache_struct;
>     it goes into the file stratum, which is always below the process
>     stratum.  */
>  
> +#include "target/target.h"
>  #include "target/resume.h"
>  #include "target/wait.h"
>  #include "target/waitstatus.h"
> @@ -1206,31 +1207,6 @@ extern void target_detach (const char *, int);
>  
>  extern void target_disconnect (const char *, int);
>  
> -/* Resume execution of the target process PTID (or a group of
> -   threads).  STEP says whether to single-step or to run free; SIGGNAL
> -   is the signal to be given to the target, or GDB_SIGNAL_0 for no
> -   signal.  The caller may not pass GDB_SIGNAL_DEFAULT.  A specific
> -   PTID means `step/resume only this process id'.  A wildcard PTID
> -   (all threads, or all threads of process) means `step/resume
> -   INFERIOR_PTID, and let other threads (for which the wildcard PTID
> -   matches) resume with their 'thread->suspend.stop_signal' signal
> -   (usually GDB_SIGNAL_0) if it is in "pass" state, or with no signal
> -   if in "no pass" state.  */
> -
> -extern void target_resume (ptid_t ptid, int step, enum gdb_signal signal);
> -
> -/* Wait for process pid to do something.  PTID = -1 to wait for any
> -   pid to do something.  Return pid of child, or -1 in case of error;
> -   store status through argument pointer STATUS.  Note that it is
> -   _NOT_ OK to throw_exception() out of target_wait() without popping
> -   the debugging target from the stack; GDB isn't prepared to get back
> -   to the prompt with a debugging target but without the frame cache,
> -   stop_pc, etc., set up.  OPTIONS is a bitwise OR of TARGET_W*
> -   options.  */
> -
> -extern ptid_t target_wait (ptid_t ptid, struct target_waitstatus *status,
> -			   int options);
> -
>  /* Fetch at least register REGNO, or all regs if regno == -1.  No result.  */
>  
>  extern void target_fetch_registers (struct regcache *regcache, int regno);
> @@ -1294,9 +1270,6 @@ int target_supports_disable_randomization (void);
>  
>  extern int target_read_string (CORE_ADDR, char **, int, int *);
>  
> -extern int target_read_memory (CORE_ADDR memaddr, gdb_byte *myaddr,
> -			       ssize_t len);
> -
>  extern int target_read_raw_memory (CORE_ADDR memaddr, gdb_byte *myaddr,
>  				   ssize_t len);
>  
> @@ -1304,9 +1277,6 @@ extern int target_read_stack (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len);
>  
>  extern int target_read_code (CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len);
>  
> -extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
> -				ssize_t len);
> -
>  extern int target_write_raw_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
>  				    ssize_t len);
>  
> @@ -1583,12 +1553,6 @@ extern int target_thread_alive (ptid_t ptid);
>  
>  extern void target_find_new_threads (void);
>  
> -/* Make target stop in a continuable fashion.  (For instance, under
> -   Unix, this should act like SIGSTOP).  This function is normally
> -   used by GUIs to implement a stop button.  */
> -
> -extern void target_stop (ptid_t ptid);
> -
>  /* Send the specified COMMAND to the target's monitor
>     (shell,interpreter) for execution.  The result of the query is
>     placed in OUTBUF.  */

I worry about the fragmentation that moving pieces of target
interfaces to target/target.h generates ends up confusing
people.  Did you consider leaving a marker in place, like:

 -extern ptid_t target_wait (ptid_t ptid, struct target_waitstatus *status,
 -			   int options);
 + /* For target_wait see target/target.h.  */

 -extern int target_write_memory (CORE_ADDR memaddr, const gdb_byte *myaddr,
 -				ssize_t len);
 + /* For target_write_memory see target/target.h.  */

?

Thanks,
Pedro Alves


  parent reply	other threads:[~2014-08-20 12:01 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 10:19 [PATCH 00/11 v5] Common code cleanups Gary Benson
2014-08-01 10:19 ` [PATCH 04/11 v5] Introduce and use debug_printf and debug_vprintf Gary Benson
2014-08-06 17:08   ` Doug Evans
2014-08-07  9:22     ` Gary Benson
2014-08-01 10:19 ` [PATCH 03/11 v5] Move print-utils.h to common-defs.h Gary Benson
2014-08-06 16:51   ` Doug Evans
2014-08-06 17:05     ` Gary Benson
2014-08-01 10:19 ` [PATCH 02/11 v5] Introduce common-types.h Gary Benson
2014-08-06 16:34   ` Doug Evans
2014-08-01 10:22 ` [PATCH 09/11 v5] Remove GDBSERVER uses from linux-btrace.c Gary Benson
2014-08-06 18:27   ` Doug Evans
2014-08-01 10:22 ` [PATCH 07/11 v5] Introduce get_thread_regcache_for_ptid Gary Benson
2014-08-06 18:15   ` Doug Evans
2014-08-01 10:27 ` [PATCH 08/11 v5] Include common-defs.h instead of defs.h/server.h in shared code Gary Benson
2014-08-06 18:16   ` Doug Evans
2014-08-01 10:27 ` [PATCH 10/11 v5] Remove GDBSERVER uses from i386-dregs.c Gary Benson
2014-08-06 18:32   ` Doug Evans
2014-08-07 12:28     ` Gary Benson
2014-08-01 10:28 ` [PATCH 06/11 v5] Add target/symbol.h Gary Benson
2014-08-06 18:08   ` Doug Evans
2014-08-07 10:42     ` Gary Benson
2014-08-20 11:16   ` Pedro Alves
2014-08-20 12:14     ` Gary Benson
2014-08-20 14:17       ` Pedro Alves
2014-08-01 10:28 ` [PATCH 05/11 v5] Add target/target.h Gary Benson
2014-08-06 17:49   ` Doug Evans
2014-08-07 13:48     ` Gary Benson
2014-08-20 14:49       ` Pedro Alves
2014-08-20 15:01         ` Gary Benson
2014-08-20 15:08           ` Pedro Alves
2014-08-20 12:00   ` Pedro Alves
2014-08-20 12:01   ` Pedro Alves [this message]
2014-08-20 13:38     ` Gary Benson
2014-08-01 10:30 ` [PATCH 01/11 v5] Introduce common/errors.h Gary Benson
2014-08-06 16:20   ` Doug Evans
2014-08-06 16:29     ` Gary Benson
2014-08-06 16:40       ` Doug Evans
2014-08-01 10:41 ` [PATCH 11/11 v5] Remove one GDBSERVER use from linux-waitpid.c Gary Benson
2014-08-06 18:35   ` Doug Evans
2014-08-07 12:39     ` Gary Benson
2014-08-20 15:04       ` 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=53F48E22.6010202@redhat.com \
    --to=palves@redhat.com \
    --cc=dje@google.com \
    --cc=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.com \
    /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