From: Hauke Mehrtens Date: Mon, 1 Aug 2016 19:59:45 +0000 (+0200) Subject: scripts: fix remote-gdb with CONFIG_BUILD_SUFFIX X-Git-Tag: v17.01.0-rc1~1825 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=commitdiff_plain;h=34bffe580675e38010cf2ac23101b63168faa69b scripts: fix remote-gdb with CONFIG_BUILD_SUFFIX Fix the scripts/remote-gdb script when CONFIG_BUILD_SUFFIX is set. CONFIG_BUILD_SUFFIX extends the name of the folder build_dir/target* Signed-off-by: Hauke Mehrtens --- diff --git a/scripts/remote-gdb b/scripts/remote-gdb index 52306639fc..efb321c243 100755 --- a/scripts/remote-gdb +++ b/scripts/remote-gdb @@ -14,7 +14,7 @@ if( opendir SD, "$Bin/../staging_dir" ) { my ( $tid, $arch, $libc, @arches ); - if( $ARGV[1] =~ m!\btarget-(.+?)_(([^/_]+libc|musl)[^/]+)\b!i ) + if( $ARGV[1] =~ m!\btarget-(.+?)_(([^/_]+libc|musl)[^/_]+)\b!i ) { print("Using target $1 ($2)\n"); ($arch, $libc) = ($1, $2); @@ -58,7 +58,7 @@ if( opendir SD, "$Bin/../staging_dir" ) my ( $fh, $fp ) = tempfile(); # Find sysroot - my ($sysroot) = glob("$Bin/../staging_dir/target-${arch}_${libc}/root-*/"); + my ($sysroot) = glob("$Bin/../staging_dir/target-${arch}_${libc}*/root-*/"); print $fh "set sysroot $sysroot\n" if $sysroot; my $cmd = "target extended-remote";