From 016382f8a43a59eca49f68c7d8b8058f64eaf40f Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Mon, 19 Oct 2020 17:44:15 +0100 Subject: [PATCH] gdb: delete unused function print_char_chars Spotted that print_char_chars appears to be unused, delete it. There should be no user visible changes after this commit. gdb/ChangeLog: * valprint.c (print_char_chars): Delete definition. * valprint.h (print_char_chars): Delete declaration. --- gdb/ChangeLog | 5 +++++ gdb/valprint.c | 37 ------------------------------------- gdb/valprint.h | 3 --- 3 files changed, 5 insertions(+), 40 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0f702d997b..6788fc76ad 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-12-23 Andrew Burgess + + * valprint.c (print_char_chars): Delete definition. + * valprint.h (print_char_chars): Delete declaration. + 2020-12-23 Samuel Thibault * i386-gnu-tdep.c (I386_GNU_UCONTEXT_T_THREAD_STATE_OFFSET): New diff --git a/gdb/valprint.c b/gdb/valprint.c index 50278ac309..baf8f76546 100644 --- a/gdb/valprint.c +++ b/gdb/valprint.c @@ -1827,43 +1827,6 @@ print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, } } -/* VALADDR points to a char integer of LEN bytes. - Print it out in appropriate language form on stream. - Omit any leading zero chars. */ - -void -print_char_chars (struct ui_file *stream, struct type *type, - const gdb_byte *valaddr, - unsigned len, enum bfd_endian byte_order) -{ - const gdb_byte *p; - - if (byte_order == BFD_ENDIAN_BIG) - { - p = valaddr; - while (p < valaddr + len - 1 && *p == 0) - ++p; - - while (p < valaddr + len) - { - LA_EMIT_CHAR (*p, type, stream, '\''); - ++p; - } - } - else - { - p = valaddr + len - 1; - while (p > valaddr && *p == 0) - --p; - - while (p >= valaddr) - { - LA_EMIT_CHAR (*p, type, stream, '\''); - --p; - } - } -} - /* Print function pointer with inferior address ADDRESS onto stdio stream STREAM. */ diff --git a/gdb/valprint.h b/gdb/valprint.h index ef9ebfa84f..47f6ed009b 100644 --- a/gdb/valprint.h +++ b/gdb/valprint.h @@ -157,9 +157,6 @@ extern void print_decimal_chars (struct ui_file *, const gdb_byte *, extern void print_hex_chars (struct ui_file *, const gdb_byte *, unsigned int, enum bfd_endian, bool); -extern void print_char_chars (struct ui_file *, struct type *, - const gdb_byte *, unsigned int, enum bfd_endian); - extern void print_function_pointer_address (const struct value_print_options *options, struct gdbarch *gdbarch, CORE_ADDR address, -- 2.34.1