From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: cseo@linux.vnet.ibm.com (Carlos Eduardo Seo)
Cc: gdb-patches@sourceware.org (GDB Patches Mailing List)
Subject: Re: [RFC] Add support for PPC Altivec registers in gcore
Date: Wed, 14 May 2008 04:22:00 -0000 [thread overview]
Message-ID: <200805132139.m4DLdCUJ032649@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <4824B100.30509@linux.vnet.ibm.com> from "Carlos Eduardo Seo" at May 09, 2008 05:16:00 PM
Carlos Eduaro Seo wrote:
> I also separated the ppc and x86 implementations from the main gcore
> stuff, to make it easier to analyze.
>
> Is this close to what you had in mind?
Thanks, this is looking very good. I've only a couple
of minor issues:
> +# Supported register notes in a core file
Please add a '.' at the end.
> +/* Data structure for the supported register notes in a core file */
Likewise.
> + /* The loop below uses the new struct core_regset_section, which stores
> + the supported section names and sizes for the core file. Note that
> + note PRSTATUS needs to be treated specially. But the other notes are
> + structurally the same, so they can benefit from the new struct. */
Always use two spaces after '.'.
> + /* .reg was already handled above */
'.' at the end.
> + if ((regset = gdbarch_regset_from_core_section (gdbarch,
> + sect_list->sect_name,
> + sect_list->size))
> + != NULL && regset->collect_regset != NULL)
I think we should assert that regset and regset->collect_regset are
non-NULL here. If a target provides a core_regset_sections list,
it simply needs to ensure that its regset_from_core_section will
recognize all sections in the list.
> + /* For architectures that does not have the struct core_regset_section implemented,
> + we use the old method. When all the architectures have the new support, the code
> + below should be deprecated. The FILL_FPXREGSET fallback was removed since i386
> + has the new method implemented. */
Again two spaces after '.'. Please make sure that the line length
does not exceed 80 characters. Also, I think the sentence about
FILL_FPXREGSET is superfluous -- that's already been addressed,
no need to keep a reminder to it in the code.
Finally, "... the code below should be deprecated" ... once all
architectures have the new support, the code below should be
*deleted*. It is already deprecated (i.e. new code should not
be using it any longer) today.
> @@ -1075,7 +1075,6 @@ gdb_print_host_address (const void *addr
>
> fprintf_filtered (stream, "0x%lx", (unsigned long) addr);
> }
> -\f
This whitespace change probably was unintentional?
> +const char *
> +host_address_to_string (const void *addr)
> +{
> + char *str = get_cell ();
> + sprintf (str, "0x%lx", (unsigned long) addr);
> + return str;
> +}
Please move gdb_print_host_address and host_address_to_string
next to each other, so that it becomes clearer that the
comment in gdb_print_host_address also applies to host_address_to_string.
> @@ -35,6 +35,18 @@
> #include "solib-svr4.h"
> #include "symtab.h"
> #include "arch-utils.h"
> +#include "regset.h"
Please update the Makefile.in dependency list as well.
> +/* Supported register note sections */
'.' at the end.
> +static struct core_regset_section i386_regset_sections[] =
As this is Linux-specific, maybe i386_linux_regset_section ?
> + { ".reg", 144 },
> + { ".reg2", 108 },
> +#ifdef FILL_FPXREGSET
> + { ".reg-xfp", 512 },
> +#endif
> + { NULL, 0 }
Do we actually need the #ifdef any more? There shouldn't
be any harm in unconditionally including those ...
> + /* Install supported register note sections */
'.' at the end.
> Index: src/gdb/ppc-linux-tdep.c
> ===================================================================
> --- src.orig/gdb/ppc-linux-tdep.c
> +++ src/gdb/ppc-linux-tdep.c
> @@ -45,6 +45,14 @@
> #include "features/rs6000/powerpc-altivec64l.c"
> #include "features/rs6000/powerpc-e500l.c"
>
> +static struct core_regset_section ppc_regset_sections[] =
Again ppc_linux_ ... as long as it is Linux-specific.
With those minor modifications, I think this patch should be OK
(assuming testing passes, of course).
Thanks,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2008-05-13 21:40 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-26 22:14 Carlos Eduardo Seo
2007-10-29 19:24 ` Ulrich Weigand
2007-10-30 21:02 ` Carlos Eduardo Seo
2007-10-30 21:18 ` Ulrich Weigand
2007-10-30 21:30 ` Carlos Eduardo Seo
2007-10-30 21:31 ` Ulrich Weigand
2007-10-31 21:14 ` Carlos Eduardo Seo
2007-10-31 21:43 ` Ulrich Weigand
2008-02-08 21:42 ` Carlos Eduardo Seo
2008-02-18 18:42 ` Ulrich Weigand
2008-02-27 17:07 ` Carlos Eduardo Seo
2008-03-05 18:27 ` Ulrich Weigand
2008-03-10 14:22 ` Carlos Eduardo Seo
2008-03-17 19:07 ` Ulrich Weigand
2008-03-20 15:31 ` Carlos Eduardo Seo
2008-03-25 20:13 ` Ulrich Weigand
2008-03-25 21:31 ` Andreas Schwab
2008-03-25 21:54 ` Ulrich Weigand
2008-03-25 22:46 ` Carlos Eduardo Seo
2008-03-26 11:28 ` Ulrich Weigand
2008-03-27 1:52 ` Carlos Eduardo Seo
2008-03-27 9:00 ` Andreas Schwab
2008-03-27 19:54 ` Ulrich Weigand
2008-03-28 20:41 ` Carlos Eduardo Seo
2008-03-31 19:19 ` Ulrich Weigand
2008-05-09 19:27 ` Carlos Eduardo Seo
2008-05-09 20:30 ` Ulrich Weigand
2008-05-10 1:33 ` Carlos Eduardo Seo
2008-05-14 4:22 ` Ulrich Weigand [this message]
2008-05-20 18:41 ` Carlos Eduardo Seo
2008-05-21 18:46 ` Ulrich Weigand
2008-05-22 14:34 ` Carlos Eduardo Seo
2008-05-22 18:45 ` Ulrich Weigand
2008-05-26 16:26 ` Carlos Eduardo Seo
[not found] <OF67129E0D.852FADB2-ON4125738B.0050E74D-4125738B.005102FF@de.ibm.com>
2007-11-25 4:51 ` Carlos Eduardo Seo
2007-11-26 16:09 ` Ulrich Weigand
2007-11-26 16:12 ` Carlos Eduardo Seo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200805132139.m4DLdCUJ032649@d12av02.megacenter.de.ibm.com \
--to=uweigand@de.ibm.com \
--cc=cseo@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox