public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Change all E_MIPS_* to EF_MIPS_*
@ 2023-11-14  9:45 Ying Huang
  2023-11-14  9:45 ` [PATCH 1/2] gdb: mips: Change " Ying Huang
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ying Huang @ 2023-11-14  9:45 UTC (permalink / raw)
  To: gdb-patches; +Cc: yunqiang.su

According to we have changed all E_MIPS_* to EF_MIPS_* in binutils
and glibc, we also need to change it here to keep same style.
We can refer to this commit record:
https://sourceware.org/pipermail/binutils/2023-October/129904.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/2] gdb: mips: Change E_MIPS_* to EF_MIPS_*
  2023-11-14  9:45 [PATCH 0/2] Change all E_MIPS_* to EF_MIPS_* Ying Huang
@ 2023-11-14  9:45 ` Ying Huang
  2023-11-14  9:45 ` [PATCH 2/2] sim: " Ying Huang
  2023-11-14 11:43 ` [PATCH 0/2] Change all " Pedro Alves
  2 siblings, 0 replies; 6+ messages in thread
From: Ying Huang @ 2023-11-14  9:45 UTC (permalink / raw)
  To: gdb-patches; +Cc: yunqiang.su, Ying Huang

From: Ying Huang <ying.huang@oss.cipunited.com>

