public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
@ 2022-05-03 11:19 Luis Machado
  2022-05-03 11:24 ` Pedro Alves
  2022-05-03 15:21 ` Tom Tromey
  0 siblings, 2 replies; 15+ messages in thread
From: Luis Machado @ 2022-05-03 11:19 UTC (permalink / raw)
  To: gdb-patches

Doing a 32-bit build with "--enable-targets=all --disable-sim" fails to link
properly.

--

loongarch-tdep.o: In function `loongarch_gdbarch_init':
binutils-gdb/gdb/loongarch-tdep.c:443: undefined reference to `loongarch_r_normal_name'
loongarch-tdep.o: In function `loongarch_fetch_instruction':
binutils-gdb/gdb/loongarch-tdep.c:37: undefined reference to `loongarch_insn_length'
loongarch-tdep.o: In function `loongarch_scan_prologue(gdbarch*, unsigned long long, unsigned long long, frame_info*, trad_frame_cache*) [clone .isra.4]':
binutils-gdb/gdb/loongarch-tdep.c:87: undefined reference to `loongarch_insn_length'
binutils-gdb/gdb/loongarch-tdep.c:88: undefined reference to `loongarch_decode_imm'
binutils-gdb/gdb/loongarch-tdep.c:89: undefined reference to `loongarch_decode_imm'
binutils-gdb/gdb/loongarch-tdep.c:90: undefined reference to `loongarch_decode_imm'
binutils-gdb/gdb/loongarch-tdep.c:91: undefined reference to `loongarch_decode_imm'
binutils-gdb/gdb/loongarch-tdep.c:92: undefined reference to `loongarch_decode_imm'

--

Given the list of 64-bit BFD files in
opcodes/Makefile.am:TARGET64_LIBOPCODES_CFILES, it looks like GDB's
ALL_TARGET_OBS list is including files that should be included in
ALL_64_TARGET_OBS instead.

This patch accomplishes this and enables a 32-bit build with
"--enable-targets=all --disable-sim" to complete.

Moving the bpf, tilegx and loongarch files to the correct list means GDB can
find the correct disassembler function instead of finding a null pointer.

We still need the "--disable-sim" switch (or "--enable-64-bit-bfd") to
make a 32-bit build with "--enable-targets=all" complete correctly
---
 gdb/Makefile.in | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 418094775a5..d80087749de 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -715,9 +715,12 @@ ALL_64_TARGET_OBS = \
 	arch/aarch64-mte-linux.o \
 	arch/amd64.o \
 	arch/riscv.o \
+	bpf-tdep.o \
 	ia64-linux-tdep.o \
 	ia64-tdep.o \
 	ia64-vms-tdep.o \
+	loongarch-linux-tdep.o \
+	loongarch-tdep.o \
 	mips-fbsd-tdep.o \
 	mips-linux-tdep.o \
 	mips-netbsd-tdep.o \
@@ -734,7 +737,10 @@ ALL_64_TARGET_OBS = \
 	sparc64-netbsd-tdep.o \
 	sparc64-obsd-tdep.o \
 	sparc64-sol2-tdep.o \
-	sparc64-tdep.o
+	sparc64-tdep.o \
+	tilegx-linux-tdep.o \
+	tilegx-tdep.o
+
 
 # All other target-dependent objects files (used with --enable-targets=all).
 ALL_TARGET_OBS = \
@@ -762,7 +768,6 @@ ALL_TARGET_OBS = \
 	avr-tdep.o \
 	bfin-linux-tdep.o \
 	bfin-tdep.o \
-	bpf-tdep.o \
 	bsd-uthread.o \
 	cris-linux-tdep.o \
 	cris-tdep.o \
@@ -798,8 +803,6 @@ ALL_TARGET_OBS = \
 	linux-record.o \
 	linux-tdep.o \
 	lm32-tdep.o \
-	loongarch-linux-tdep.o \
-	loongarch-tdep.o \
 	m32c-tdep.o \
 	m32r-linux-tdep.o \
 	m32r-tdep.o \
@@ -856,8 +859,6 @@ ALL_TARGET_OBS = \
 	symfile-mem.o \
 	tic6x-linux-tdep.o \
 	tic6x-tdep.o \
-	tilegx-linux-tdep.o \
-	tilegx-tdep.o \
 	v850-tdep.o \
 	vax-netbsd-tdep.o \
 	vax-tdep.o \
-- 
2.25.1


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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-03 11:19 [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS Luis Machado
@ 2022-05-03 11:24 ` Pedro Alves
  2022-05-03 11:30   ` Luis Machado
  2022-05-03 15:21 ` Tom Tromey
  1 sibling, 1 reply; 15+ messages in thread
