Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: tromey@redhat.com
Subject: Re: [RFA] New qRelocInsn RSP packet, docs and NEWS.
Date: Thu, 27 May 2010 20:43:00 -0000	[thread overview]
Message-ID: <201005272138.46702.pedro@codesourcery.com> (raw)
In-Reply-To: <201005272109.22413.pedro@codesourcery.com>

On Thursday 27 May 2010 21:09:22, Pedro Alves wrote:
> On Thursday 27 May 2010 20:58:02, Tom Tromey wrote:
> > >>>>> "Pedro" == Pedro Alves <pedro@codesourcery.com> writes:
> > 
> > Pedro> Index: src/gdb/remote.c
> > Pedro> ===================================================================
> > Pedro> --- src.orig/gdb/remote.c        2010-05-24 12:28:42.000000000 +0100
> > Pedro> +++ src/gdb/remote.c     2010-05-24 13:14:56.000000000 +0100
> > Pedro> @@ -242,6 +242,8 @@ static void remote_terminal_ours (void);
> >  
> > Pedro>  static int remote_read_description_p (struct target_ops *target);
> >  
> > Pedro> +char *unpack_varlen_hex (char *buff, ULONGEST *result);
> > 
> > It seems like this declaration could go in tracepoint.h.
> 
> This function does live in remote.c, but it's defined further down, close to
> its siblings.  tracepoint.c is also reusing it since not to long ago (since
> tracing moved to target_ops).  remote.h would make a bit more sense though
> one could argue it could also live in a shared utils.c-kind of file nowadays.

I've gone with remote.h.  There's a bit of cruft there too.

A bit going backwards to be including remote.h in tracepoint.c,
but, this is only having the includes match reality.

I think this is obvious, and so I'll apply it in a bit.

-- 
Pedro Alves

2010-05-27  Pedro Alves  <pedro@codesourcery.com>

	* remote.c (unpack_varlen_hex): Remove forward declaration.
	(remote_console_output): Make static, and add forward declaration.
	* remote.h: Drop FIXME comment.
	(remote_console_output, remote_cisco_objfile_relocate)
	(deprecated_target_resume_hook, deprecated_target_wait_loop_hook):
	Delete declarations.
	* tracepoint.c: Include "remote.h".
	(unpack_varlen_hex): Delete declaration.

---
 gdb/remote.c     |    4 ++--
 gdb/remote.h     |   19 +------------------
 gdb/tracepoint.c |    3 +--
 3 files changed, 4 insertions(+), 22 deletions(-)

Index: src/gdb/remote.c
===================================================================
--- src.orig/gdb/remote.c	2010-05-27 21:23:02.000000000 +0100
+++ src/gdb/remote.c	2010-05-27 21:31:55.000000000 +0100
@@ -242,7 +242,7 @@ static void remote_terminal_ours (void);
 
 static int remote_read_description_p (struct target_ops *target);
 
-char *unpack_varlen_hex (char *buff, ULONGEST *result);
+static void remote_console_output (char *msg);
 
 /* The non-stop remote protocol provisions for one pending stop reply.
    This is where we keep it until it is acknowledged.  */
@@ -4668,7 +4668,7 @@ remote_terminal_ours (void)
   remote_async_terminal_ours_p = 1;
 }
 
-void
+static void
 remote_console_output (char *msg)
 {
   char *p;
Index: src/gdb/remote.h
===================================================================
--- src.orig/gdb/remote.h	2010-05-27 21:20:58.000000000 +0100
+++ src/gdb/remote.h	2010-05-27 21:30:56.000000000 +0100
@@ -22,8 +22,6 @@
 
 struct target_desc;
 
-/* FIXME?: move this interface down to tgt vector) */
-
 /* Read a packet from the remote machine, with error checking, and
    store it in *BUF.  Resize *BUF using xrealloc if necessary to hold
    the result, and update *SIZEOF_BUF.  If FOREVER, wait forever
@@ -40,19 +38,7 @@ extern void getpkt (char **buf, long *si
 
 extern int putpkt (char *buf);
 
-/* Send HEX encoded string to the target console. (gdb_stdtarg) */
-
-extern void remote_console_output (char *);
-
-
-/* FIXME: cagney/1999-09-20: The remote cisco stuff in remote.c needs
-   to be broken out into a separate file (remote-cisco.[hc]?).  Before
-   that can happen, a remote protocol stack framework needs to be
-   implemented. */
-
-extern void remote_cisco_objfile_relocate (bfd_signed_vma text_off,
-					   bfd_signed_vma data_off,
-					   bfd_signed_vma bss_off);
+extern char *unpack_varlen_hex (char *buff, ULONGEST *result);
 
 extern void async_remote_interrupt_twice (void *arg);
 
@@ -61,9 +47,6 @@ extern int remote_write_bytes (CORE_ADDR
 
 extern int remote_read_bytes (CORE_ADDR memaddr, gdb_byte *myaddr, int len);
 
-extern void (*deprecated_target_resume_hook) (void);
-extern void (*deprecated_target_wait_loop_hook) (void);
-
 void register_remote_g_packet_guess (struct gdbarch *gdbarch, int bytes,
 				     const struct target_desc *tdesc);
 void register_remote_support_xml (const char *);
Index: src/gdb/tracepoint.c
===================================================================
--- src.orig/gdb/tracepoint.c	2010-05-27 21:21:02.000000000 +0100
+++ src/gdb/tracepoint.c	2010-05-27 21:29:27.000000000 +0100
@@ -46,6 +46,7 @@
 #include "gdbthread.h"
 #include "stack.h"
 #include "gdbcore.h"
+#include "remote.h"
 
 #include "ax.h"
 #include "ax-gdb.h"
@@ -3307,8 +3308,6 @@ tfile_interp_line (char *line,
 /* Parse the part of trace status syntax that is shared between
    the remote protocol and the trace file reader.  */
 
-extern char *unpack_varlen_hex (char *buff, ULONGEST *result);
-
 void
 parse_trace_status (char *line, struct trace_status *ts)
 {


  parent reply	other threads:[~2010-05-27 20:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24 15:30 Pedro Alves
2010-05-24 18:23 ` Eli Zaretskii
2010-05-26 18:28   ` Pedro Alves
2010-05-25 16:55 ` Joel Brobecker
2010-05-27 19:58 ` Tom Tromey
2010-05-27 20:14   ` Pedro Alves
2010-05-27 20:39     ` Tom Tromey
2010-05-27 21:03       ` Pedro Alves
2010-05-27 20:43     ` Pedro Alves [this message]
2010-06-01 19:10       ` 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=201005272138.46702.pedro@codesourcery.com \
    --to=pedro@codesourcery.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