---
 gdb/mips-tdep.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index d40d28e85de..066c7c80669 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -8109,16 +8109,16 @@ mips_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Check ELF_FLAGS to see if it specifies the ABI being used.  */
   switch ((elf_flags & EF_MIPS_ABI))
     {
-    case E_MIPS_ABI_O32:
+    case EF_MIPS_ABI_O32:
       found_abi = MIPS_ABI_O32;
       break;
-    case E_MIPS_ABI_O64:
+    case EF_MIPS_ABI_O64:
       found_abi = MIPS_ABI_O64;
       break;
-    case E_MIPS_ABI_EABI32:
+    case EF_MIPS_ABI_EABI32:
       found_abi = MIPS_ABI_EABI32;
       break;
-    case E_MIPS_ABI_EABI64:
+    case EF_MIPS_ABI_EABI64:
       found_abi = MIPS_ABI_EABI64;
       break;
     default:
@@ -8924,16 +8924,16 @@ mips_dump_tdep (struct gdbarch *gdbarch, struct ui_file *file)
       /* Determine the ISA.  */
       switch (tdep->elf_flags & EF_MIPS_ARCH)
 	{
-	case E_MIPS_ARCH_1:
+	case EF_MIPS_ARCH_1:
 	  ef_mips_arch = 1;
 	  break;
-	case E_MIPS_ARCH_2:
+	case EF_MIPS_ARCH_2:
 	  ef_mips_arch = 2;
 	  break;
-	case E_MIPS_ARCH_3:
+	case EF_MIPS_ARCH_3:
 	  ef_mips_arch = 3;
 	  break;
-	case E_MIPS_ARCH_4:
+	case EF_MIPS_ARCH_4:
 	  ef_mips_arch = 4;
 	  break;
 	default:
-- 
2.30.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/2] sim: mips: Change E_MIPS_* to EF_MIPS_*
  2023-11-14  9:45 [PATCH 0/2] Change all E_MIPS_* to EF_MIPS_* Ying Huang
  2023-11-14  9:45 ` [PATCH 1/2] gdb: mips: Change " Ying Huang
@ 2023-11-14  9:45 ` Ying Huang
  2023-11-14 11:43 ` [PATCH 0/2] Change all " Pedro Alves
  2 siblings, 0 replies; 6+ messages in thread
From: Ying Huang @ 2023-11-14  9:45 UTC (permalink / raw)
  To: gdb-patches; +Cc: yunqiang.su, Ying Huang

From: Ying Huang <ying.huang@oss.cipunited.com>

---
 sim/mips/interp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index e521963a902..f0c509021a4 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -1557,8 +1557,8 @@ store_word (SIM_DESC sd,
 }
 
 #define MIPSR6_P(abfd) \
-  ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32R6 \
-    || (elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_64R6)
+  ((elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == EF_MIPS_ARCH_32R6 \
+    || (elf_elfheader (abfd)->e_flags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6)
 
 /* Load a word from memory.  */
 
-- 
2.30.2

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Change all E_MIPS_* to EF_MIPS_*
  2023-11-14  9:45 [PATCH 0/2] Change all E_MIPS_* to EF_MIPS_* Ying Huang
  2023-11-14  9:45 ` [PATCH 1/2] gdb: mips: Change " Ying Huang
  2023-11-14  9:45 ` [PATCH 2/2] sim: " Ying Huang
@ 2023-11-14 11:43 ` Pedro Alves
  2023-11-15  2:19   ` Ying Huang
  2023-11-16  2:25   ` YunQiang Su
  2 siblings, 2 replies; 6+ messages in thread
From: Pedro Alves @ 2023-11-14 11:43 UTC (permalink / raw)
  To: Ying Huang, gdb-patches; +Cc: yunqiang.su

On 2023-11-14 09:45, Ying Huang wrote:
> According to we have changed all E_MIPS_* to EF_MIPS_* in binutils
> and glibc, we also need to change it here to keep same style.
> We can refer to this commit record:
> https://sourceware.org/pipermail/binutils/2023-October/129904.html

This is OK, but please put this information in the commit logs themselves, so that
if someone in the future needs to "git blame" the touched lines isn't left with
an empty rationale for the change.

So, you can add my:

 Approved-By: Pedro Alves <pedro@palves.net>

with that change.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Change all E_MIPS_* to EF_MIPS_*
  2023-11-14 11:43 ` [PATCH 0/2] Change all " Pedro Alves
@ 2023-11-15  2:19   ` Ying Huang
  2023-11-16  2:25   ` YunQiang Su
  1 sibling, 0 replies; 6+ messages in thread
From: Ying Huang @ 2023-11-15  2:19 UTC (permalink / raw)
  To: Pedro Alves, gdb-patches; +Cc: yunqiang.su

Hi Pedro,

在 2023/11/14 19:43, Pedro Alves 写道:
> On 2023-11-14 09:45, Ying Huang wrote:
>> According to we have changed all E_MIPS_* to EF_MIPS_* in binutils
>> and glibc, we also need to change it here to keep same style.
>> We can refer to this commit record:
>> https://sourceware.org/pipermail/binutils/2023-October/129904.html
> This is OK, but please put this information in the commit logs themselves, so that
> if someone in the future needs to "git blame" the touched lines isn't left with
> an empty rationale for the change.
>
> So, you can add my:
>
>  Approved-By: Pedro Alves <pedro@palves.net>
>
> with that change.
>
OK, I would send patch V2 with commit message.

Thanks,

Ying

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/2] Change all E_MIPS_* to EF_MIPS_*
  2023-11-14 11:43 ` [PATCH 0/2] Change all " Pedro Alves
  2023-11-15  2:19   ` Ying Huang
@ 2023-11-16  2:25   ` YunQiang Su
  1 sibling, 0 replies; 6+ messages in thread
From: YunQiang Su @ 2023-11-16  2:25 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Ying Huang, gdb-patches

On Tue, Nov 14, 2023 at 11:43:27AM +0000, Pedro Alves wrote:
> On 2023-11-14 09:45, Ying Huang wrote:
> > According to we have changed all E_MIPS_* to EF_MIPS_* in binutils
> > and glibc, we also need to change it here to keep same style.
> > We can refer to this commit record:
> > https://sourceware.org/pipermail/binutils/2023-October/129904.html
> 
> This is OK, but please put this information in the commit logs themselves, so that
> if someone in the future needs to "git blame" the touched lines isn't left with
> an empty rationale for the change.
> 
> So, you can add my:
> 
>  Approved-By: Pedro Alves <pedro@palves.net>
> 
> with that change.
>

Thank you. I have pushed Ying's v2 patchset.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-16  2:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-14  9:45 [PATCH 0/2] Change all E_MIPS_* to EF_MIPS_* Ying Huang
2023-11-14  9:45 ` [PATCH 1/2] gdb: mips: Change " Ying Huang
2023-11-14  9:45 ` [PATCH 2/2] sim: " Ying Huang
2023-11-14 11:43 ` [PATCH 0/2] Change all " Pedro Alves
2023-11-15  2:19   ` Ying Huang
2023-11-16  2:25   ` YunQiang Su

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).