From: Pedro Alves @ 2022-05-03 11:24 UTC (permalink / raw)
  To: Luis Machado, gdb-patches

On 2022-05-03 12:19, Luis Machado via Gdb-patches wrote:

> ---
>  gdb/Makefile.in | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
> index 418094775a5..d80087749de 100644
> --- a/gdb/Makefile.in
> +++ b/gdb/Makefile.in
> @@ -715,9 +715,12 @@ ALL_64_TARGET_OBS = \
>  	arch/aarch64-mte-linux.o \
>  	arch/amd64.o \
>  	arch/riscv.o \
> +	bpf-tdep.o \
>  	ia64-linux-tdep.o \
>  	ia64-tdep.o \
>  	ia64-vms-tdep.o \
> +	loongarch-linux-tdep.o \
> +	loongarch-tdep.o \
>  	mips-fbsd-tdep.o \
>  	mips-linux-tdep.o \
>  	mips-netbsd-tdep.o \
> @@ -734,7 +737,10 @@ ALL_64_TARGET_OBS = \
>  	sparc64-netbsd-tdep.o \
>  	sparc64-obsd-tdep.o \
>  	sparc64-sol2-tdep.o \
> -	sparc64-tdep.o
> +	sparc64-tdep.o \
> +	tilegx-linux-tdep.o \
> +	tilegx-tdep.o
> +
>  

Spurious empty line.

In opcodes, tilegx is in TARGET32_LIBOPCODES_CFILES.  So why did we need to move that one?

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-03 11:24 ` Pedro Alves
@ 2022-05-03 11:30   ` Luis Machado
  2022-05-03 21:51     ` Luis Machado
  0 siblings, 1 reply; 15+ messages in thread
From: Luis Machado @ 2022-05-03 11:30 UTC (permalink / raw)
  To: Pedro Alves, gdb-patches

On 5/3/22 12:24, Pedro Alves wrote:
> On 2022-05-03 12:19, Luis Machado via Gdb-patches wrote:
> 
>> ---
>>   gdb/Makefile.in | 13 +++++++------
>>   1 file changed, 7 insertions(+), 6 deletions(-)
>>
>> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
>> index 418094775a5..d80087749de 100644
>> --- a/gdb/Makefile.in
>> +++ b/gdb/Makefile.in
>> @@ -715,9 +715,12 @@ ALL_64_TARGET_OBS = \
>>   	arch/aarch64-mte-linux.o \
>>   	arch/amd64.o \
>>   	arch/riscv.o \
>> +	bpf-tdep.o \
>>   	ia64-linux-tdep.o \
>>   	ia64-tdep.o \
>>   	ia64-vms-tdep.o \
>> +	loongarch-linux-tdep.o \
>> +	loongarch-tdep.o \
>>   	mips-fbsd-tdep.o \
>>   	mips-linux-tdep.o \
>>   	mips-netbsd-tdep.o \
>> @@ -734,7 +737,10 @@ ALL_64_TARGET_OBS = \
>>   	sparc64-netbsd-tdep.o \
>>   	sparc64-obsd-tdep.o \
>>   	sparc64-sol2-tdep.o \
>> -	sparc64-tdep.o
>> +	sparc64-tdep.o \
>> +	tilegx-linux-tdep.o \
>> +	tilegx-tdep.o
>> +
>>   
> 
> Spurious empty line.

Fixed now.

> 
> In opcodes, tilegx is in TARGET32_LIBOPCODES_CFILES.  So why did we need to move that one?

*sigh*... I think that needs to be fixed as well.

opcodes/disassemble.c defines ARCH_tilegx if BFD64 is defined, which 
makes it a 64-bit BFD target. So a 32-bit build makes it not register a 
disassembler function (leading to GDB internal errors).

TILE-Gx is a 64-bit core according to 
https://en.wikipedia.org/wiki/TILE-Gx. So I suppose we need to move it 
from TARGET32_LIBOPCODES_CFILES to TARGET64_LIBOPCODES_CFILES.

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-03 11:19 [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS Luis Machado
  2022-05-03 11:24 ` Pedro Alves
