script/remote-gdb: enable and keep command history
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 18 Sep 2014 09:29:44 +0000 (09:29 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 18 Sep 2014 09:29:44 +0000 (09:29 +0000)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42609 3c298f89-4303-0410-b956-a3cf2f4a3e73

scripts/remote-gdb

index 380a225..98ec768 100755 (executable)
@@ -65,6 +65,11 @@ if( opendir SD, "$Bin/../staging_dir" )
                -f $ARGV[0] and $cmd = "core-file";
                print $fh "$cmd $ARGV[0]\n";
 
+               # History settings
+               print $fh "set history filename $Bin/../tmp/.gdb_history\n";
+               print $fh "set history size 100000000\n";
+               print $fh "set history save on\n";
+
                my $file = -f "$sysroot/$ARGV[1]" ? "$sysroot/$ARGV[1]" : $ARGV[1];
                system($gdb, '-x', $fp, $file);