From: Andrew Burgess <aburgess@redhat.com>
To: Simon Marchi <simark@simark.ca>, gdb-patches@sourceware.org
Cc: hjl.tools@gmail.com
Subject: Re: [PATCHv3 0/8] x86/Linux Target Description Changes
Date: Tue, 26 Mar 2024 12:15:59 +0000 [thread overview]
Message-ID: <87a5ml5gu8.fsf@redhat.com> (raw)
In-Reply-To: <413a66aa-e035-41cf-9af4-040685f89204@simark.ca>
Simon Marchi <simark@simark.ca> writes:
> On 3/25/24 13:20, Andrew Burgess wrote:
>> Andrew Burgess <aburgess@redhat.com> writes:
>>
>>> In v3:
>>>
>>> - Rebased. Nasty merge conflict with 4bb20a6244b7091 which I think
>>> I've resolved, but am unable to test. Reposting so the author of
>>> that other commit can validate.
>>>
>>> - Initial testing looks good. Full tests are still running.
>>
>> Testing completed with no issues. H.J. Lu confirmed that this versions
>> didn't break the x32 behaviour. I've gone ahead and pushed these
>> patches.
>>
>> If anything crops up then do let me know.
>>
>> Thanks,
>> Andrew
>>
>
> Hi Andrew,
>
> I think your series introduces some build failures with Clang. One is
> easy, it's a missing `-x c++` in gdbserver/Makefile.in.
Thanks for fixing this one.
>
> The other is:
>
> CXX nat/x86-linux-tdesc-ipa.o
> /home/smarchi/src/binutils-gdb/gdbserver/../gdb/nat/x86-linux-tdesc.c:167:1: error: unused function 'x86_linux_i386_tdesc_feature_mask' [-Werror,-Wunused-function]
> 167 | x86_linux_i386_tdesc_feature_mask ()
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> It's possible that this function just needs to be moved in the same
> "#ifdef" as where it's used, but since I didn't follow your work
> closely, I prefer to let you fix it, in case I'm missing something.
Sorry for the breakage.
I pushed the patch below to resolve this issue.
Thanks,
Andrew
--
commit f4c19f89ef43dbce8065532c808e1aeb05d08994
Author: Andrew Burgess <aburgess@redhat.com>
Date: Tue Mar 26 12:09:27 2024 +0000
gdb/gdbserver: fix some defined but unused function warnings
This commit:
commit 198ff6ff819c240545f9fc68b39636fd376d4ba9
Date: Tue Jan 30 15:37:23 2024 +0000
gdb/gdbserver: share x86/linux tdesc caching
added some functions which are always defined, but their use is
guarded within various #ifdef blocks. As a result we were seeing
errors about defined, but unused, functions.
I've fixed this problem in this commit by wrapping the function
definitions within #ifdef blocks.
I'm a little worried that there might be too many #ifdef blocks within
this file, however, I'm going to commit this fix for now as this will
fix the build, then I'll think about if there's a better way to split
this file so we might avoid some of these #ifdef blocks.
diff --git a/gdb/nat/x86-linux-tdesc.c b/gdb/nat/x86-linux-tdesc.c
index c438dfae84f..8a02f77fa6a 100644
--- a/gdb/nat/x86-linux-tdesc.c
+++ b/gdb/nat/x86-linux-tdesc.c
@@ -160,6 +160,8 @@ static constexpr x86_tdesc_feature x86_linux_all_tdesc_features[] = {
{ X86_XSTATE_X87, true, false, false }
};
+#if defined __i386__ || !defined IN_PROCESS_AGENT
+
/* Return a compile time constant which is a mask of all the cpu features
that are checked for when building an i386 target description. */
@@ -175,6 +177,10 @@ x86_linux_i386_tdesc_feature_mask ()
return mask;
}
+#endif /* __i386__ || !IN_PROCESS_AGENT */
+
+#ifdef __x86_64__
+
/* Return a compile time constant which is a mask of all the cpu features
that are checked for when building an amd64 target description. */
@@ -205,6 +211,8 @@ x86_linux_x32_tdesc_feature_mask ()
return mask;
}
+#endif /* __x86_64__ */
+
/* Return a compile time constant which is a count of the number of cpu
features that are checked for when building an i386 target description. */
@@ -222,6 +230,8 @@ x86_linux_i386_tdesc_count ()
return (1 << count);
}
+#if defined __x86_64__ || defined IN_PROCESS_AGENT
+
/* Return a compile time constant which is a count of the number of cpu
features that are checked for when building an amd64 target description. */
@@ -256,6 +266,8 @@ x86_linux_x32_tdesc_count ()
return (1 << count);
}
+#endif /* __x86_64__ || IN_PROCESS_AGENT */
+
#ifdef IN_PROCESS_AGENT
/* See linux-x86-tdesc.h. */
next prev parent reply other threads:[~2024-03-26 12:16 UTC|newest]
Thread overview: 116+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 15:28 [PATCH 0/7] " Andrew Burgess
2024-02-01 15:28 ` [PATCH 1/7] gdbserver: convert have_ptrace_getregset to a tribool Andrew Burgess
2024-02-01 15:28 ` [PATCH 2/7] gdb/x86: move reading of cs and ds state into gdb/nat directory Andrew Burgess
2024-02-01 15:28 ` [PATCH 3/7] gdbserver/x86: move no-xml code earlier in x86_linux_read_description Andrew Burgess
2024-02-01 15:28 ` [PATCH 4/7] gdb/gdbserver: share I386_LINUX_XSAVE_XCR0_OFFSET definition Andrew Burgess
2024-02-01 15:28 ` [PATCH 5/7] gdb/gdbserver: share some code relating to target description creation Andrew Burgess
2024-02-01 15:28 ` [PATCH 6/7] gdbserver: update target description creation for x86/linux Andrew Burgess
2024-02-01 15:28 ` [PATCH 7/7] gdb/gdbserver: share x86/linux tdesc caching Andrew Burgess
2024-03-05 17:00 ` [PATCHv2 0/7] x86/Linux Target Description Changes Andrew Burgess
2024-03-05 17:00 ` [PATCHv2 1/7] gdbserver: convert have_ptrace_getregset to a tribool Andrew Burgess
2024-03-05 17:00 ` [PATCHv2 2/7] gdb/x86: move reading of cs and ds state into gdb/nat directory Andrew Burgess
2024-03-05 17:00 ` [PATCHv2 3/7] gdbserver/x86: move no-xml code earlier in x86_linux_read_description Andrew Burgess
2024-03-05 17:00 ` [PATCHv2 4/7] gdb/gdbserver: share I386_LINUX_XSAVE_XCR0_OFFSET definition Andrew Burgess
2024-03-05 17:00 ` [PATCHv2 5/7] gdb/gdbserver: share some code relating to target description creation Andrew Burgess
2024-03-05 17:00 ` [PATCHv2 6/7] gdbserver: update target description creation for x86/linux Andrew Burgess
2024-03-19 16:01 ` John Baldwin
2024-03-19 18:34 ` Andrew Burgess
2024-03-21 17:28 ` John Baldwin
2024-03-26 10:01 ` Luis Machado
2024-03-26 15:31 ` Tom Tromey
2024-03-05 17:00 ` [PATCHv2 7/7] gdb/gdbserver: share x86/linux tdesc caching Andrew Burgess
2024-03-19 16:05 ` [PATCHv2 0/7] x86/Linux Target Description Changes John Baldwin
2024-03-23 16:35 ` [PATCHv3 0/8] " Andrew Burgess
2024-03-23 16:35 ` [PATCHv3 1/8] gdbserver: convert have_ptrace_getregset to a tribool Andrew Burgess
2024-03-23 16:35 ` [PATCHv3 2/8] gdb/x86: move reading of cs and ds state into gdb/nat directory Andrew Burgess
2024-03-23 16:35 ` [PATCHv3 3/8] gdbserver/x86: move no-xml code earlier in x86_linux_read_description Andrew Burgess
2024-03-23 16:35 ` [PATCHv3 4/8] gdb/gdbserver: share I386_LINUX_XSAVE_XCR0_OFFSET definition Andrew Burgess
2024-03-23 16:35 ` [PATCHv3 5/8] gdb/gdbserver: share some code relating to target description creation Andrew Burgess
2024-03-23 16:35 ` [PATCHv3 6/8] gdb/arch: assert that X86_XSTATE_MPX is not set for x32 Andrew Burgess
2024-03-23 16:35 ` [PATCHv3 7/8] gdbserver: update target description creation for x86/linux Andrew Burgess
2024-03-23 16:35 ` [PATCHv3 8/8] gdb/gdbserver: share x86/linux tdesc caching Andrew Burgess
2024-03-26 12:17 ` Andrew Burgess
2024-03-25 17:20 ` [PATCHv3 0/8] x86/Linux Target Description Changes Andrew Burgess
2024-03-25 18:26 ` Simon Marchi
2024-03-26 12:15 ` Andrew Burgess [this message]
2024-03-26 13:51 ` H.J. Lu
2024-03-26 14:16 ` H.J. Lu
2024-03-26 16:36 ` Andrew Burgess
2024-03-26 19:03 ` Andrew Burgess
2024-04-05 12:33 ` [PATCHv4 00/10] " Andrew Burgess
2024-04-05 12:33 ` [PATCHv4 01/10] gdbserver/ipa/x86: remove unneeded declarations Andrew Burgess
2024-04-05 12:33 ` [PATCHv4 02/10] gdbserver: convert have_ptrace_getregset to a tribool Andrew Burgess
2024-04-05 12:33 ` [PATCHv4 03/10] gdb/x86: move reading of cs and ds state into gdb/nat directory Andrew Burgess
2024-04-05 12:33 ` [PATCHv4 04/10] gdbserver/x86: move no-xml code earlier in x86_linux_read_description Andrew Burgess
2024-04-05 12:33 ` [PATCHv4 05/10] gdb/gdbserver: share I386_LINUX_XSAVE_XCR0_OFFSET definition Andrew Burgess
2024-04-05 12:33 ` [PATCHv4 06/10] gdb/gdbserver: share some code relating to target description creation Andrew Burgess
2024-04-05 12:33 ` [PATCHv4 07/10] gdb/arch: assert that X86_XSTATE_MPX is not set for x32 Andrew Burgess
2024-04-05 12:33 ` [PATCHv4 08/10] gdbserver: update target description creation for x86/linux Andrew Burgess
2024-04-05 12:33 ` [PATCHv4 09/10] gdb: move xcr0 == 0 check into i386_linux_core_read_description Andrew Burgess
2024-04-05 12:33 ` [PATCHv4 10/10] gdb/gdbserver: share x86/linux tdesc caching Andrew Burgess
2024-04-09 18:37 ` [PATCHv4 00/10] x86/Linux Target Description Changes John Baldwin
2024-04-25 13:35 ` Willgerodt, Felix
2024-04-25 16:06 ` Andrew Burgess
2024-04-26 15:01 ` [PATCHv5 00/11] " Andrew Burgess
2024-04-26 15:01 ` [PATCHv5 01/11] gdbserver/ipa/x86: remove unneeded declarations Andrew Burgess
2024-04-29 14:34 ` Willgerodt, Felix
2024-05-07 15:05 ` Andrew Burgess
2024-05-08 7:49 ` Willgerodt, Felix
2024-04-26 15:01 ` [PATCHv5 02/11] gdbserver: convert have_ptrace_getregset to a tribool Andrew Burgess
2024-04-29 14:34 ` Willgerodt, Felix
2024-05-07 15:28 ` Andrew Burgess
2024-04-26 15:01 ` [PATCHv5 03/11] gdb/x86: move reading of cs and ds state into gdb/nat directory Andrew Burgess
2024-04-29 14:34 ` Willgerodt, Felix
2024-04-26 15:01 ` [PATCHv5 04/11] gdb/x86: move have_ptrace_getfpxregs global " Andrew Burgess
2024-04-29 14:34 ` Willgerodt, Felix
2024-04-26 15:01 ` [PATCHv5 05/11] gdbserver/x86: move no-xml code earlier in x86_linux_read_description Andrew Burgess
2024-04-29 14:34 ` Willgerodt, Felix
2024-05-07 11:55 ` Luis Machado
2024-05-07 15:43 ` Andrew Burgess
2024-05-07 15:56 ` Luis Machado
2024-05-08 7:49 ` Willgerodt, Felix
2024-05-08 13:18 ` Andrew Burgess
2024-04-26 15:01 ` [PATCHv5 06/11] gdb/gdbserver: share I386_LINUX_XSAVE_XCR0_OFFSET definition Andrew Burgess
2024-04-29 14:34 ` Willgerodt, Felix
2024-04-26 15:01 ` [PATCHv5 07/11] gdb/gdbserver: share some code relating to target description creation Andrew Burgess
2024-04-29 14:34 ` Willgerodt, Felix
2024-05-07 11:40 ` Andrew Burgess
2024-04-26 15:01 ` [PATCHv5 08/11] gdb/arch: assert that X86_XSTATE_MPX is not set for x32 Andrew Burgess
2024-04-29 14:34 ` Willgerodt, Felix
2024-05-07 16:08 ` Andrew Burgess
2024-04-26 15:01 ` [PATCHv5 09/11] gdbserver: update target description creation for x86/linux Andrew Burgess
2024-04-29 14:35 ` Willgerodt, Felix
2024-05-07 14:24 ` Andrew Burgess
2024-05-08 7:47 ` Willgerodt, Felix
2024-05-08 13:28 ` Andrew Burgess
2024-04-26 15:01 ` [PATCHv5 10/11] gdb: move xcr0 == 0 check into i386_linux_core_read_description Andrew Burgess
2024-04-29 14:35 ` Willgerodt, Felix
2024-04-26 15:01 ` [PATCHv5 11/11] gdb/gdbserver: share x86/linux tdesc caching Andrew Burgess
2024-04-29 14:35 ` Willgerodt, Felix
2024-05-07 14:50 ` Andrew Burgess
2024-05-08 7:49 ` Willgerodt, Felix
2024-05-08 16:09 ` Andrew Burgess
2024-05-08 16:46 ` [PATCHv6 0/9] x86/Linux Target Description Changes Andrew Burgess
2024-05-08 16:46 ` [PATCHv6 1/9] gdb/gdbserver: share I386_LINUX_XSAVE_XCR0_OFFSET definition Andrew Burgess
2024-05-08 16:46 ` [PATCHv6 2/9] gdbserver/x86: move no-xml code earlier in x86_linux_read_description Andrew Burgess
2024-05-08 16:46 ` [PATCHv6 3/9] gdb/x86: move have_ptrace_getfpxregs global into gdb/nat directory Andrew Burgess
2024-05-08 22:52 ` John Baldwin
2024-05-08 16:46 ` [PATCHv6 4/9] gdb/x86: move have_ptrace_getregset " Andrew Burgess
2024-05-08 22:53 ` John Baldwin
2024-05-08 16:46 ` [PATCHv6 5/9] gdb/x86: move reading of cs and ds state " Andrew Burgess
2024-05-08 16:46 ` [PATCHv6 6/9] gdb: move xcr0 == 0 check into i386_linux_core_read_description Andrew Burgess
2024-05-08 22:54 ` John Baldwin
2024-05-08 16:46 ` [PATCHv6 7/9] gdb/gdbserver: share some code relating to target description creation Andrew Burgess
2024-05-08 22:58 ` John Baldwin
2024-05-08 16:46 ` [PATCHv6 8/9] gdbserver: update target description creation for x86/linux Andrew Burgess
2024-05-08 16:46 ` [PATCHv6 9/9] gdb/gdbserver: share x86/linux tdesc caching Andrew Burgess
2024-05-11 10:08 ` [PATCHv7 0/9] x86/Linux Target Description Changes Andrew Burgess
2024-05-11 10:08 ` [PATCHv7 1/9] gdb/gdbserver: share I386_LINUX_XSAVE_XCR0_OFFSET definition Andrew Burgess
2024-05-11 10:08 ` [PATCHv7 2/9] gdbserver/x86: move no-xml code earlier in x86_linux_read_description Andrew Burgess
2024-05-11 10:08 ` [PATCHv7 3/9] gdb/x86: move have_ptrace_getfpxregs global into gdb/nat directory Andrew Burgess
2024-05-11 10:08 ` [PATCHv7 4/9] gdb: move have_ptrace_getregset declaration " Andrew Burgess
2024-05-11 10:08 ` [PATCHv7 5/9] gdb/x86: move reading of cs and ds state " Andrew Burgess
2024-05-11 10:08 ` [PATCHv7 6/9] gdb: move xcr0 == 0 check into i386_linux_core_read_description Andrew Burgess
2024-05-11 10:08 ` [PATCHv7 7/9] gdb/gdbserver: share some code relating to target description creation Andrew Burgess
2024-05-11 10:08 ` [PATCHv7 8/9] gdbserver: update target description creation for x86/linux Andrew Burgess
2024-05-11 10:08 ` [PATCHv7 9/9] gdb/gdbserver: share x86/linux tdesc caching Andrew Burgess
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=87a5ml5gu8.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=hjl.tools@gmail.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