@ 2022-05-03 15:21 ` Tom Tromey
  2022-05-03 16:20   ` Luis Machado
  1 sibling, 1 reply; 15+ messages in thread
From: Tom Tromey @ 2022-05-03 15:21 UTC (permalink / raw)
  To: Luis Machado via Gdb-patches

>>>>> "Luis" == Luis Machado via Gdb-patches <gdb-patches@sourceware.org> writes:

Luis> Doing a 32-bit build with "--enable-targets=all --disable-sim" fails to link
Luis> properly.

FWIW this patch seems like a candidate for the gdb 12 branch to me.
Is there a bug open for this problem in bugzilla?

Tom

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-03 15:21 ` Tom Tromey
@ 2022-05-03 16:20   ` Luis Machado
  2022-05-04  8:00     ` Luis Machado
  0 siblings, 1 reply; 15+ messages in thread
From: Luis Machado @ 2022-05-03 16:20 UTC (permalink / raw)
  To: Tom Tromey, Luis Machado via Gdb-patches

Hi Tom,

On 5/3/22 16:21, Tom Tromey wrote:
>>>>>> "Luis" == Luis Machado via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Luis> Doing a 32-bit build with "--enable-targets=all --disable-sim" fails to link
> Luis> properly.
> 
> FWIW this patch seems like a candidate for the gdb 12 branch to me.
> Is there a bug open for this problem in bugzilla?

No. We've discussed this somewhat on gdb-patches@ and binutils@, but the 
conclusion was that it didn't look like a blocker for the release. I can 
open a ticket and prepare a backport to GDB 12.

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-03 11:30   ` Luis Machado
@ 2022-05-03 21:51     ` Luis Machado
  2022-05-05  9:06       ` Luis Machado
  0 siblings, 1 reply; 15+ messages in thread
From: Luis Machado @ 2022-05-03 21:51 UTC (permalink / raw)
  To: Pedro Alves, gdb-patches

On 5/3/22 12:30, Luis Machado via Gdb-patches wrote:
> On 5/3/22 12:24, Pedro Alves wrote:
>> On 2022-05-03 12:19, Luis Machado via Gdb-patches wrote:
>>
>>> ---
>>>   gdb/Makefile.in | 13 +++++++------
>>>   1 file changed, 7 insertions(+), 6 deletions(-)
>>>
>>> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
>>> index 418094775a5..d80087749de 100644
>>> --- a/gdb/Makefile.in
>>> +++ b/gdb/Makefile.in
>>> @@ -715,9 +715,12 @@ ALL_64_TARGET_OBS = \
>>>       arch/aarch64-mte-linux.o \
>>>       arch/amd64.o \
>>>       arch/riscv.o \
>>> +    bpf-tdep.o \
>>>       ia64-linux-tdep.o \
>>>       ia64-tdep.o \
>>>       ia64-vms-tdep.o \
>>> +    loongarch-linux-tdep.o \
>>> +    loongarch-tdep.o \
>>>       mips-fbsd-tdep.o \
>>>       mips-linux-tdep.o \
>>>       mips-netbsd-tdep.o \
>>> @@ -734,7 +737,10 @@ ALL_64_TARGET_OBS = \
>>>       sparc64-netbsd-tdep.o \
>>>       sparc64-obsd-tdep.o \
>>>       sparc64-sol2-tdep.o \
>>> -    sparc64-tdep.o
>>> +    sparc64-tdep.o \
>>> +    tilegx-linux-tdep.o \
>>> +    tilegx-tdep.o
>>> +
>>
>> Spurious empty line.
> 
> Fixed now.
> 
>>
>> In opcodes, tilegx is in TARGET32_LIBOPCODES_CFILES.  So why did we 
>> need to move that one?
> 
> *sigh*... I think that needs to be fixed as well.
> 
> opcodes/disassemble.c defines ARCH_tilegx if BFD64 is defined, which 
> makes it a 64-bit BFD target. So a 32-bit build makes it not register a 
> disassembler function (leading to GDB internal errors).
> 
> TILE-Gx is a 64-bit core according to 
> https://en.wikipedia.org/wiki/TILE-Gx. So I suppose we need to move it 
> from TARGET32_LIBOPCODES_CFILES to TARGET64_LIBOPCODES_CFILES.

Patch to binutils sent here: 
https://sourceware.org/pipermail/binutils/2022-May/120651.html

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-03 16:20   ` Luis Machado
@ 2022-05-04  8:00     ` Luis Machado
  0 siblings, 0 replies; 15+ messages in thread
From: Luis Machado @ 2022-05-04  8:00 UTC (permalink / raw)
  To: Tom Tromey, Luis Machado via Gdb-patches

On 5/3/22 17:20, Luis Machado via Gdb-patches wrote:
> Hi Tom,
> 
> On 5/3/22 16:21, Tom Tromey wrote:
>>>>>>> "Luis" == Luis Machado via Gdb-patches 
>>>>>>> <gdb-patches@sourceware.org> writes:
>>
>> Luis> Doing a 32-bit build with "--enable-targets=all --disable-sim" 
>> fails to link
>> Luis> properly.
>>
>> FWIW this patch seems like a candidate for the gdb 12 branch to me.
>> Is there a bug open for this problem in bugzilla?
> 
> No. We've discussed this somewhat on gdb-patches@ and binutils@, but the 
> conclusion was that it didn't look like a blocker for the release. I can 
> open a ticket and prepare a backport to GDB 12.


Here it is: https://sourceware.org/bugzilla/show_bug.cgi?id=29119

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-03 21:51     ` Luis Machado
@ 2022-05-05  9:06       ` Luis Machado
  2022-05-05 10:29         ` Pedro Alves
  2022-05-26  7:22         ` Luis Machado
  0 siblings, 2 replies; 15+ messages in thread
From: Luis Machado @ 2022-05-05  9:06 UTC (permalink / raw)
  To: Pedro Alves, gdb-patches

On 5/3/22 22:51, Luis Machado via Gdb-patches wrote:
> On 5/3/22 12:30, Luis Machado via Gdb-patches wrote:
>> On 5/3/22 12:24, Pedro Alves wrote:
>>> On 2022-05-03 12:19, Luis Machado via Gdb-patches wrote:
>>>
>>>> ---
>>>>   gdb/Makefile.in | 13 +++++++------
>>>>   1 file changed, 7 insertions(+), 6 deletions(-)
>>>>
>>>> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
>>>> index 418094775a5..d80087749de 100644
>>>> --- a/gdb/Makefile.in
>>>> +++ b/gdb/Makefile.in
>>>> @@ -715,9 +715,12 @@ ALL_64_TARGET_OBS = \
>>>>       arch/aarch64-mte-linux.o \
>>>>       arch/amd64.o \
>>>>       arch/riscv.o \
>>>> +    bpf-tdep.o \
>>>>       ia64-linux-tdep.o \
>>>>       ia64-tdep.o \
>>>>       ia64-vms-tdep.o \
>>>> +    loongarch-linux-tdep.o \
>>>> +    loongarch-tdep.o \
>>>>       mips-fbsd-tdep.o \
>>>>       mips-linux-tdep.o \
>>>>       mips-netbsd-tdep.o \
>>>> @@ -734,7 +737,10 @@ ALL_64_TARGET_OBS = \
>>>>       sparc64-netbsd-tdep.o \
>>>>       sparc64-obsd-tdep.o \
>>>>       sparc64-sol2-tdep.o \
>>>> -    sparc64-tdep.o
>>>> +    sparc64-tdep.o \
>>>> +    tilegx-linux-tdep.o \
>>>> +    tilegx-tdep.o
>>>> +
>>>
>>> Spurious empty line.
>>
>> Fixed now.
>>
>>>
>>> In opcodes, tilegx is in TARGET32_LIBOPCODES_CFILES.  So why did we 
>>> need to move that one?
>>
>> *sigh*... I think that needs to be fixed as well.
>>
>> opcodes/disassemble.c defines ARCH_tilegx if BFD64 is defined, which 
>> makes it a 64-bit BFD target. So a 32-bit build makes it not register 
>> a disassembler function (leading to GDB internal errors).
>>
>> TILE-Gx is a 64-bit core according to 
>> https://en.wikipedia.org/wiki/TILE-Gx. So I suppose we need to move it 
>> from TARGET32_LIBOPCODES_CFILES to TARGET64_LIBOPCODES_CFILES.
> 
> Patch to binutils sent here: 
> https://sourceware.org/pipermail/binutils/2022-May/120651.html

I've pushed the binutils patch. Are there any objections to the gdb-side 
patch?

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-05  9:06       ` Luis Machado
@ 2022-05-05 10:29         ` Pedro Alves
  2022-05-30 10:25           ` Luis Machado
  2022-05-26  7:22         ` Luis Machado
  1 sibling, 1 reply; 15+ messages in thread
