From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29959 invoked by alias); 26 Mar 2002 18:00:13 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29923 invoked from network); 26 Mar 2002 18:00:08 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by sources.redhat.com with SMTP; 26 Mar 2002 18:00:08 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id ED7173EDA; Tue, 26 Mar 2002 12:58:24 -0500 (EST) Message-ID: <3CA0B6C0.6090601@cygnus.com> Date: Tue, 26 Mar 2002 10:00:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.8) Gecko/20020210 X-Accept-Language: en-us MIME-Version: 1.0 To: Michal Ludvig Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] x86-64 segment registers handling References: <3CA0AF53.8030609@suse.cz> Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-03/txt/msg00497.txt.bz2 > Hi all, > this patch synces gdb with recent ABI changes in x86-64 kernel, which added segment registers to user_regs_struct in corefile and ptrace() call. Because it was hard to find all places which could depend on this change I also did a cleanup. I joined most of registers information to one structure at the beginning of x86-64-tdep.c to make it more readable and maintainable and changed some "anonymous constants" (numbers) to derivatives of #defines. > Can I commit? > > Index: ChangeLog > * x86-64-tdep.h (X86_64_NUM_REGS) > (X86_64_NUM_GREGS): Delete #defines > (x86_64_num_regs) > (x86_64_num_gregs): Added extern variables. > * x86-64-linux-nat.c (x86_64_regmap): Swapped > RBX <> RDX, added DS, ES, FD, GS > (x86_64_linux_dr_get_status), (supply_gregset), > (fill_gregset): Changed X86_64_NUM_GREGS to > x86_64_num_gregs > * x86-64-tdep.c (x86_64_register_raw_size_table): Delete > (x86_64_register_info_table): Add > (X86_64_NUM_REGS, X86_64_NUM_GREGS): Add > (x86_64_register_raw_size), > (x86_64_register_virtual_type), > (x86_64_register_name), > (_initialize_x86_64_tdep): Changed to reflect new > general x86_64_register_info_table. > (i386_gdbarch_init): gdbarch_register_bytes is now set > dynamicaly during initialization. > > Michal Ludvig Yes. Andrew PS: Some stylistic hints :-) ChangeLogs are full sentences so start with a capital and end with a full stop. The entry > (x86_64_register_raw_size), > (x86_64_register_virtual_type), > (x86_64_register_name), > (_initialize_x86_64_tdep): Changed to reflect new is written as: > (x86_64_register_raw_size, x86_64_register_virtual_type) > (x86_64_register_name, _initialize_x86_64_tdep): Changed to reflect new (but I'm not 100% sure - Eli is better at this - and after too many years I'm still learning it :-) Structs are indented as: struct foo { int blah; }; (but that isn't documented as I've not gotten around to getting it added to the GNU style guide.)