summaryrefslogtreecommitdiff
path: root/gdb/i386-cygwin-tdep.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-04-19 15:10:53 +0000
committerPedro Alves <palves@redhat.com>2013-04-19 15:10:53 +0000
commit1614db2f39d46d6ba389e88edfeed3eeef6e3e7e (patch)
tree0405377135f6f5ec67aabe5fb8ce7cc6c90a9dae /gdb/i386-cygwin-tdep.c
parentf78a17cc8b54f718d16b6cfd63163a39a6df738b (diff)
downloadgdb-1614db2f39d46d6ba389e88edfeed3eeef6e3e7e.tar.gz
-Wpointer-sign: gdb_byte -> char.
This is sort of the opposite of the previous patch. Places that manipulate strings or interfaces that return strings are changed to use char* instead of gdb_byte*. gdb/ 2013-04-19 Pedro Alves <palves@redhat.com> * avr-tdep.c (avr_io_reg_read_command): New local 'bufstr'. Use it to get a string view of the byte buffer. * i386-cygwin-tdep.c (core_process_module_section): Change local 'buf' type to gdb_byte *. Adjust. * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full): Change local to char *. * solib-darwin.c (find_program_interpreter): Change return type to char *. Adjust. (darwin_solib_get_all_image_info_addr_at_init): Adjust. * solib-dsbt.c (enable_break2): Change local 'buf' to char *. * solib-frv.c (enable_break2): Change local 'buf' to char *. * solib-spu.c (spu_current_sos): Add gdb_byte * cast. * solib-svr4.c (find_program_interpreter): Change return type to char *. Adjust. (enable_break): Change local 'interp_name' to char *. * spu-multiarch.c (spu_xfer_partial): Add cast to 'char *'. * spu-tdep.c (spu_pseudo_register_read_spu): Add cast to 'char *'. (spu_pseudo_register_write_spu): Use char for string buffer. Adjust. (info_spu_event_command, info_spu_signal_command): Add casts to 'char *'.
Diffstat (limited to 'gdb/i386-cygwin-tdep.c')
-rw-r--r--gdb/i386-cygwin-tdep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c
index cee2adf6970..dc5d614e5ec 100644
--- a/gdb/i386-cygwin-tdep.c
+++ b/gdb/i386-cygwin-tdep.c
@@ -129,7 +129,7 @@ core_process_module_section (bfd *abfd, asection *sect, void *obj)
size_t module_name_size;
CORE_ADDR base_addr;
- char *buf = NULL;
+ gdb_byte *buf = NULL;
if (strncmp (sect->name, ".module", 7) != 0)
return;
@@ -154,9 +154,9 @@ core_process_module_section (bfd *abfd, asection *sect, void *obj)
module_name_size =
extract_unsigned_integer (buf + 8, 4, byte_order);
- module_name = buf + 12;
- if (module_name - buf + module_name_size > bfd_get_section_size (sect))
+ if (12 + module_name_size > bfd_get_section_size (sect))
goto out;
+ module_name = (char *) buf + 12;
/* The first module is the .exe itself. */
if (data->module_count != 0)