From: Pedro Alves @ 2022-05-05 10:29 UTC (permalink / raw)
  To: Luis Machado, gdb-patches

On 2022-05-05 10:06, Luis Machado wrote:
> On 5/3/22 22:51, Luis Machado via Gdb-patches wrote:

>>>> In opcodes, tilegx is in TARGET32_LIBOPCODES_CFILES.  So why did we need to move that one?
>>>
>>> *sigh*... I think that needs to be fixed as well.
>>>
>>> opcodes/disassemble.c defines ARCH_tilegx if BFD64 is defined, which makes it a 64-bit BFD target. So a 32-bit build makes it not register a disassembler function (leading to GDB internal errors).
>>>
>>> TILE-Gx is a 64-bit core according to https://en.wikipedia.org/wiki/TILE-Gx. So I suppose we need to move it from TARGET32_LIBOPCODES_CFILES to TARGET64_LIBOPCODES_CFILES.
>>
>> Patch to binutils sent here: https://sourceware.org/pipermail/binutils/2022-May/120651.html
> 
> I've pushed the binutils patch. Are there any objections to the gdb-side patch?

Nope.  Please go ahead and merge it.

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-05  9:06       ` Luis Machado
  2022-05-05 10:29         ` Pedro Alves
@ 2022-05-26  7:22         ` Luis Machado
  2022-05-26 13:57           ` Simon Marchi
  2022-05-26 13:59           ` Tom Tromey
  1 sibling, 2 replies; 15+ messages in thread
From: Luis Machado @ 2022-05-26  7:22 UTC (permalink / raw)
  To: Pedro Alves, gdb-patches

On 5/5/22 10:06, Luis Machado via Gdb-patches wrote:
> On 5/3/22 22:51, Luis Machado via Gdb-patches wrote:
>> On 5/3/22 12:30, Luis Machado via Gdb-patches wrote:
>>> On 5/3/22 12:24, Pedro Alves wrote:
>>>> On 2022-05-03 12:19, Luis Machado via Gdb-patches wrote:
>>>>
>>>>> ---
>>>>>   gdb/Makefile.in | 13 +++++++------
>>>>>   1 file changed, 7 insertions(+), 6 deletions(-)
>>>>>
>>>>> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
>>>>> index 418094775a5..d80087749de 100644
>>>>> --- a/gdb/Makefile.in
>>>>> +++ b/gdb/Makefile.in
>>>>> @@ -715,9 +715,12 @@ ALL_64_TARGET_OBS = \
>>>>>       arch/aarch64-mte-linux.o \
>>>>>       arch/amd64.o \
>>>>>       arch/riscv.o \
>>>>> +    bpf-tdep.o \
>>>>>       ia64-linux-tdep.o \
>>>>>       ia64-tdep.o \
>>>>>       ia64-vms-tdep.o \
>>>>> +    loongarch-linux-tdep.o \
>>>>> +    loongarch-tdep.o \
>>>>>       mips-fbsd-tdep.o \
>>>>>       mips-linux-tdep.o \
>>>>>       mips-netbsd-tdep.o \
>>>>> @@ -734,7 +737,10 @@ ALL_64_TARGET_OBS = \
>>>>>       sparc64-netbsd-tdep.o \
>>>>>       sparc64-obsd-tdep.o \
>>>>>       sparc64-sol2-tdep.o \
>>>>> -    sparc64-tdep.o
>>>>> +    sparc64-tdep.o \
>>>>> +    tilegx-linux-tdep.o \
>>>>> +    tilegx-tdep.o
>>>>> +
>>>>
>>>> Spurious empty line.
>>>
>>> Fixed now.
>>>
>>>>
>>>> In opcodes, tilegx is in TARGET32_LIBOPCODES_CFILES.  So why did we need to move that one?
>>>
>>> *sigh*... I think that needs to be fixed as well.
>>>
>>> opcodes/disassemble.c defines ARCH_tilegx if BFD64 is defined, which makes it a 64-bit BFD target. So a 32-bit build makes it not register a disassembler function (leading to GDB internal errors).
>>>
>>> TILE-Gx is a 64-bit core according to https://en.wikipedia.org/wiki/TILE-Gx. So I suppose we need to move it from TARGET32_LIBOPCODES_CFILES to TARGET64_LIBOPCODES_CFILES.
>>
>> Patch to binutils sent here: https://sourceware.org/pipermail/binutils/2022-May/120651.html
> 
> I've pushed the binutils patch. Are there any objections to the gdb-side patch?

Ping?

32-bit builds with --enable-targets=all are still failing due to the misplacement of these places.

If we drop the tilegx change, would that be acceptable?

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-26  7:22         ` Luis Machado
@ 2022-05-26 13:57           ` Simon Marchi
  2022-05-26 17:45             ` Luis Machado
  2022-05-26 13:59           ` Tom Tromey
  1 sibling, 1 reply; 15+ messages in thread
From: Simon Marchi @ 2022-05-26 13:57 UTC (permalink / raw)
  To: Luis Machado, Pedro Alves, gdb-patches



On 2022-05-26 03:22, Luis Machado via Gdb-patches wrote:
> On 5/5/22 10:06, Luis Machado via Gdb-patches wrote:
>> On 5/3/22 22:51, Luis Machado via Gdb-patches wrote:
>>> On 5/3/22 12:30, Luis Machado via Gdb-patches wrote:
>>>> On 5/3/22 12:24, Pedro Alves wrote:
>>>>> On 2022-05-03 12:19, Luis Machado via Gdb-patches wrote:
>>>>>
>>>>>> ---
>>>>>>   gdb/Makefile.in | 13 +++++++------
>>>>>>   1 file changed, 7 insertions(+), 6 deletions(-)
>>>>>>
>>>>>> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
>>>>>> index 418094775a5..d80087749de 100644
>>>>>> --- a/gdb/Makefile.in
>>>>>> +++ b/gdb/Makefile.in
>>>>>> @@ -715,9 +715,12 @@ ALL_64_TARGET_OBS = \
>>>>>>       arch/aarch64-mte-linux.o \
>>>>>>       arch/amd64.o \
>>>>>>       arch/riscv.o \
>>>>>> +    bpf-tdep.o \
>>>>>>       ia64-linux-tdep.o \
>>>>>>       ia64-tdep.o \
>>>>>>       ia64-vms-tdep.o \
>>>>>> +    loongarch-linux-tdep.o \
>>>>>> +    loongarch-tdep.o \
>>>>>>       mips-fbsd-tdep.o \
>>>>>>       mips-linux-tdep.o \
>>>>>>       mips-netbsd-tdep.o \
>>>>>> @@ -734,7 +737,10 @@ ALL_64_TARGET_OBS = \
>>>>>>       sparc64-netbsd-tdep.o \
>>>>>>       sparc64-obsd-tdep.o \
>>>>>>       sparc64-sol2-tdep.o \
>>>>>> -    sparc64-tdep.o
>>>>>> +    sparc64-tdep.o \
>>>>>> +    tilegx-linux-tdep.o \
>>>>>> +    tilegx-tdep.o
>>>>>> +
>>>>>
>>>>> Spurious empty line.
>>>>
>>>> Fixed now.
>>>>
>>>>>
>>>>> In opcodes, tilegx is in TARGET32_LIBOPCODES_CFILES.  So why did we need to move that one?
>>>>
>>>> *sigh*... I think that needs to be fixed as well.
>>>>
>>>> opcodes/disassemble.c defines ARCH_tilegx if BFD64 is defined, which makes it a 64-bit BFD target. So a 32-bit build makes it not register a disassembler function (leading to GDB internal errors).
>>>>
>>>> TILE-Gx is a 64-bit core according to https://en.wikipedia.org/wiki/TILE-Gx. So I suppose we need to move it from TARGET32_LIBOPCODES_CFILES to TARGET64_LIBOPCODES_CFILES.
>>>
>>> Patch to binutils sent here: https://sourceware.org/pipermail/binutils/2022-May/120651.html
>>
>> I've pushed the binutils patch. Are there any objections to the gdb-side patch?
> 
> Ping?
> 
> 32-bit builds with --enable-targets=all are still failing due to the misplacement of these places.
> 
> If we drop the tilegx change, would that be acceptable?

You might have not received, but Pedro said "Nope.  Please go ahead and merge it." on
May 5th.

https://pi.simark.ca/gdb-patches/de20c1c0-6945-0de4-e3e3-11522fc74458@arm.com/T/#md5f08ad8f5b43fb3c3d0f731de2c807260197142

Simon

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-26  7:22         ` Luis Machado
  2022-05-26 13:57           ` Simon Marchi
@ 2022-05-26 13:59           ` Tom Tromey
  2022-05-26 17:50             ` Luis Machado
  1 sibling, 1 reply; 15+ messages in thread
From: Tom Tromey @ 2022-05-26 13:59 UTC (permalink / raw)
  To: Luis Machado via Gdb-patches; +Cc: Pedro Alves, Luis Machado

>>>>> "Luis" == Luis Machado via Gdb-patches <gdb-patches@sourceware.org> writes:

Luis> 32-bit builds with --enable-targets=all are still failing due to
Luis> the misplacement of these places.

Luis> If we drop the tilegx change, would that be acceptable?

IIUC, the original objection was that tilegx was listed as 32-bit in
opcodes, but was moved to the 64-bit section in your patch.  However,
tilegx is actually a 64-bit arch, so you sent another patch to correct
this in opcodes.

If that's all true then I think your patch is correct as-is and should
be checked in.

Thank you for doing this.

Tom

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-26 13:57           ` Simon Marchi
@ 2022-05-26 17:45             ` Luis Machado
  0 siblings, 0 replies; 15+ messages in thread
From: Luis Machado @ 2022-05-26 17:45 UTC (permalink / raw)
  To: Simon Marchi, Pedro Alves, gdb-patches

On 5/26/22 14:57, Simon Marchi wrote:
> 
> 
> On 2022-05-26 03:22, Luis Machado via Gdb-patches wrote:
>> On 5/5/22 10:06, Luis Machado via Gdb-patches wrote:
>>> On 5/3/22 22:51, Luis Machado via Gdb-patches wrote:
>>>> On 5/3/22 12:30, Luis Machado via Gdb-patches wrote:
>>>>> On 5/3/22 12:24, Pedro Alves wrote:
>>>>>> On 2022-05-03 12:19, Luis Machado via Gdb-patches wrote:
>>>>>>
>>>>>>> ---
>>>>>>>    gdb/Makefile.in | 13 +++++++------
>>>>>>>    1 file changed, 7 insertions(+), 6 deletions(-)
>>>>>>>
>>>>>>> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
>>>>>>> index 418094775a5..d80087749de 100644
>>>>>>> --- a/gdb/Makefile.in
>>>>>>> +++ b/gdb/Makefile.in
>>>>>>> @@ -715,9 +715,12 @@ ALL_64_TARGET_OBS = \
>>>>>>>        arch/aarch64-mte-linux.o \
>>>>>>>        arch/amd64.o \
>>>>>>>        arch/riscv.o \
>>>>>>> +    bpf-tdep.o \
>>>>>>>        ia64-linux-tdep.o \
>>>>>>>        ia64-tdep.o \
>>>>>>>        ia64-vms-tdep.o \
>>>>>>> +    loongarch-linux-tdep.o \
>>>>>>> +    loongarch-tdep.o \
>>>>>>>        mips-fbsd-tdep.o \
>>>>>>>        mips-linux-tdep.o \
>>>>>>>        mips-netbsd-tdep.o \
>>>>>>> @@ -734,7 +737,10 @@ ALL_64_TARGET_OBS = \
>>>>>>>        sparc64-netbsd-tdep.o \
>>>>>>>        sparc64-obsd-tdep.o \
>>>>>>>        sparc64-sol2-tdep.o \
>>>>>>> -    sparc64-tdep.o
>>>>>>> +    sparc64-tdep.o \
>>>>>>> +    tilegx-linux-tdep.o \
>>>>>>> +    tilegx-tdep.o
>>>>>>> +
>>>>>>
>>>>>> Spurious empty line.
>>>>>
>>>>> Fixed now.
>>>>>
>>>>>>
>>>>>> In opcodes, tilegx is in TARGET32_LIBOPCODES_CFILES.  So why did we need to move that one?
>>>>>
>>>>> *sigh*... I think that needs to be fixed as well.
>>>>>
>>>>> opcodes/disassemble.c defines ARCH_tilegx if BFD64 is defined, which makes it a 64-bit BFD target. So a 32-bit build makes it not register a disassembler function (leading to GDB internal errors).
>>>>>
>>>>> TILE-Gx is a 64-bit core according to https://en.wikipedia.org/wiki/TILE-Gx. So I suppose we need to move it from TARGET32_LIBOPCODES_CFILES to TARGET64_LIBOPCODES_CFILES.
>>>>
>>>> Patch to binutils sent here: https://sourceware.org/pipermail/binutils/2022-May/120651.html
>>>
>>> I've pushed the binutils patch. Are there any objections to the gdb-side patch?
>>
>> Ping?
>>
>> 32-bit builds with --enable-targets=all are still failing due to the misplacement of these places.
>>
>> If we drop the tilegx change, would that be acceptable?
> 
> You might have not received, but Pedro said "Nope.  Please go ahead and merge it." on
> May 5th.
> 
> https://pi.simark.ca/gdb-patches/de20c1c0-6945-0de4-e3e3-11522fc74458@arm.com/T/#md5f08ad8f5b43fb3c3d0f731de2c807260197142

*sigh* My inbound mail server seems to not like Pedro, so randomly decides to drop his e-mails.

I'll double check the list from now on. Thanks for the pointer.

> 
> Simon


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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-26 13:59           ` Tom Tromey
@ 2022-05-26 17:50             ` Luis Machado
  0 siblings, 0 replies; 15+ messages in thread
From: Luis Machado @ 2022-05-26 17:50 UTC (permalink / raw)
  To: Tom Tromey, Luis Machado via Gdb-patches; +Cc: Pedro Alves

On 5/26/22 14:59, Tom Tromey wrote:
>>>>>> "Luis" == Luis Machado via Gdb-patches <gdb-patches@sourceware.org> writes:
> 
> Luis> 32-bit builds with --enable-targets=all are still failing due to
> Luis> the misplacement of these places.
> 
> Luis> If we drop the tilegx change, would that be acceptable?
> 
> IIUC, the original objection was that tilegx was listed as 32-bit in
> opcodes, but was moved to the 64-bit section in your patch.  However,
> tilegx is actually a 64-bit arch, so you sent another patch to correct
> this in opcodes.> 
> If that's all true then I think your patch is correct as-is and should
> be checked in.

Thanks Tom.

Indeed. There has been some discussions on binutils@. Sounds like we need to fix a few
more things, but this patch should address the GDB side of things for now.

> 
> Thank you for doing this.
> 
> Tom

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

* Re: [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS
  2022-05-05 10:29         ` Pedro Alves
