{
my ( $tid, $arch, $libc, @arches );
- if( $ARGV[1] =~ m!\btarget-([^_/]+)_([^_/]+)\b! )
+ if( $ARGV[1] =~ m!\btarget-(.+?)_([^_]+libc[^_/]+)\b!i )
{
print("Using target $1 ($2)\n");
($arch, $libc) = ($1, $2);
closedir SD;
# Find gdb
- my ($gdb) = glob("$Bin/../staging_dir/toolchain-${arch}_*_${libc}/bin/*-gdb");
-
+ my ($gdb) = glob("$Bin/../staging_dir/toolchain-${arch}_*_${libc}*/bin/*-gdb");
if( defined($gdb) && -x $gdb )
{
my ( $fh, $fp ) = tempfile();