This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[ob] Last remaining "register" attributes
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 20 Sep 2003 13:51:04 -0400
- Subject: [ob] Last remaining "register" attributes
Hopefully :-)
committed,
Andrew
2003-09-20 Andrew Cagney <cagney@redhat.com>
* cli/cli-script.c: Remove "register" attributes.
* config/pa/tm-hppa.h: Ditto.
* cli/cli-decode.c: Ditto.
* cli/cli-cmds.c: Ditto.
Index: cli/cli-cmds.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v
retrieving revision 1.33
diff -u -r1.33 cli-cmds.c
--- cli/cli-cmds.c 22 Jun 2003 04:23:52 -0000 1.33
+++ cli/cli-cmds.c 20 Sep 2003 17:48:42 -0000
@@ -444,7 +444,7 @@
echo_command (char *text, int from_tty)
{
char *p = text;
- register int c;
+ int c;
if (text)
while ((c = *p++) != '\0')
Index: cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.32
diff -u -r1.32 cli-decode.c
--- cli/cli-decode.c 9 Aug 2003 15:10:09 -0000 1.32
+++ cli/cli-decode.c 20 Sep 2003 17:48:42 -0000
@@ -133,7 +133,7 @@
add_cmd (char *name, enum command_class class, void (*fun) (char *, int),
char *doc, struct cmd_list_element **list)
{
- register struct cmd_list_element *c
+ struct cmd_list_element *c
= (struct cmd_list_element *) xmalloc (sizeof (struct cmd_list_element));
struct cmd_list_element *p;
@@ -212,8 +212,8 @@
{
/* Must do this since lookup_cmd tries to side-effect its first arg */
char *copied_name;
- register struct cmd_list_element *old;
- register struct cmd_list_element *c;
+ struct cmd_list_element *old;
+ struct cmd_list_element *c;
copied_name = (char *) alloca (strlen (oldname) + 1);
strcpy (copied_name, oldname);
old = lookup_cmd (&copied_name, *list, "", 1, 1);
@@ -247,7 +247,7 @@
char *prefixname, int allow_unknown,
struct cmd_list_element **list)
{
- register struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+ struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
c->allow_unknown = allow_unknown;
@@ -262,7 +262,7 @@
struct cmd_list_element **prefixlist, char *prefixname,
int allow_unknown, struct cmd_list_element **list)
{
- register struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
+ struct cmd_list_element *c = add_cmd (name, class, fun, doc, list);
c->prefixlist = prefixlist;
c->prefixname = prefixname;
c->allow_unknown = allow_unknown;
@@ -500,7 +500,7 @@
void
delete_cmd (char *name, struct cmd_list_element **list)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
struct cmd_list_element *p;
while (*list && STREQ ((*list)->name, name))
@@ -577,7 +577,7 @@
apropos_cmd (struct ui_file *stream, struct cmd_list_element *commandlist,
struct re_pattern_buffer *regex, char *prefix)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
int returnvalue=1; /*Needed to avoid double printing*/
/* Walk through the commands */
for (c=commandlist;c;c=c->next)
@@ -786,7 +786,7 @@
{
static char *line_buffer = 0;
static int line_size;
- register char *p;
+ char *p;
if (!line_buffer)
{
@@ -830,7 +830,7 @@
help_cmd_list (struct cmd_list_element *list, enum command_class class,
char *prefix, int recurse, struct ui_file *stream)
{
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
for (c = list; c; c = c->next)
{
Index: cli/cli-script.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-script.c,v
retrieving revision 1.18
diff -u -r1.18 cli-script.c
--- cli/cli-script.c 5 Aug 2003 02:44:50 -0000 1.18
+++ cli/cli-script.c 20 Sep 2003 17:48:42 -0000
@@ -255,7 +255,7 @@
void
execute_user_command (struct cmd_list_element *c, char *args)
{
- register struct command_line *cmdlines;
+ struct command_line *cmdlines;
struct cleanup *old_chain;
enum command_control_type ret;
static int user_call_depth = 0;
@@ -974,8 +974,8 @@
void
free_command_lines (struct command_line **lptr)
{
- register struct command_line *l = *lptr;
- register struct command_line *next;
+ struct command_line *l = *lptr;
+ struct command_line *next;
struct command_line **blist;
int i;
@@ -1040,7 +1040,7 @@
static void
validate_comname (char *comname)
{
- register char *p;
+ char *p;
if (comname == 0)
error_no_arg ("name of command to define");
@@ -1070,8 +1070,8 @@
CMD_PRE_HOOK,
CMD_POST_HOOK
};
- register struct command_line *cmds;
- register struct cmd_list_element *c, *newc, *oldc, *hookc = 0;
+ struct command_line *cmds;
+ struct cmd_list_element *c, *newc, *oldc, *hookc = 0;
char *tem = comname;
char *tem2;
char tmpbuf[MAX_TMPBUF];
@@ -1176,7 +1176,7 @@
document_command (char *comname, int from_tty)
{
struct command_line *doclines;
- register struct cmd_list_element *c;
+ struct cmd_list_element *c;
char *tem = comname;
char tmpbuf[128];
@@ -1194,8 +1194,8 @@
xfree (c->doc);
{
- register struct command_line *cl1;
- register int len = 0;
+ struct command_line *cl1;
+ int len = 0;
for (cl1 = doclines; cl1; cl1 = cl1->next)
len += strlen (cl1->line) + 1;
@@ -1290,7 +1290,7 @@
void
show_user_1 (struct cmd_list_element *c, struct ui_file *stream)
{
- register struct command_line *cmdlines;
+ struct command_line *cmdlines;
cmdlines = c->user_commands;
if (!cmdlines)
Index: config/pa/tm-hppa.h
===================================================================
RCS file: /cvs/src/src/gdb/config/pa/tm-hppa.h,v
retrieving revision 1.56
diff -u -r1.56 tm-hppa.h
--- config/pa/tm-hppa.h 22 Aug 2003 00:35:32 -0000 1.56
+++ config/pa/tm-hppa.h 20 Sep 2003 17:48:42 -0000
@@ -119,7 +119,7 @@
specified in the calling convention doc. As far as I know, the only
way to get the return value is to have the caller tell us where it
told the callee to put it, rather than have the callee tell us. */
-struct value *hppa_value_returned_from_stack (register struct type *valtype,
+struct value *hppa_value_returned_from_stack (struct type *valtype,
CORE_ADDR addr);
#define VALUE_RETURNED_FROM_STACK(valtype,addr) \
hppa_value_returned_from_stack (valtype, addr)
Index: mi/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/mi/ChangeLog,v
retrieving revision 1.119
diff -u -r1.119 ChangeLog
--- mi/ChangeLog 17 Sep 2003 14:24:31 -0000 1.119
+++ mi/ChangeLog 20 Sep 2003 17:48:43 -0000
@@ -1,3 +1,7 @@
+2003-09-20 Andrew Cagney <cagney@redhat.com>
+
+ * mi-main.c (get_register):
+
2003-09-17 Andrew Cagney <cagney@redhat.com>
* mi/mi-main.c: Rename REGISTER_BYTE to DEPRECATED_REGISTER_BYTE.
Index: mi/mi-main.c
===================================================================
RCS file: /cvs/src/src/gdb/mi/mi-main.c,v
retrieving revision 1.53
diff -u -r1.53 mi-main.c
--- mi/mi-main.c 17 Sep 2003 14:24:31 -0000 1.53
+++ mi/mi-main.c 20 Sep 2003 17:48:43 -0000
@@ -555,7 +555,7 @@
ptr = buf + 2;
for (j = 0; j < REGISTER_RAW_SIZE (regnum); j++)
{
- register int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
+ int idx = TARGET_BYTE_ORDER == BFD_ENDIAN_BIG ? j
: REGISTER_RAW_SIZE (regnum) - 1 - j;
sprintf (ptr, "%02x", (unsigned char) raw_buffer[idx]);
ptr += 2;