Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Shahab Vahedi via Gdb-patches <gdb-patches@sourceware.org>
To: Simon Marchi <simark@simark.ca>
Cc: Anton Kolesov <Anton.Kolesov@synopsys.com>,
	Shahab Vahedi <shahab@synopsys.com>,
	gdb-patches@sourceware.org,
	Francois Bedard <fbedard@synopsys.com>
Subject: Re: [PATCH] arc: Add support for Linux coredump files
Date: Thu, 1 Oct 2020 15:30:42 +0200	[thread overview]
Message-ID: <20201001133042.GE4717@gmail.com> (raw)
In-Reply-To: <18b98a56-e3cf-e05b-49a7-bd6e1f61aefb@simark.ca>

Hi Simon,

On Wed, Sep 16, 2020 at 04:21:43PM -0400, Simon Marchi wrote:
> On 2020-08-27 7:27 a.m., Shahab Vahedi via Gdb-patches wrote:
> > +void
> > +arc_linux_supply_gregset (const struct regset *regset,
> > +			  struct regcache *regcache,
> > +			  int regnum, const void *gregs, size_t size)
> > +{
> > +  gdb_static_assert (ARC_LAST_REGNUM
> > +		     <= ARRAY_SIZE (arc_linux_core_reg_offsets));
> 
> Can you explain why this is <= and not < ?  I'm not saying it's wrong,
> but it looks unusual.  If ARC_LAST_REGNUM was 2 (meaning there are 3
> registers: 0, 1 and 2), then having an offsets array with size 2 would
> be bad, would it?  Or maybe I'm just confused.

You're absolutely right! Not only this question made me fix the assert
here, but also to revisit it everywhere. In the end, it resulted in
finding a "for loop" that was not looping the whole data set. All have
been mentioned/fixed in the next patch v2 [1].


[1] [PATCH v2] arc: Add support for Linux coredump files
https://sourceware.org/pipermail/gdb-patches/2020-September/172199.html


Cheers,
Shahab

  parent reply	other threads:[~2020-10-01 13:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-27 11:27 Shahab Vahedi
2020-09-07  9:14 ` Shahab Vahedi
2020-09-16  2:31 ` [PING^2][PATCH] " Shahab Vahedi
2020-09-16 20:21 ` [PATCH] " Simon Marchi
2020-09-17 11:55   ` Aktemur, Tankut Baris
2020-09-28 13:47     ` Shahab Vahedi via Gdb-patches
2020-09-28 14:08       ` Aktemur, Tankut Baris via Gdb-patches
2020-09-28 19:10         ` Simon Marchi
2020-09-29  8:24           ` Shahab Vahedi via Gdb-patches
2020-09-29  9:02             ` Shahab Vahedi via Gdb-patches
2020-09-29 14:22             ` Simon Marchi
2020-09-29 15:42               ` Shahab Vahedi via Gdb-patches
2020-10-01 13:30   ` Shahab Vahedi via Gdb-patches [this message]
2020-09-29 16:15 ` [PATCH v2] " Shahab Vahedi via Gdb-patches
2020-10-05  2:13   ` Simon Marchi
2020-10-07 16:11 ` [PUSHED master] " Shahab Vahedi via Gdb-patches
2020-10-07 16:32 ` [PUSHED gdb-10-branch] " Shahab Vahedi via Gdb-patches

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=20201001133042.GE4717@gmail.com \
    --to=gdb-patches@sourceware.org \
    --cc=Anton.Kolesov@synopsys.com \
    --cc=fbedard@synopsys.com \
    --cc=shahab.vahedi@gmail.com \
    --cc=shahab@synopsys.com \
    --cc=simark@simark.ca \
    /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