From: Luis Machado <luis.machado@arm.com>
To: Enze Li <enze.li@hotmail.com>, gdb-patches@sourceware.org
Cc: enze.li@gmx.com, John Baldwin <jhb@FreeBSD.org>
Subject: Re: [PATCH] gdb/hurd: pass memory_tagged as false to find_memory_region_ftype
Date: Fri, 22 Jul 2022 15:47:02 +0100 [thread overview]
Message-ID: <22c54360-74e2-b4e3-27df-aef5cbfa559d@arm.com> (raw)
In-Reply-To: <OS3P286MB21528F640FC765F7EB97D7A3F0909@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM>
Hi,
On 7/22/22 15:11, Enze Li via Gdb-patches wrote:
> I tried building GDB on GNU/Hurd, and ran into this error:
>
> CXX gnu-nat.o
> gnu-nat.c: In member function ‘virtual int gnu_nat_target::find_memory_regions(find_memory_region_ftype, void*)’:
> gnu-nat.c:2620:21: error: too few arguments to function
> 2620 | (*func) (last_region_address,
> | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
> 2621 | last_region_end - last_region_address,
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2622 | last_protection & VM_PROT_READ,
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2623 | last_protection & VM_PROT_WRITE,
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2624 | last_protection & VM_PROT_EXECUTE,
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2625 | 1, /* MODIFIED is unknown, pass it as true. */
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2626 | data);
> | ~~~~~
> gnu-nat.c:2635:13: error: too few arguments to function
> 2635 | (*func) (last_region_address, last_region_end - last_region_address,
> | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2636 | last_protection & VM_PROT_READ,
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2637 | last_protection & VM_PROT_WRITE,
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2638 | last_protection & VM_PROT_EXECUTE,
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2639 | 1, /* MODIFIED is unknown, pass it as true. */
> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 2640 | data);
> | ~~~~~
> make[2]: *** [Makefile:1926: gnu-nat.o] Error 1
>
> This is because in this commit:
>
> commit 68cffbbd4406b4efe1aa6e18460b1d7ca02549f1
> Date: Thu Mar 31 11:42:35 2022 +0100
>
> [AArch64] MTE corefile support
>
> Added a new argument to find_memory_region_ftype, but did not pass it to
> the function in gnu-nat.c. Fix this by passing memory_tagged as false.
>
> Tested by rebuilding on GNU/Hurd.
> ---
> gdb/gnu-nat.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
> index 72314824278..5dd4d148c76 100644
> --- a/gdb/gnu-nat.c
> +++ b/gdb/gnu-nat.c
> @@ -2623,6 +2623,7 @@ gnu_nat_target::find_memory_regions (find_memory_region_ftype func,
> last_protection & VM_PROT_WRITE,
> last_protection & VM_PROT_EXECUTE,
> 1, /* MODIFIED is unknown, pass it as true. */
> + false, /* No memory tags in the object file. */
> data);
> last_region_address = region_address;
> last_region_end = region_address += region_length;
> @@ -2637,6 +2638,7 @@ gnu_nat_target::find_memory_regions (find_memory_region_ftype func,
> last_protection & VM_PROT_WRITE,
> last_protection & VM_PROT_EXECUTE,
> 1, /* MODIFIED is unknown, pass it as true. */
> + false, /* No memory tags in the object file. */
> data);
>
> return 0;
Sorry for the breakage. I should have spotted those invocations.
fbsd-nat.c and netbsd-nat.c will require similar fixes I suppose.
It would be nice to use this opportunity to add hurd/fbsd/netbsd builders to the sourceware buildbot so these issues show up earlier, potentially before a commit.
next prev parent reply other threads:[~2022-07-22 14:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 14:11 Enze Li
2022-07-22 14:47 ` Luis Machado [this message]
2022-07-24 3:59 ` Enze Li
2022-07-24 3:40 ` [PATCH v2] " Enze Li
2022-07-25 7:39 ` Luis Machado
2022-07-25 15:55 ` John Baldwin
2022-07-26 12:35 ` Enze Li
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=22c54360-74e2-b4e3-27df-aef5cbfa559d@arm.com \
--to=luis.machado@arm.com \
--cc=enze.li@gmx.com \
--cc=enze.li@hotmail.com \
--cc=gdb-patches@sourceware.org \
--cc=jhb@FreeBSD.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).