Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Aleksandar Ristovski <aristovski@qnx.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch] i386-nto-tdep.c: Add support for xmm registers.
Date: Thu, 11 Jun 2009 15:09:00 -0000	[thread overview]
Message-ID: <20090611150929.GF25703@adacore.com> (raw)
In-Reply-To: <gvk3os$8fg$1@ger.gmane.org>

> Add support for XMM registers.
> * i386-nto-tdep.c (i386_nto_target): Remove definition.
> (i386nto_regset_id): Add case for SSE register set.
> (i386nto_register_area): Correctly calculate offsets and sizes for all 
> supported registers.
> (I386_NTO_SIGCONTEXT_OFFSET): Remove macro definition.
> (i386nto_sigcontext_addr): Use better method of retrieving sigcontext 
> pointer.
> (init_i386nto_ops): Remove i386_nto_target.
> (i386nto_init_abi): Remove nto_svr4_so_ops indirection. Properly setup 
> tdep params sc_reg_offset and sc_num_regs. Remove nto_svr4_so_ops and 
> make changes accordingly.

I won't pretend I understand everything you do in this patch, but
the pieces that are related to registers and sigcontext seem to be
sensible.

However, I found a few hunks which I think are not related to XMM
register support, but rather to shared library support...

> -/* Target vector for QNX NTO x86.  */
> -static struct nto_target_ops i386_nto_target;

For next time, it'll be easier for me to review your patches if you leave
this sort of cleanup for a future patch...

>  static void
>  i386nto_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
>  {
>    struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
> -  static struct target_so_ops nto_svr4_so_ops;

Seems unrelated to the patch, no? Same question regarding the hunk
below:

> @@ -279,31 +345,17 @@ i386nto_init_abi (struct gdbarch_info in
>    set_solib_svr4_fetch_link_map_offsets
>      (gdbarch, svr4_ilp32_fetch_link_map_offsets);
>  
> -  /* Initialize this lazily, to avoid an initialization order
> -     dependency on solib-svr4.c's _initialize routine.  */
> -  if (nto_svr4_so_ops.in_dynsym_resolve_code == NULL)
> -    {
> -      nto_svr4_so_ops = svr4_so_ops;
> +  /* Our loader handles solib relocations differently than svr4.  */
> +  svr4_so_ops.relocate_section_addresses = nto_relocate_section_addresses;
>  
> -      /* Our loader handles solib relocations differently than svr4.  */
> -      nto_svr4_so_ops.relocate_section_addresses
> -        = nto_relocate_section_addresses;
> -
> -      /* Supply a nice function to find our solibs.  */
> -      nto_svr4_so_ops.find_and_open_solib
> -        = nto_find_and_open_solib;
> -
> -      /* Our linker code is in libc.  */
> -      nto_svr4_so_ops.in_dynsym_resolve_code
> -        = nto_in_dynsym_resolve_code;
> -    }
> -  set_solib_ops (gdbarch, &nto_svr4_so_ops);
> +  /* Supply a nice function to find our solibs.  */
> +  svr4_so_ops.find_and_open_solib = nto_find_and_open_solib;
>  
> -  nto_set_target (&i386_nto_target);
> -}
> +  /* Our linker code is in libc.  */
> +  svr4_so_ops.in_dynsym_resolve_code = nto_in_dynsym_resolve_code;
>  
> -/* Provide a prototype to silence -Wmissing-prototypes.  */
> -extern initialize_file_ftype _initialize_i386nto_tdep;
> +  set_solib_ops (gdbarch, &svr4_so_ops);
> +}
>  
>  void
>  _initialize_i386nto_tdep (void)

-- 
Joel


  parent reply	other threads:[~2009-06-11 15:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27 19:20 Aleksandar Ristovski
2009-06-09  2:23 ` Aleksandar Ristovski
2009-06-11 15:09 ` Joel Brobecker [this message]
2009-06-11 15:32   ` Aleksandar Ristovski
2009-06-11 15:37     ` Joel Brobecker
2009-06-11 17:13       ` Aleksandar Ristovski
2009-06-11 19:59     ` Mark Kettenis
2009-06-11 20:03       ` Aleksandar Ristovski

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=20090611150929.GF25703@adacore.com \
    --to=brobecker@adacore.com \
    --cc=aristovski@qnx.com \
    --cc=gdb-patches@sources.redhat.com \
    /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