From f0cc8ad436c3d86783ceaa2febd2919ef5f996fa Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 7 Mar 2013 17:29:32 +0000 Subject: [PATCH] hex2bin, bin2hex: move declarations to header. Move the declarations to a header, rather than declaring them in (multiple) .c files. gdb/ 2013-03-07 Pedro Alves * remote.c (hex2bin, bin2hex): Move extern declarations to ... * remote.h (hex2bin, bin2hex): ... here. * tracepoint.c (hex2bin, bin2hex): Remove extern declarations. --- gdb/ChangeLog | 6 ++++++ gdb/remote.c | 4 ---- gdb/remote.h | 4 ++++ gdb/tracepoint.c | 3 --- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 981a6268d5e..b9aef0aea60 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2013-03-07 Pedro Alves + + * remote.c (hex2bin, bin2hex): Move extern declarations to ... + * remote.h (hex2bin, bin2hex): ... here. + * tracepoint.c (hex2bin, bin2hex): Remove extern declarations. + 2013-03-07 Eli Zaretskii * utils.c (initialize_utils): Improve doc strings of "set/show diff --git a/gdb/remote.c b/gdb/remote.c index 88a57c864c3..b69c8a8b482 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -183,10 +183,6 @@ static void record_currthread (ptid_t currthread); static int fromhex (int a); -extern int hex2bin (const char *hex, gdb_byte *bin, int count); - -extern int bin2hex (const gdb_byte *bin, char *hex, int count); - static int putpkt_binary (char *buf, int cnt); static void check_binary_download (CORE_ADDR addr); diff --git a/gdb/remote.h b/gdb/remote.h index d49b42774aa..b95370c21f5 100644 --- a/gdb/remote.h +++ b/gdb/remote.h @@ -39,6 +39,10 @@ extern void getpkt (char **buf, long *sizeof_buf, int forever); extern int putpkt (char *buf); +extern int hex2bin (const char *hex, gdb_byte *bin, int count); + +extern int bin2hex (const gdb_byte *bin, char *hex, int count); + extern char *unpack_varlen_hex (char *buff, ULONGEST *result); extern void async_remote_interrupt_twice (void *arg); diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index a2122279d34..c36c1a7bc85 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -69,9 +69,6 @@ #define O_LARGEFILE 0 #endif -extern int hex2bin (const char *hex, gdb_byte *bin, int count); -extern int bin2hex (const gdb_byte *bin, char *hex, int count); - /* Maximum length of an agent aexpression. This accounts for the fact that packets are limited to 400 bytes (which includes everything -- including the checksum), and assumes -- 2.30.2