From: Andrew Cagney <ac131313@cygnus.com>
To: Michal Ludvig <mludvig@suse.cz>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] x86-64 segment registers handling
Date: Tue, 26 Mar 2002 10:00:00 -0000 [thread overview]
Message-ID: <3CA0B6C0.6090601@cygnus.com> (raw)
In-Reply-To: <3CA0AF53.8030609@suse.cz>
> 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.)
next prev parent reply other threads:[~2002-03-26 18:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-26 9:26 Michal Ludvig
2002-03-26 10:00 ` Andrew Cagney [this message]
2002-03-26 10:09 ` Michal Ludvig
2002-03-27 4:18 ` Michal Ludvig
2002-03-27 6:23 ` Andrew Cagney
2002-03-26 10:14 ` Daniel Jacobowitz
2002-03-26 10:27 ` Michal Ludvig
2002-03-26 10:35 ` Daniel Jacobowitz
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=3CA0B6C0.6090601@cygnus.com \
--to=ac131313@cygnus.com \
--cc=gdb-patches@sources.redhat.com \
--cc=mludvig@suse.cz \
/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