From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: Hui Zhu <teawater@gmail.com>
Subject: Re: [Prec/RFA] Remove macros for record size in i386-linux-tdep.c
Date: Sat, 23 May 2009 13:47:00 -0000 [thread overview]
Message-ID: <200905231447.45945.pedro@codesourcery.com> (raw)
In-Reply-To: <daef60380905230512l7c06eff5h47193165edbe2be7@mail.gmail.com>
A Saturday 23 May 2009 13:12:54, Hui Zhu escreveu:
> On Sat, May 23, 2009 at 19:59, Hui Zhu <teawater@gmail.com> wrote:
> > On Sat, May 23, 2009 at 19:12, Pedro Alves <pedro@codesourcery.com> wrote:
> >> On Saturday 23 May 2009 05:00:22, Hui Zhu wrote:
> >>> 2009-05-23 Hui Zhu <teawater@gmail.com>
> >>>
> >>> * i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
> >>> I386_LINUX_RECORD_IOCTL_*,
> >>> I386_LINUX_RECORD_FCNTL_*) Removed.
> >>> (i386_linux_init_abi): Change size of record from macros to
> >>> numbers.
> >>
> >> Okay.
> >>
> >>> * i386-linux-tdep.c (i386_linux_init_abi): Change
> >>> i386_linux_record_tdep.size_char from 8 to 1.
> >>
> >> You didn't mention this, so I take it it was going to be a separate patch.
> >> Why do you need size_char at all? size of char is always 1 by definition.
> >> Does the kernel define this as variable somewhere also?
> >
> > OK. I make a new patch remove it.
> > Please help me review it.
> >
> > Thanks,
> > Hui
> >
> > 2009-05-23 Hui Zhu <teawater@gmail.com>
> >
> > * i386-linux-tdep.c (I386_LINUX_RECORD_SIZE_*,
> > I386_LINUX_RECORD_IOCTL_*,
> > I386_LINUX_RECORD_FCNTL_*) Removed.
> > (i386_linux_init_abi): Change size of record from macros to
> > numbers.
> >
> > * i386-linux-tdep.c (i386_linux_init_abi): Remove size_char.
> > * linux-record.c (record_linux_system_call): Ditto.
> > * linux-record.h (linux_record_tdep): Ditto.
This is OK, although the changelog wants to record different unrelated
changes: either commit this in two parts, or merge the (i386_linux_init_abi)
entries.
> About char part. I am not very sure about it. This is from gdb:
> /* Number of bits in a char or unsigned char for the target machine.
> Just like CHAR_BIT in <limits.h> but describes the target machine. */
> #if !defined (TARGET_CHAR_BIT)
> #define TARGET_CHAR_BIT 8
> #endif
>
> So, maybe we can keep it.
No, this is bits in char, while size_char wants bytes per char,
which is always 1. Even if we were to make GDB behave
for TARGET_CHAR_BIT != 8, linux-record would not be the place to
store that info.
--
Pedro Alves
next prev parent reply other threads:[~2009-05-23 13:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-23 4:00 Hui Zhu
2009-05-23 11:12 ` Pedro Alves
2009-05-23 11:59 ` Hui Zhu
2009-05-23 12:13 ` Hui Zhu
2009-05-23 13:47 ` Pedro Alves [this message]
2009-05-23 17:13 ` Hui Zhu
2009-05-23 17:27 ` Pedro Alves
2009-05-24 4:48 ` Hui Zhu
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=200905231447.45945.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=teawater@gmail.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