Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: bitpos expansion patches summary
Date: Mon, 27 Aug 2012 08:10:00 -0000	[thread overview]
Message-ID: <20120827133927.2356a430@spoyarek> (raw)
In-Reply-To: <20120826174335.GA23917@host2.jankratochvil.net>

On Sun, 26 Aug 2012 19:43:35 +0200, Jan wrote:
> (i386-nat.c:613):
> FUNC(i386_length_and_rw_bits):	(LONGEST to int)	[len]
>  - To be re-checked with updated watchpoints patch.

This is safe, since ok_for_watchpoint will restrict the incoming LEN in
insert_watchpoint.

> WPREVERTED(Likewise): (i386-nat.c:647):
> FUNC(i386_length_and_rw_bits):	(LONGEST to int)	[len]
>  - To be re-checked with updated watchpoints patch.

Likewise for remove_watchpoint.

> SAFE:
> (ia64-tdep.c:3299):	VARINIT(n):	(ULONGEST to
> int)	[(type)->length / (float_elt_type)->length]
>  - You did expand n in ia64_extract_return_value, it can be array of
> floats. I did not investigate what happens if the array of floats is
> too large and it does not fit into ia64 registers.  But I find safe
> to just expand it.

OK, I misread the HFA definition as an array/struct that *only* has a
float. I think I confused this with some other function that has this
definition.

> REVERTED(siginfo type should fit into
> size_t): (infrun.c:6677):	FUNC(xmalloc):	(ULONGEST to
> size_t)	[len]
>  - I agree. So why have you changed 'size_t->ULONGEST len =
> TYPE_LENGTH (type);' ? That change should be therefore reverted.

Right, will revert.

> FIXED(Expand param for get_frame_register_bytes):
> (m68k-tdep.c:225):	FUNC(get_frame_register_bytes):
> (ULONGEST to int)	[(type)->length]
>  - I am not against expanding LEN of get_frame_register_bytes, it has
> no use but it is a good sanity check instead of checking all the
> callers. But in this case BTW it is not needed, only TYPE_CODE_FLT
> can be passed to get_frame_register_bytes, TYPE_CODE_FLT is always
> small enough.

Yes, you had suggested this expansion as a sanity check in an earlier
review.

> FIXED(Expand to size_t)|ENSURED_SIZET: (m88k-tdep.c:311):
> VARINIT(len):	(ULONGEST to int)	[(type)->length]
>  - ENSURED_SIZET is redundant, there is above already:
>    const bfd_byte *valbuf = value_contents (args[i]);

Yes, all of the ENSURED_SIZET for -tdep have been removed for similar
reasons.

> SAFE:
> (mdebugread.c:1238):	ASSIGN:	(bfd_vma to
> LONGEST)	[ ((*f).loc.bitpos) = (sh->value)]
>  - Not so clear to me, --disable-64-bit-bfd cannot support >=2GB
> inferiors but it should support >256MB structs.  Still when it also
> affects only STABS I do not think it needs a fix.

Either ways, the point is that sizeof (bfd_vma) would always be less or
equal to than sizeof (LONGEST) and hence this ought to be safe.

Regards,
Siddhesh


  reply	other threads:[~2012-08-27  8:10 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-04 19:24 Siddhesh Poyarekar
2012-08-07 14:39 ` Jan Kratochvil
2012-08-07 15:10   ` Siddhesh Poyarekar
2012-08-07 15:48   ` Siddhesh Poyarekar
2012-08-08 22:43 ` Jan Kratochvil
2012-08-08 22:50   ` Jan Kratochvil
2012-08-09  2:04   ` Siddhesh Poyarekar
2012-08-10  1:28   ` Siddhesh Poyarekar
2012-08-17  9:35     ` Siddhesh Poyarekar
2012-08-09 20:04 ` Jan Kratochvil
2012-08-10  1:44   ` Siddhesh Poyarekar
2012-08-10  7:51     ` Jan Kratochvil
2012-08-10  7:58       ` Siddhesh Poyarekar
2012-08-12 17:57 ` Jan Kratochvil
2012-08-13  2:52   ` Siddhesh Poyarekar
2012-08-13 13:49     ` Jan Kratochvil
2012-08-13 14:04       ` Siddhesh Poyarekar
2012-08-13 14:12         ` Jan Kratochvil
2012-08-13 14:24           ` Siddhesh Poyarekar
2012-08-17  9:35           ` [PATCH 4/3] bitpos: Expand parameters of watchpoint functions Siddhesh Poyarekar
2012-08-19 16:42 ` bitpos expansion patches summary Jan Kratochvil
2012-08-21  6:51   ` Siddhesh Poyarekar
2012-08-26 18:21 ` Jan Kratochvil
2012-08-27  8:10   ` Siddhesh Poyarekar [this message]
2012-08-27 14:02     ` Jan Kratochvil
2012-09-02 18:15 ` Jan Kratochvil
2012-09-07 10:52   ` Siddhesh Poyarekar
2012-09-11 19:04     ` Jan Kratochvil
2012-09-11 19:26       ` Tom Tromey
2012-09-11 19:37         ` Jan Kratochvil
2012-09-13 18:45       ` Jan Kratochvil
2012-09-13 16:48     ` Jan Kratochvil
2012-09-14  6:20       ` Siddhesh Poyarekar
2012-09-04 15:03 ` Jan Kratochvil
2012-09-04 15:09   ` Siddhesh Poyarekar
2012-09-07 11:10   ` Siddhesh Poyarekar

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=20120827133927.2356a430@spoyarek \
    --to=siddhesh@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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