aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-03-19 21:01:06 +0000
committerAndrew Cagney <cagney@redhat.com>2001-03-19 21:01:06 +0000
commitce359b09e53edb74f08c99ff208bb6dc0d73109a (patch)
treeeda1b219eab278391747df311cded088bc7c1b21
parent0b3f98d3508f6b8ed8a9fe14e3c3727ac2ea0d69 (diff)
downloadgdb-ce359b09e53edb74f08c99ff208bb6dc0d73109a.zip
gdb-ce359b09e53edb74f08c99ff208bb6dc0d73109a.tar.gz
gdb-ce359b09e53edb74f08c99ff208bb6dc0d73109a.tar.bz2
* remote.c (remote_cisco_section_offsets): Do not cast result from
bfd_get_section_name. (compare_sections_command): Ditto. (remote_cisco_section_offsets): Make ``p'' a const pointer. (compare_sections_command): Ditto for ``sectname''.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/remote.c7
2 files changed, 11 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4490a2a..e02ea55 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
2001-03-19 Andrew Cagney <ac131313@redhat.com>
+ * remote.c (remote_cisco_section_offsets): Do not cast result from
+ bfd_get_section_name.
+ (compare_sections_command): Ditto.
+ (remote_cisco_section_offsets): Make ``p'' a const pointer.
+ (compare_sections_command): Ditto for ``sectname''.
+
+2001-03-19 Andrew Cagney <ac131313@redhat.com>
+
From Mon Nov 20 13:59:29 2000 Andrew Cagney <cagney@b1.cygnus.com>:
* valops.c (hand_function_call): Simplify computation of the
address of the pushed argument.
diff --git a/gdb/remote.c b/gdb/remote.c
index 9dc7cbb..9dbb8bd 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1877,7 +1877,6 @@ remote_cisco_section_offsets (bfd_vma text_addr,
asection *sect;
bfd *abfd;
int len;
- char *p;
if (symfile_objfile == NULL)
return -1; /* no can do nothin' */
@@ -1894,7 +1893,7 @@ remote_cisco_section_offsets (bfd_vma text_addr,
sect != 0;
sect = sect->next)
{
- p = (unsigned char *) bfd_get_section_name (abfd, sect);
+ const char *p = bfd_get_section_name (abfd, sect);
len = strlen (p);
if (strcmp (p + len - 4, "data") == 0) /* ends in "data" */
if (data_base == 0 ||
@@ -4574,7 +4573,7 @@ compare_sections_command (char *args, int from_tty)
struct cleanup *old_chain;
char *tmp;
char *sectdata;
- char *sectname;
+ const char *sectname;
char *buf = alloca (PBUFSIZ);
bfd_size_type size;
bfd_vma lma;
@@ -4596,7 +4595,7 @@ compare_sections_command (char *args, int from_tty)
if (size == 0)
continue; /* skip zero-length section */
- sectname = (char *) bfd_get_section_name (exec_bfd, s);
+ sectname = bfd_get_section_name (exec_bfd, s);
if (args && strcmp (args, sectname) != 0)
continue; /* not the section selected by user */