* [RFA] ARI fixes: More OP eol fixes.
@ 2009-10-06 22:08 Pierre Muller
2009-10-06 22:41 ` Joel Brobecker
0 siblings, 1 reply; 4+ messages in thread
From: Pierre Muller @ 2009-10-06 22:08 UTC (permalink / raw)
To: gdb-patches
The only reason for the RFA here
is the ChangeLog entry:
what should I put for the
c-exp.y "variable" rule?
Pierre
2009-10-06 Pierre Muller <muller@ics.u-strasbg.fr>
ARI fix: OP eol rule.
* blockframe.c (find_pc_partial_function): Avoid operator at end of
line.
* buildsym.c (find_symbol_in_list): Idem.
(start_subfile, patch_subfile_names): Idem.
* c-exp.y (variable, yylex): Idem.
* c-typeprint.c (c_print_type, c_type_print_base): Idem.
* c-valprint.c (c_val_print): Idem.
* coffread.c (patch_opaque_types, process_coff_symbol): Idem.
* corelow.c (core_open): Idem.
* cris-tdep.c (move_reg_to_mem_movem_op): Idem.
* cli/cli-decode.c (help_cmd_list, find_command_name_length): Idem.
Index: blockframe.c
===================================================================
RCS file: /cvs/src/src/gdb/blockframe.c,v
retrieving revision 1.122
diff -u -p -r1.122 blockframe.c
--- blockframe.c 9 Sep 2009 17:23:55 -0000 1.122
+++ blockframe.c 6 Oct 2009 21:54:20 -0000
@@ -253,9 +253,9 @@ find_pc_partial_function (CORE_ADDR pc,
psb = find_pc_sect_psymbol (pst, mapped_pc, section);
if (psb
- && (msymbol == NULL ||
- (SYMBOL_VALUE_ADDRESS (psb)
- >= SYMBOL_VALUE_ADDRESS (msymbol))))
+ && (msymbol == NULL
+ || (SYMBOL_VALUE_ADDRESS (psb)
+ >= SYMBOL_VALUE_ADDRESS (msymbol))))
{
/* This case isn't being cached currently. */
if (address)
Index: buildsym.c
===================================================================
RCS file: /cvs/src/src/gdb/buildsym.c,v
retrieving revision 1.76
diff -u -p -r1.76 buildsym.c
--- buildsym.c 2 Jul 2009 17:21:05 -0000 1.76
+++ buildsym.c 6 Oct 2009 21:54:21 -0000
@@ -163,8 +163,8 @@ find_symbol_in_list (struct pending *lis
for (j = list->nsyms; --j >= 0;)
{
pp = SYMBOL_LINKAGE_NAME (list->symbol[j]);
- if (*pp == *name && strncmp (pp, name, length) == 0 &&
- pp[length] == '\0')
+ if (*pp == *name && strncmp (pp, name, length) == 0
+ && pp[length] == '\0')
{
return (list->symbol[j]);
}
@@ -583,8 +583,8 @@ start_subfile (char *name, char *dirname
source file. */
subfile->language = deduce_language_from_filename (subfile->name);
- if (subfile->language == language_unknown &&
- subfile->next != NULL)
+ if (subfile->language == language_unknown
+ && subfile->next != NULL)
{
subfile->language = subfile->next->language;
}
@@ -656,8 +656,8 @@ patch_subfile_names (struct subfile *sub
symbols have been processed for a given source file. */
subfile->language = deduce_language_from_filename (subfile->name);
- if (subfile->language == language_unknown &&
- subfile->next != NULL)
+ if (subfile->language == language_unknown
+ && subfile->next != NULL)
{
subfile->language = subfile->next->language;
}
Index: c-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/c-exp.y,v
retrieving revision 1.62
diff -u -p -r1.62 c-exp.y
--- c-exp.y 21 Sep 2009 19:23:46 -0000 1.62
+++ c-exp.y 6 Oct 2009 21:54:22 -0000
@@ -777,9 +777,9 @@ variable: name_not_typename
{
if (symbol_read_needs_frame (sym))
{
- if (innermost_block == 0 ||
- contained_in (block_found,
- innermost_block))
+ if (innermost_block == 0
+ || contained_in (block_found,
+ innermost_block))
innermost_block = block_found;
}
@@ -796,8 +796,9 @@ variable: name_not_typename
/* C++: it hangs off of `this'. Must
not inadvertently convert from a method
call
to data ref. */
- if (innermost_block == 0 ||
- contained_in (block_found,
innermost_block))
+ if (innermost_block == 0
+ || contained_in (block_found,
+ innermost_block))
innermost_block = block_found;
write_exp_elt_opcode (OP_THIS);
write_exp_elt_opcode (OP_THIS);
@@ -2174,9 +2175,9 @@ yylex (void)
/* Input names that aren't symbols but ARE valid hex numbers,
when the input radix permits them, can be names or numbers
depending on the parse. Note we support radixes > 16 here. */
- if (!sym &&
- ((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10) ||
- (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix - 10)))
+ if (!sym
+ && ((tokstart[0] >= 'a' && tokstart[0] < 'a' + input_radix - 10)
+ || (tokstart[0] >= 'A' && tokstart[0] < 'A' + input_radix -
10)))
{
YYSTYPE newlval; /* Its value is ignored. */
hextype = parse_number (tokstart, namelen, 0, &newlval);
Index: c-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-typeprint.c,v
retrieving revision 1.47
diff -u -p -r1.47 c-typeprint.c
--- c-typeprint.c 2 Jul 2009 12:57:14 -0000 1.47
+++ c-typeprint.c 6 Oct 2009 21:54:23 -0000
@@ -70,17 +70,15 @@ c_print_type (struct type *type, char *v
c_type_print_base (type, stream, show, level);
code = TYPE_CODE (type);
if ((varstring != NULL && *varstring != '\0')
- ||
/* Need a space if going to print stars or brackets;
but not if we will print just a type name. */
- ((show > 0 || TYPE_NAME (type) == 0)
- &&
- (code == TYPE_CODE_PTR || code == TYPE_CODE_FUNC
- || code == TYPE_CODE_METHOD
- || code == TYPE_CODE_ARRAY
- || code == TYPE_CODE_MEMBERPTR
- || code == TYPE_CODE_METHODPTR
- || code == TYPE_CODE_REF)))
+ || ((show > 0 || TYPE_NAME (type) == 0)
+ && (code == TYPE_CODE_PTR || code == TYPE_CODE_FUNC
+ || code == TYPE_CODE_METHOD
+ || code == TYPE_CODE_ARRAY
+ || code == TYPE_CODE_MEMBERPTR
+ || code == TYPE_CODE_METHODPTR
+ || code == TYPE_CODE_REF)))
fputs_filtered (" ", stream);
need_post_space = (varstring != NULL && strcmp (varstring, "") != 0);
c_type_print_varspec_prefix (type, stream, show, 0, need_post_space);
@@ -747,8 +745,8 @@ c_type_print_base (struct type *type, st
* tag for unnamed struct/union/enum's, which we don't
* want to print.
*/
- if (TYPE_TAG_NAME (type) != NULL &&
- strncmp (TYPE_TAG_NAME (type), "{unnamed", 8))
+ if (TYPE_TAG_NAME (type) != NULL
+ && strncmp (TYPE_TAG_NAME (type), "{unnamed", 8))
{
fputs_filtered (TYPE_TAG_NAME (type), stream);
if (show > 0)
@@ -785,8 +783,8 @@ c_type_print_base (struct type *type, st
masquerading as a class, if all members are public, there's
no need for a "public:" label. */
- if ((TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_CLASS) ||
- (TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_TEMPLATE))
+ if ((TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_CLASS)
+ || (TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_TEMPLATE))
{
QUIT;
len = TYPE_NFIELDS (type);
@@ -814,8 +812,8 @@ c_type_print_base (struct type *type, st
}
}
}
- else if ((TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_STRUCT) ||
- (TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_UNION))
+ else if ((TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_STRUCT)
+ || (TYPE_DECLARED_TYPE (type) == DECLARED_TYPE_UNION))
{
QUIT;
len = TYPE_NFIELDS (type);
@@ -834,8 +832,8 @@ c_type_print_base (struct type *type, st
QUIT;
len = TYPE_FN_FIELDLIST_LENGTH (type, j);
for (i = 0; i < len; i++)
- if (TYPE_FN_FIELD_PRIVATE (TYPE_FN_FIELDLIST1 (type,
j), i) ||
- TYPE_FN_FIELD_PROTECTED (TYPE_FN_FIELDLIST1
(type, j), i))
+ if (TYPE_FN_FIELD_PRIVATE (TYPE_FN_FIELDLIST1 (type,
j), i)
+ || TYPE_FN_FIELD_PROTECTED (TYPE_FN_FIELDLIST1
(type, j), i))
{
need_access_label = 1;
break;
@@ -986,9 +984,9 @@ c_type_print_base (struct type *type, st
TYPE_FN_FIELD_PHYSNAME (f, j));
break;
}
- else if (!is_constructor && /* constructors don't have
declared types */
- !is_full_physname_constructor && /* " "
*/
- !is_type_conversion_operator (type, i, j))
+ else if (!is_constructor /* constructors don't have
declared types */
+ && !is_full_physname_constructor /* " "
*/
+ && !is_type_conversion_operator (type, i, j))
{
type_print (TYPE_TARGET_TYPE (TYPE_FN_FIELD_TYPE (f,
j)),
"", stream, -1);
@@ -1070,8 +1068,8 @@ c_type_print_base (struct type *type, st
"{unnamed struct}"/"{unnamed union}"/"{unnamed enum}"
tag for unnamed struct/union/enum's, which we don't
want to print. */
- if (TYPE_TAG_NAME (type) != NULL &&
- strncmp (TYPE_TAG_NAME (type), "{unnamed", 8))
+ if (TYPE_TAG_NAME (type) != NULL
+ && strncmp (TYPE_TAG_NAME (type), "{unnamed", 8))
{
fputs_filtered (TYPE_TAG_NAME (type), stream);
if (show > 0)
Index: c-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-valprint.c,v
retrieving revision 1.62
diff -u -p -r1.62 c-valprint.c
--- c-valprint.c 25 Sep 2009 21:39:52 -0000 1.62
+++ c-valprint.c 6 Oct 2009 21:54:24 -0000
@@ -291,8 +291,8 @@ c_val_print (struct type *type, const gd
struct minimal_symbol *msymbol =
lookup_minimal_symbol_by_pc (vt_address);
- if ((msymbol != NULL) &&
- (vt_address == SYMBOL_VALUE_ADDRESS (msymbol)))
+ if ((msymbol != NULL)
+ && (vt_address == SYMBOL_VALUE_ADDRESS (msymbol)))
{
fputs_filtered (" <", stream);
fputs_filtered (SYMBOL_PRINT_NAME (msymbol), stream);
Index: coffread.c
===================================================================
RCS file: /cvs/src/src/gdb/coffread.c,v
retrieving revision 1.95
diff -u -p -r1.95 coffread.c
--- coffread.c 29 Jun 2009 13:18:37 -0000 1.95
+++ coffread.c 6 Oct 2009 21:54:25 -0000
@@ -1434,10 +1434,10 @@ patch_opaque_types (struct symtab *s)
Remove syms from the chain when their types are stored,
but search the whole chain, as there may be several syms
from different files with the same name. */
- if (SYMBOL_CLASS (real_sym) == LOC_TYPEDEF &&
- SYMBOL_DOMAIN (real_sym) == VAR_DOMAIN &&
- TYPE_CODE (SYMBOL_TYPE (real_sym)) == TYPE_CODE_PTR &&
- TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (real_sym))) != 0)
+ if (SYMBOL_CLASS (real_sym) == LOC_TYPEDEF
+ && SYMBOL_DOMAIN (real_sym) == VAR_DOMAIN
+ && TYPE_CODE (SYMBOL_TYPE (real_sym)) == TYPE_CODE_PTR
+ && TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (real_sym))) != 0)
{
char *name = SYMBOL_LINKAGE_NAME (real_sym);
int hash = hashname (name);
@@ -1446,8 +1446,8 @@ patch_opaque_types (struct symtab *s)
prev = 0;
for (sym = opaque_type_chain[hash]; sym;)
{
- if (name[0] == SYMBOL_LINKAGE_NAME (sym)[0] &&
- strcmp (name + 1, SYMBOL_LINKAGE_NAME (sym) + 1) == 0)
+ if (name[0] == SYMBOL_LINKAGE_NAME (sym)[0]
+ && strcmp (name + 1, SYMBOL_LINKAGE_NAME (sym) + 1) == 0)
{
if (prev)
{
@@ -1632,10 +1632,10 @@ process_coff_symbol (struct coff_symbol
simple forward reference (TYPE_CODE_UNDEF) is not an
empty structured type, though; the forward references
work themselves out via the magic of coff_lookup_type. */
- if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR &&
- TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (sym))) == 0 &&
- TYPE_CODE (TYPE_TARGET_TYPE (SYMBOL_TYPE (sym))) !=
- TYPE_CODE_UNDEF)
+ if (TYPE_CODE (SYMBOL_TYPE (sym)) == TYPE_CODE_PTR
+ && TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (sym))) == 0
+ && TYPE_CODE (TYPE_TARGET_TYPE (SYMBOL_TYPE (sym)))
+ != TYPE_CODE_UNDEF)
{
int i = hashname (SYMBOL_LINKAGE_NAME (sym));
Index: corelow.c
===================================================================
RCS file: /cvs/src/src/gdb/corelow.c,v
retrieving revision 1.90
diff -u -p -r1.90 corelow.c
--- corelow.c 31 Jul 2009 15:25:21 -0000 1.90
+++ corelow.c 6 Oct 2009 21:54:26 -0000
@@ -321,8 +321,8 @@ core_open (char *filename, int from_tty)
if (temp_bfd == NULL)
perror_with_name (filename);
- if (!bfd_check_format (temp_bfd, bfd_core) &&
- !gdb_check_format (temp_bfd))
+ if (!bfd_check_format (temp_bfd, bfd_core)
+ && !gdb_check_format (temp_bfd))
{
/* Do it after the err msg */
/* FIXME: should be checking for errors from bfd_close (for one
thing,
Index: cris-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/cris-tdep.c,v
retrieving revision 1.173
diff -u -p -r1.173 cris-tdep.c
--- cris-tdep.c 28 Jul 2009 16:39:06 -0000 1.173
+++ cris-tdep.c 6 Oct 2009 21:54:27 -0000
@@ -3128,8 +3128,8 @@ move_reg_to_mem_movem_op (unsigned short
{
/* The assign value is the value after the increment. Normally, the
assign value is the value before the increment. */
- if ((cris_get_operand1 (inst) == REG_PC) &&
- (cris_get_mode (inst) == PREFIX_ASSIGN_MODE))
+ if ((cris_get_operand1 (inst) == REG_PC)
+ && (cris_get_mode (inst) == PREFIX_ASSIGN_MODE))
{
/* The prefix handles the problem if we are in a delay slot. */
inst_env->reg[REG_PC] = inst_env->prefix_value;
Index: cli/cli-decode.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v
retrieving revision 1.84
diff -u -p -r1.84 cli-decode.c
--- cli/cli-decode.c 13 Aug 2009 14:56:19 -0000 1.84
+++ cli/cli-decode.c 6 Oct 2009 21:54:29 -0000
@@ -1051,10 +1051,10 @@ help_cmd_list (struct cmd_list_element *
for (c = list; c; c = c->next)
{
- if (c->abbrev_flag == 0 &&
- (class == all_commands
- || (class == all_classes && c->func == NULL)
- || (class == c->class && c->func != NULL)))
+ if (c->abbrev_flag == 0
+ && (class == all_commands
+ || (class == all_classes && c->func == NULL)
+ || (class == c->class && c->func != NULL)))
{
print_help_for_command (c, prefix, recurse, stream);
}
@@ -1108,11 +1108,11 @@ find_command_name_length (const char *te
used as a suffix for print, examine and display.
Note that this is larger than the character set allowed when creating
user-defined commands. */
- while (isalnum (*p) || *p == '-' || *p == '_' ||
+ while (isalnum (*p) || *p == '-' || *p == '_'
/* Characters used by TUI specific commands. */
- *p == '+' || *p == '<' || *p == '>' || *p == '$' ||
+ || *p == '+' || *p == '<' || *p == '>' || *p == '$'
/* Characters used for XDB compatibility. */
- (xdb_commands && (*p == '!' || *p == '/' || *p == '?')))
+ || (xdb_commands && (*p == '!' || *p == '/' || *p == '?')))
p++;
return p - text;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] ARI fixes: More OP eol fixes.
2009-10-06 22:08 [RFA] ARI fixes: More OP eol fixes Pierre Muller
@ 2009-10-06 22:41 ` Joel Brobecker
2009-10-06 22:50 ` Pierre Muller
2009-10-07 7:32 ` Eli Zaretskii
0 siblings, 2 replies; 4+ messages in thread
From: Joel Brobecker @ 2009-10-06 22:41 UTC (permalink / raw)
To: Pierre Muller; +Cc: gdb-patches
> what should I put for the
> c-exp.y "variable" rule?
Your changelog looks fine to me. We can't always use function or variable
names since code is not always necessary just functions or variables...
> 2009-10-06 Pierre Muller <muller@ics.u-strasbg.fr>
>
> ARI fix: OP eol rule.
> * blockframe.c (find_pc_partial_function): Avoid operator at end of
> line.
> * buildsym.c (find_symbol_in_list): Idem.
> (start_subfile, patch_subfile_names): Idem.
> * c-exp.y (variable, yylex): Idem.
> * c-typeprint.c (c_print_type, c_type_print_base): Idem.
> * c-valprint.c (c_val_print): Idem.
> * coffread.c (patch_opaque_types, process_coff_symbol): Idem.
> * corelow.c (core_open): Idem.
> * cris-tdep.c (move_reg_to_mem_movem_op): Idem.
> * cli/cli-decode.c (help_cmd_list, find_command_name_length): Idem.
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [RFA] ARI fixes: More OP eol fixes.
2009-10-06 22:41 ` Joel Brobecker
@ 2009-10-06 22:50 ` Pierre Muller
2009-10-07 7:32 ` Eli Zaretskii
1 sibling, 0 replies; 4+ messages in thread
From: Pierre Muller @ 2009-10-06 22:50 UTC (permalink / raw)
To: 'Joel Brobecker'; +Cc: gdb-patches
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé : Wednesday, October 07, 2009 12:41 AM
> À : Pierre Muller
> Cc : gdb-patches@sourceware.org
> Objet : Re: [RFA] ARI fixes: More OP eol fixes.
>
> > what should I put for the
> > c-exp.y "variable" rule?
>
> Your changelog looks fine to me. We can't always use function or
> variable
> names since code is not always necessary just functions or variables...
Thanks for your feedback,
patch committed...
Pierre
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] ARI fixes: More OP eol fixes.
2009-10-06 22:41 ` Joel Brobecker
2009-10-06 22:50 ` Pierre Muller
@ 2009-10-07 7:32 ` Eli Zaretskii
1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2009-10-07 7:32 UTC (permalink / raw)
To: Joel Brobecker; +Cc: muller, gdb-patches
> Date: Tue, 6 Oct 2009 15:41:05 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
>
> > what should I put for the
> > c-exp.y "variable" rule?
>
> Your changelog looks fine to me. We can't always use function or variable
> names since code is not always necessary just functions or variables...
We could use "<variable>", that's a customary way of using a label
that is not a function.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-10-07 7:32 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-06 22:08 [RFA] ARI fixes: More OP eol fixes Pierre Muller
2009-10-06 22:41 ` Joel Brobecker
2009-10-06 22:50 ` Pierre Muller
2009-10-07 7:32 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox