Remote unnecessary declaration of trace_regblock_size

Message ID 20191012050554.51250-1-cbiesinger@chromium.org
State Committed
Headers

Commit Message

Christian Biesinger Oct. 12, 2019, 5:05 a.m. UTC
  From: Christian Biesinger <cbiesinger@google.com>

This variable is declared in tracepoint.h, which is already included
by remote.c.

gdb/ChangeLog:

2019-10-10  Christian Biesinger  <cbiesinger@google.com>

	* remote.c (remote_target::get_trace_status): Remove declaration of
	trace_regblock_size.
---
 gdb/remote.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Simon Marchi Oct. 12, 2019, 11:31 p.m. UTC | #1
On 2019-10-12 01:05, cbiesinger@chromium.org wrote:
> From: Christian Biesinger <cbiesinger@google.com>
> 
> This variable is declared in tracepoint.h, which is already included
> by remote.c.

Remote -> Remove in the title.

Otherwise, that LGTM.

Simon
  
Terekhov, Mikhail via Gdb-patches Oct. 12, 2019, 11:37 p.m. UTC | #2
On Sat, Oct 12, 2019 at 7:31 PM Simon Marchi <simon.marchi@polymtl.ca> wrote:
>
> On 2019-10-12 01:05, cbiesinger@chromium.org wrote:
> > From: Christian Biesinger <cbiesinger@google.com>
> >
> > This variable is declared in tracepoint.h, which is already included
> > by remote.c.
>
> Remote -> Remove in the title.
>
> Otherwise, that LGTM.

Thanks, pushed.

Christian
  

Patch

diff --git a/gdb/remote.c b/gdb/remote.c
index 21160e13acc..73b510dd395 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -13102,14 +13102,13 @@  remote_target::get_trace_status (struct trace_status *ts)
 {
   /* Initialize it just to avoid a GCC false warning.  */
   char *p = NULL;
-  /* FIXME we need to get register block size some other way.  */
-  extern int trace_regblock_size;
   enum packet_result result;
   struct remote_state *rs = get_remote_state ();
 
   if (packet_support (PACKET_qTStatus) == PACKET_DISABLE)
     return -1;
 
+  /* FIXME we need to get register block size some other way.  */
   trace_regblock_size
     = rs->get_remote_arch_state (target_gdbarch ())->sizeof_g_packet;