[source] scripts: fix remote-gdb with CONFIG_BUILD_SUFFIX

LEDE Commits lede-commits at lists.infradead.org
Mon Aug 1 13:04:55 PDT 2016


hauke pushed a commit to source.git, branch master:
https://git.lede-project.org/?p=source.git;a=commitdiff;h=34bffe580675e38010cf2ac23101b63168faa69b

commit 34bffe580675e38010cf2ac23101b63168faa69b
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Mon Aug 1 21:59:45 2016 +0200

    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 <hauke at hauke-m.de>
---
 scripts/remote-gdb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/remote-gdb b/scripts/remote-gdb
index 5230663..efb321c 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";



More information about the lede-commits mailing list