Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] [gdb/testsuite] Fix target endianness detection on msys2-ucrt64
@ 2025-09-05 13:52 Tom de Vries
  2025-09-05 15:10 ` Tom de Vries
  2025-09-05 15:12 ` Simon Marchi
  0 siblings, 2 replies; 3+ messages in thread
From: Tom de Vries @ 2025-09-05 13:52 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pedro Alves

On msys2-ucrt64, with test-case gdb.ada/big_packed_array.exp I run into:
...
(gdb) file /home/vries/gdb/build/gdb/testsuite/temp/3162/target_endianness.x
/home/vries/gdb/build/gdb/testsuite/temp/3162/target_endianness.x: No such file or directory.
(gdb) ERROR: (target_endianness.x) No such file or directory
...

Fix this by using host_file_normalize in gdb_file_cmd.

Tested on msys2-ucrt64.
---
 gdb/testsuite/lib/gdb.exp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 7a3ea8d9644..00a4c54e8a0 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2611,6 +2611,7 @@ proc gdb_file_cmd { arg {kill_flag 1} } {
 	}
     }
 
+    set arg [host_file_normalize $arg]
     send_gdb "file $arg\n"
     set new_symbol_table 0
     set basename [file tail $arg]

base-commit: aaad5a3254db53434eaf1cf70384e7ee0dfb886a
-- 
2.51.0


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

* Re: [PATCH] [gdb/testsuite] Fix target endianness detection on msys2-ucrt64
  2025-09-05 13:52 [PATCH] [gdb/testsuite] Fix target endianness detection on msys2-ucrt64 Tom de Vries
@ 2025-09-05 15:10 ` Tom de Vries
  2025-09-05 15:12 ` Simon Marchi
  1 sibling, 0 replies; 3+ messages in thread
From: Tom de Vries @ 2025-09-05 15:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Pedro Alves

On 9/5/25 15:52, Tom de Vries wrote:
> On msys2-ucrt64, with test-case gdb.ada/big_packed_array.exp I run into:
> ...
> (gdb) file /home/vries/gdb/build/gdb/testsuite/temp/3162/target_endianness.x
> /home/vries/gdb/build/gdb/testsuite/temp/3162/target_endianness.x: No such file or directory.
> (gdb) ERROR: (target_endianness.x) No such file or directory
> ...
> 
> Fix this by using host_file_normalize in gdb_file_cmd.
> 

Retesting on x86_64-linux gets us:
...
(gdb) file 
/data/vries/gdb/leap-15-6/build/gdb/testsuite/target:/data/vries/gdb/leap-15-6/build/gdb/testsuite/outputs/gdb.base/sysroot-debug-lookup/sysroot2/bin/sysroot-debug-lookup_2^M
/data/vries/gdb/leap-15-6/build/gdb/testsuite/target:/data/vries/gdb/leap-15-6/build/gdb/testsuite/outputs/gdb.base/sysroot-debug-lookup/sysroot2/bin/sysroot-debug-lookup_2: 
No such file or directory.^M
(gdb) ERROR: (sysroot-debug-lookup_2) No such file or directory
UNRESOLVED: gdb.base/sysroot-debug-lookup.exp: lookup_via_debuglink: 
sysroot_prefix=target:: ensure debug information was found
FAIL: gdb.base/sysroot-debug-lookup.exp: lookup_via_debuglink: 
sysroot_prefix=target:: debug symbols read from correct file
...

So either we need to fix this test-case, or handle the target: prefix in 
host_file_normalize.

Thanks,
- Tom

> Tested on msys2-ucrt64.
> ---
>   gdb/testsuite/lib/gdb.exp | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index 7a3ea8d9644..00a4c54e8a0 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -2611,6 +2611,7 @@ proc gdb_file_cmd { arg {kill_flag 1} } {
>   	}
>       }
>   
> +    set arg [host_file_normalize $arg]
>       send_gdb "file $arg\n"
>       set new_symbol_table 0
>       set basename [file tail $arg]
> 
> base-commit: aaad5a3254db53434eaf1cf70384e7ee0dfb886a


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

* Re: [PATCH] [gdb/testsuite] Fix target endianness detection on msys2-ucrt64
  2025-09-05 13:52 [PATCH] [gdb/testsuite] Fix target endianness detection on msys2-ucrt64 Tom de Vries
  2025-09-05 15:10 ` Tom de Vries
@ 2025-09-05 15:12 ` Simon Marchi
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2025-09-05 15:12 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches; +Cc: Pedro Alves

On 9/5/25 9:52 AM, Tom de Vries wrote:
> On msys2-ucrt64, with test-case gdb.ada/big_packed_array.exp I run into:
> ...
> (gdb) file /home/vries/gdb/build/gdb/testsuite/temp/3162/target_endianness.x
> /home/vries/gdb/build/gdb/testsuite/temp/3162/target_endianness.x: No such file or directory.
> (gdb) ERROR: (target_endianness.x) No such file or directory
> ...
> 
> Fix this by using host_file_normalize in gdb_file_cmd.
> 
> Tested on msys2-ucrt64.
> ---
>  gdb/testsuite/lib/gdb.exp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
> index 7a3ea8d9644..00a4c54e8a0 100644
> --- a/gdb/testsuite/lib/gdb.exp
> +++ b/gdb/testsuite/lib/gdb.exp
> @@ -2611,6 +2611,7 @@ proc gdb_file_cmd { arg {kill_flag 1} } {
>  	}
>      }
>  
> +    set arg [host_file_normalize $arg]
>      send_gdb "file $arg\n"
>      set new_symbol_table 0
>      set basename [file tail $arg]
> 
> base-commit: aaad5a3254db53434eaf1cf70384e7ee0dfb886a
> -- 
> 2.51.0
> 

Seems fine.

Approved-By: Simon Marchi <simon.marchi@efficios.com>

Simon

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

end of thread, other threads:[~2025-09-05 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-05 13:52 [PATCH] [gdb/testsuite] Fix target endianness detection on msys2-ucrt64 Tom de Vries
2025-09-05 15:10 ` Tom de Vries
2025-09-05 15:12 ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox