From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31369 invoked by alias); 11 Jun 2009 15:09:42 -0000 Received: (qmail 31356 invoked by uid 22791); 11 Jun 2009 15:09:40 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Jun 2009 15:09:34 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 6CBFC2BAB06; Thu, 11 Jun 2009 11:09:32 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id u8YubTEAJ4PG; Thu, 11 Jun 2009 11:09:32 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 2ACFE2BAAEE; Thu, 11 Jun 2009 11:09:32 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 93CBFF596C; Thu, 11 Jun 2009 11:09:29 -0400 (EDT) Date: Thu, 11 Jun 2009 15:09:00 -0000 From: Joel Brobecker To: Aleksandar Ristovski Cc: gdb-patches@sources.redhat.com Subject: Re: [patch] i386-nto-tdep.c: Add support for xmm registers. Message-ID: <20090611150929.GF25703@adacore.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-06/txt/msg00300.txt.bz2 > 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