This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] [1/9] Remove macro REGISTER_NAME
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: deuling at de dot ibm dot com (Markus Deuling)
- Cc: gdb-patches at sourceware dot org (GDB Patches)
- Date: Wed, 6 Jun 2007 17:17:00 +0200 (CEST)
- Subject: Re: [rfc] [1/9] Remove macro REGISTER_NAME
Markus Deuling wrote:
> this patch removes REGISTER_NAME macro from gdbarch.sh
Look good except for some minor formatting issues:
* sh64-tdep.c (sh64_do_fp_register,sh64_do_register)
Should have space after comma (throughout the ChangeLog).
+ if (gdbarch_register_name (current_gdbarch, regnum) == NULL
+ || *gdbarch_register_name (current_gdbarch, (regnum)) == '\0')
Parentheses around "regnum" are unnecessary.
+ gdbarch_register_name
+ (current_gdbarch, argreg),
I think convention is to indent the argument list by two space
if it starts completely on a new line ...
+ gdbarch_register_name (current_gdbarch,
+ DWARF2_REG_TO_REGNUM(reg)),
Indentation is quite odd here...
+ gdb_assert (gdbarch_register_name (current_gdbarch,
+ VALUE_REGNUM (lazy_value)) != NULL
+ && *gdbarch_register_name
+ (current_gdbarch, VALUE_REGNUM (lazy_value)) != '\0');
And here.
+ print_spaces_filtered (15 - strlen (gdbarch_register_name
+ (current_gdbarch,i)), file);
Indentation. Space after comma.
+ ui_out_field_string (uiout, NULL,
+ gdbarch_register_name
+ (current_gdbarch, regnum));
Indentation.
+ fprintf_filtered (file, "%*s", 4 - (int) strlen (gdbarch_register_name
+ (current_gdbarch, regnum)),
Indentation.
+ if (gdbarch_register_name (current_gdbarch,
+ gdbarch_num_regs (current_gdbarch) + regnum)
+ != NULL
+ && gdbarch_register_name (current_gdbarch,
+ gdbarch_num_regs (current_gdbarch) + regnum)[0]
+ != '\0')
Indentation
frame_register_read (frame, regnum, buff);
+ fputs_filtered (gdbarch_register_name (current_gdbarch, regnum), file);
+ print_spaces_filtered (15 - strlen (gdbarch_register_name
+ (current_gdbarch, regnum)), file);
Indentation.
+ fputs_filtered (gdbarch_register_name (current_gdbarch, regnum), file);
+ print_spaces_filtered (15 - strlen (gdbarch_register_name
+ (current_gdbarch, regnum)), file);
Again.
+ fprintf_unfiltered (gdb_stdlog, "(%s)", gdbarch_register_name
+ (current_gdbarch, regno));
Again.
+ gdbarch_register_name
+ (current_gdbarch, SYMBOL_VALUE (sym)));
Again.
+ gdbarch_register_name
+ (current_gdbarch, SYMBOL_VALUE (sym)));
Again.
+ gdbarch_register_name
+ (current_gdbarch, SYMBOL_VALUE (sym)));
Again.
+ gdbarch_register_name
+ (current_gdbarch, SYMBOL_BASEREG (sym)));
Again.
+ gdbarch_register_name
+ (current_gdbarch, SYMBOL_BASEREG (sym)));
Again.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com