@ 2022-05-30 10:25           ` Luis Machado
  0 siblings, 0 replies; 15+ messages in thread
From: Luis Machado @ 2022-05-30 10:25 UTC (permalink / raw)
  To: Pedro Alves, gdb-patches

On 5/5/22 11:29, Pedro Alves wrote:
> On 2022-05-05 10:06, Luis Machado wrote:
>> On 5/3/22 22:51, Luis Machado via Gdb-patches wrote:
> 
>>>>> In opcodes, tilegx is in TARGET32_LIBOPCODES_CFILES.  So why did we need to move that one?
>>>>
>>>> *sigh*... I think that needs to be fixed as well.
>>>>
>>>> opcodes/disassemble.c defines ARCH_tilegx if BFD64 is defined, which makes it a 64-bit BFD target. So a 32-bit build makes it not register a disassembler function (leading to GDB internal errors).
>>>>
>>>> TILE-Gx is a 64-bit core according to https://en.wikipedia.org/wiki/TILE-Gx. So I suppose we need to move it from TARGET32_LIBOPCODES_CFILES to TARGET64_LIBOPCODES_CFILES.
>>>
>>> Patch to binutils sent here: https://sourceware.org/pipermail/binutils/2022-May/120651.html
>>
>> I've pushed the binutils patch. Are there any objections to the gdb-side patch?
> 
> Nope.  Please go ahead and merge it.

Pushed now. Thanks!

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

end of thread, other threads:[~2022-05-30 10:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03 11:19 [PATCH] Move 64-bit BFD files from ALL_TARGET_OBS to ALL_64_TARGET_OBS Luis Machado
2022-05-03 11:24 ` Pedro Alves
2022-05-03 11:30   ` Luis Machado
2022-05-03 21:51     ` Luis Machado
2022-05-05  9:06       ` Luis Machado
2022-05-05 10:29         ` Pedro Alves
2022-05-30 10:25           ` Luis Machado
2022-05-26  7:22         ` Luis Machado
2022-05-26 13:57           ` Simon Marchi
2022-05-26 17:45             ` Luis Machado
2022-05-26 13:59           ` Tom Tromey
2022-05-26 17:50             ` Luis Machado
2022-05-03 15:21 ` Tom Tromey
2022-05-03 16:20   ` Luis Machado
2022-05-04  8:00     ` Luis Machado

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