From: Sergei Trofimovich <slyfox@gentoo.org>
To: Simon Marchi <simark@simark.ca>
Cc: Kevin Buettner <kevinb@redhat.com>,
Sergei Trofimovich <siarheit@google.com>,
gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: fix IA64 build failure of linux-nat
Date: Mon, 17 Aug 2020 21:57:41 +0100 [thread overview]
Message-ID: <20200817215741.4f2a4be0@sf> (raw)
In-Reply-To: <ef867c85-2f1b-6521-1d61-9e81721c0067@simark.ca>
[-- Attachment #1: Type: text/plain, Size: 2470 bytes --]
On Sun, 16 Aug 2020 17:51:28 -0400
Simon Marchi <simark@simark.ca> wrote:
> On 2020-08-16 4:45 a.m., Sergei Trofimovich via Gdb-patches wrote:
> > On Tue, 19 May 2020 15:00:41 -0700
> > Kevin Buettner <kevinb@redhat.com> wrote:
> >
> >> On Tue, 19 May 2020 22:27:10 +0100
> >> Sergei Trofimovich via Gdb-patches <gdb-patches@sourceware.org> wrote:
> >>
> >>> From: Sergei Trofimovich <siarheit@google.com>
> >>>
> >>> On IA64 built failed as:
> >>>
> >>> ```
> >>> ia64-linux-nat.c:352:29: error: 'gdbarch_num_regs' was not declared in this scope
> >>> 352 | if (regno < 0 || regno >= gdbarch_num_regs (gdbarch))
> >>> | ^~~~~~~~~~~~~~~~
> >>> ```
> >>>
> >>> The fix includes "gdbarch.h" header where symbol is declared.
> >>>
> >>> * gdb/ia64-linux-nat.c: include "gdbarch.h" to declare used
> >>> 'gdbarch_num_regs'.
> >>
> >> Okay, but please capitalize "include" in the ChangeLog entry prior
> >> to pushing this change.
> >
> > Attached v2-* patch with capitalization changes.
> >
> > I don't have a 'gdb' write access yet (I think), but I do have GCC one.
> >
> > Should I request 'gdb' access as well as specified in
> > https://sourceware.org/cgi-bin/pdw/ps_form.cgi ?
>
> Yes, that would be useful if you plan on contributing regularly. If it's just
> a occasional patch, we can also push for you. As you wish.
Sounds good! Got write access granted.
> >
> > Thank you for the review!
>
> A few more styling nits:
>
> > diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> > index 9cc7e44cba7..8865e6949d6 100644
> > --- a/gdb/ChangeLog
> > +++ b/gdb/ChangeLog
> > @@ -4564,6 +4564,11 @@
> >
> > * sparc64-tdep.c (adi_tag_fd): Update call to target_fileio_open.
> >
> > +2020-05-19 Sergei Trofimovich <siarheit@google.com>
> > +
> > + * gdb/ia64-linux-nat.c: Include "gdbarch.h" to declare used
> > + 'gdbarch_num_regs'.
>
> The file path should be relative to the ChangeLog location, so here just "ia64-linux-nat.c".
>
> Also, make sure that your new entry is at the top of the file (here, it's at line 4564), and
> that you update the date to $TODAY when you push. For these reasons, most people don't include
> the ChangeLog bits in the patch directly, but just include it in the commit log (as you did).
> Of course, when pushing the patch, then you need to insert it in the ChangeLog file.
All makes sense! Attached v3-* patch with date and path in ChanegLog change.
--
Sergei
[-- Attachment #2: v3-0001-gdb-fix-IA64-build-failure-of-linux-nat.patch --]
[-- Type: text/x-patch, Size: 1466 bytes --]
From f9b11e6b1833a6dc06a0af03bcb6bd42d7a2f009 Mon Sep 17 00:00:00 2001
From: Sergei Trofimovich <siarheit@google.com>
Date: Tue, 19 May 2020 22:19:45 +0100
Subject: [PATCH v3] gdb: fix IA64 build failure of linux-nat
On IA64 built failed as:
```
ia64-linux-nat.c:352:29: error: 'gdbarch_num_regs' was not declared in this scope
352 | if (regno < 0 || regno >= gdbarch_num_regs (gdbarch))
| ^~~~~~~~~~~~~~~~
```
The fix includes "gdbarch.h" header where symbol is declared.
* ia64-linux-nat.c: Include "gdbarch.h" to declare used
'gdbarch_num_regs'.
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
---
gdb/ChangeLog | 5 +++++
gdb/ia64-linux-nat.c | 1 +
2 files changed, 6 insertions(+)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index b097b325a22..3f681e19e5a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2020-08-17 Sergei Trofimovich <siarheit@google.com>
+
+ * ia64-linux-nat.c: Include "gdbarch.h" to declare used
+ 'gdbarch_num_regs'.
+
2020-08-17 Tom Tromey <tromey@adacore.com>
* ada-varobj.c (ada_varobj_decode_var): Handle case where
diff --git a/gdb/ia64-linux-nat.c b/gdb/ia64-linux-nat.c
index 8f36ea78e76..b532e7a51c5 100644
--- a/gdb/ia64-linux-nat.c
+++ b/gdb/ia64-linux-nat.c
@@ -21,6 +21,7 @@
#include "defs.h"
#include "inferior.h"
#include "target.h"
+#include "gdbarch.h"
#include "gdbcore.h"
#include "regcache.h"
#include "ia64-tdep.h"
--
2.28.0
next prev parent reply other threads:[~2020-08-17 20:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-19 21:27 Sergei Trofimovich
2020-05-19 22:00 ` Kevin Buettner
2020-08-16 8:45 ` Sergei Trofimovich
2020-08-16 21:51 ` Simon Marchi
2020-08-17 8:54 ` Tom de Vries
2020-08-17 8:21 ` Simon Marchi
2020-08-17 18:59 ` Sergei Trofimovich
2020-08-18 8:46 ` Tom de Vries
2020-08-17 20:57 ` Sergei Trofimovich [this message]
2020-08-17 21:04 ` Simon Marchi
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=20200817215741.4f2a4be0@sf \
--to=slyfox@gentoo.org \
--cc=gdb-patches@sourceware.org \
--cc=kevinb@redhat.com \
--cc=siarheit@google.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