public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFC][gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S
@ 2019-03-07 12:11 Tom de Vries
  2019-04-23 14:21 ` [PING][RFC][gdb/testsuite] " Tom de Vries
  2019-05-14  8:04 ` [RFC][gdb/testsuite] " Andrew Burgess
  0 siblings, 2 replies; 5+ messages in thread
From: Tom de Vries @ 2019-03-07 12:11 UTC (permalink / raw)
  To: gdb-patches

Hi,

A base address selection entry in a location list consist of two (constant or
relocated) address offsets.  The two offsets are the same size as an address
on the target machine.

The test-case gdb.dwarf2/dw2-skip-prologue.S encodes a base address selection
entry using .4byte, which is incorrect for 8-byte pointer size.  [ Which
triggers an assert in dwz, see PR dwz/24172. ]

Fix this by using PTRBYTE instead.

Tested on x86_64-linux.

Do we fix this type of errors in the testsuite?  AFAICT, the invalid dwarf is
not intentional.

Thanks,
- Tom

[gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S

gdb/testsuite/ChangeLog:

2019-03-07  Tom de Vries  <tdevries@suse.de>

	* gdb.dwarf2/dw2-skip-prologue.S (.debug_loc): Fix base address
	selection entry encoding.

---
 gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
index cef6e6df12..a55699fdc6 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
@@ -123,7 +123,7 @@
 	.section	.debug_loc
 loclist:
 	/* Reset the location list base address first.  */
-	.4byte		-1, 0
+	PTRBYTE		-1, 0
 
 	PTRBYTE		func_start, func_end
 	.2byte		2f-1f

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

* [PING][RFC][gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S
  2019-03-07 12:11 [RFC][gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S Tom de Vries
@ 2019-04-23 14:21 ` Tom de Vries
  2019-05-07 14:50   ` [PING^2][RFC][gdb/testsuite] " Tom de Vries
  2019-05-14  8:04 ` [RFC][gdb/testsuite] " Andrew Burgess
  1 sibling, 1 reply; 5+ messages in thread
From: Tom de Vries @ 2019-04-23 14:21 UTC (permalink / raw)
  To: gdb-patches

On 07-03-19 13:11, Tom de Vries wrote:
> Hi,
> 
> A base address selection entry in a location list consist of two (constant or
> relocated) address offsets.  The two offsets are the same size as an address
> on the target machine.
> 
> The test-case gdb.dwarf2/dw2-skip-prologue.S encodes a base address selection
> entry using .4byte, which is incorrect for 8-byte pointer size.  [ Which
> triggers an assert in dwz, see PR dwz/24172. ]
> 
> Fix this by using PTRBYTE instead.
> 
> Tested on x86_64-linux.
> 
> Do we fix this type of errors in the testsuite?  AFAICT, the invalid dwarf is
> not intentional.
> 

Ping.

Thanks,
- Tom

> [gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S
> 
> gdb/testsuite/ChangeLog:
> 
> 2019-03-07  Tom de Vries  <tdevries@suse.de>
> 
> 	* gdb.dwarf2/dw2-skip-prologue.S (.debug_loc): Fix base address
> 	selection entry encoding.
> 
> ---
>  gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
> index cef6e6df12..a55699fdc6 100644
> --- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
> +++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
> @@ -123,7 +123,7 @@
>  	.section	.debug_loc
>  loclist:
>  	/* Reset the location list base address first.  */
> -	.4byte		-1, 0
> +	PTRBYTE		-1, 0
>  
>  	PTRBYTE		func_start, func_end
>  	.2byte		2f-1f
> 

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

* [PING^2][RFC][gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S
  2019-04-23 14:21 ` [PING][RFC][gdb/testsuite] " Tom de Vries
@ 2019-05-07 14:50   ` Tom de Vries
  2019-05-14  6:53     ` [PING^3][RFC][gdb/testsuite] " Tom de Vries
  0 siblings, 1 reply; 5+ messages in thread
From: Tom de Vries @ 2019-05-07 14:50 UTC (permalink / raw)
  To: gdb-patches

On 23-04-19 16:21, Tom de Vries wrote:
> On 07-03-19 13:11, Tom de Vries wrote:
>> Hi,
>>
>> A base address selection entry in a location list consist of two (constant or
>> relocated) address offsets.  The two offsets are the same size as an address
>> on the target machine.
>>
>> The test-case gdb.dwarf2/dw2-skip-prologue.S encodes a base address selection
>> entry using .4byte, which is incorrect for 8-byte pointer size.  [ Which
>> triggers an assert in dwz, see PR dwz/24172. ]
>>
>> Fix this by using PTRBYTE instead.
>>
>> Tested on x86_64-linux.
>>
>> Do we fix this type of errors in the testsuite?  AFAICT, the invalid dwarf is
>> not intentional.
>>
> 

Ping.

Thanks,
- Tom
> 
>> [gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S
>>
>> gdb/testsuite/ChangeLog:
>>
>> 2019-03-07  Tom de Vries  <tdevries@suse.de>
>>
>> 	* gdb.dwarf2/dw2-skip-prologue.S (.debug_loc): Fix base address
>> 	selection entry encoding.
>>
>> ---
>>  gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
>> index cef6e6df12..a55699fdc6 100644
>> --- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
>> +++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
>> @@ -123,7 +123,7 @@
>>  	.section	.debug_loc
>>  loclist:
>>  	/* Reset the location list base address first.  */
>> -	.4byte		-1, 0
>> +	PTRBYTE		-1, 0
>>  
>>  	PTRBYTE		func_start, func_end
>>  	.2byte		2f-1f
>>

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

* Re: [PING^3][RFC][gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S
  2019-05-07 14:50   ` [PING^2][RFC][gdb/testsuite] " Tom de Vries
@ 2019-05-14  6:53     ` Tom de Vries
  0 siblings, 0 replies; 5+ messages in thread
From: Tom de Vries @ 2019-05-14  6:53 UTC (permalink / raw)
  To: gdb-patches

On 07-05-19 16:50, Tom de Vries wrote:
> On 23-04-19 16:21, Tom de Vries wrote:
>> On 07-03-19 13:11, Tom de Vries wrote:
>>> Hi,
>>>
>>> A base address selection entry in a location list consist of two (constant or
>>> relocated) address offsets.  The two offsets are the same size as an address
>>> on the target machine.
>>>
>>> The test-case gdb.dwarf2/dw2-skip-prologue.S encodes a base address selection
>>> entry using .4byte, which is incorrect for 8-byte pointer size.  [ Which
>>> triggers an assert in dwz, see PR dwz/24172. ]
>>>
>>> Fix this by using PTRBYTE instead.
>>>
>>> Tested on x86_64-linux.
>>>
>>> Do we fix this type of errors in the testsuite?  AFAICT, the invalid dwarf is
>>> not intentional.
>>>
>>
> 
> Ping.
> 
> Thanks,
> - Tom
>>
>>> [gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S
>>>
>>> gdb/testsuite/ChangeLog:
>>>
>>> 2019-03-07  Tom de Vries  <tdevries@suse.de>
>>>
>>> 	* gdb.dwarf2/dw2-skip-prologue.S (.debug_loc): Fix base address
>>> 	selection entry encoding.
>>>
>>> ---
>>>  gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
>>> index cef6e6df12..a55699fdc6 100644
>>> --- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
>>> +++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
>>> @@ -123,7 +123,7 @@
>>>  	.section	.debug_loc
>>>  loclist:
>>>  	/* Reset the location list base address first.  */
>>> -	.4byte		-1, 0
>>> +	PTRBYTE		-1, 0
>>>  
>>>  	PTRBYTE		func_start, func_end
>>>  	.2byte		2f-1f
>>>

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

* Re: [RFC][gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S
  2019-03-07 12:11 [RFC][gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S Tom de Vries
  2019-04-23 14:21 ` [PING][RFC][gdb/testsuite] " Tom de Vries
@ 2019-05-14  8:04 ` Andrew Burgess
  1 sibling, 0 replies; 5+ messages in thread
From: Andrew Burgess @ 2019-05-14  8:04 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

* Tom de Vries <tdevries@suse.de> [2019-03-07 13:11:50 +0100]:

> Hi,
> 
> A base address selection entry in a location list consist of two (constant or
> relocated) address offsets.  The two offsets are the same size as an address
> on the target machine.
> 
> The test-case gdb.dwarf2/dw2-skip-prologue.S encodes a base address selection
> entry using .4byte, which is incorrect for 8-byte pointer size.  [ Which
> triggers an assert in dwz, see PR dwz/24172. ]
> 
> Fix this by using PTRBYTE instead.
> 
> Tested on x86_64-linux.
> 
> Do we fix this type of errors in the testsuite?  AFAICT, the invalid dwarf is
> not intentional.
> 
> Thanks,
> - Tom
> 
> [gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S
> 
> gdb/testsuite/ChangeLog:
> 
> 2019-03-07  Tom de Vries  <tdevries@suse.de>
> 
> 	* gdb.dwarf2/dw2-skip-prologue.S (.debug_loc): Fix base address
> 	selection entry encoding.

This patch looks great.  Please go ahead and apply it.

Thanks,
Andrew



> 
> ---
>  gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
> index cef6e6df12..a55699fdc6 100644
> --- a/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
> +++ b/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.S
> @@ -123,7 +123,7 @@
>  	.section	.debug_loc
>  loclist:
>  	/* Reset the location list base address first.  */
> -	.4byte		-1, 0
> +	PTRBYTE		-1, 0
>  
>  	PTRBYTE		func_start, func_end
>  	.2byte		2f-1f

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

end of thread, other threads:[~2019-05-14  8:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-07 12:11 [RFC][gdb/testsuite] Fix base address selection entry encoding in dw2-skip-prologue.S Tom de Vries
2019-04-23 14:21 ` [PING][RFC][gdb/testsuite] " Tom de Vries
2019-05-07 14:50   ` [PING^2][RFC][gdb/testsuite] " Tom de Vries
2019-05-14  6:53     ` [PING^3][RFC][gdb/testsuite] " Tom de Vries
2019-05-14  8:04 ` [RFC][gdb/testsuite] " Andrew Burgess

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