gdb/patchlist.pl
Michael Matz e7db4ec014 - Rebase to 8.1 release:
* ptype/o prints offsets and sizes of members (like pahole)
  * tab-completion improved: quoting function names is not generally
    necessary anymore, completion offers for breakpoint don't include
    data symbol
  * enable/disable breakpoints now accept ranges: 'disable 1.3-5'
  * new commands:
    - set/show cwd: working directory of debuggee
    - set/show compile-gcc: program to use for 'compile' command
    - starti: start program and stop at first instruction
    - TUI single-key commands: 'i' for stepi and 'o' for nexti
  * --readnever option disables any reading of debug info (for dumping)
  * s390: guarded storage register access for z14
  * gcore option -a dumps all memory mapping
  * C++ breakpoints: 'b foo' will now set a breakpoint on all functions
    and methods named 'foo' no matter the scope.  Use -qualified if you
    don't want that
  * python scripting: new events gdb.new_inferior, gdb.inferior_deleted
    and gdb.new_thread; new command rbreak (breakpoint accepting regexps)
  * gdbserver can be passed environment parameters to remote debuggee
- Added patches from Fedora:
  gdb-ppc64-stwux-tautological-compare.patch
  gdb-rhbz1540559-gdbaddindex-glibcdebug-regression.patch
  gdb-vla-intel-fix-print-char-array.patch
- Removed unused gdb-libstdc++-v3-python-7.1.1-20170526.tar.bz2
- Removed obsolete upstream patches:
  gdb-s390x-1b63490.patch
  gdb-s390x-289e23a.patch
  gdb-s390x-8fe09d7.patch
  gdb-s390x-96235dc.patch

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=177
2018-03-09 16:46:37 +00:00

75 lines
1.8 KiB
Perl

#!/usr/bin/perl
die "need gdb-Fedora directory" unless -d $ARGV[0];
my $gdbFedora = $ARGV[0];
my $dir = `pwd`;
chomp($dir);
system "rm \$(grep \"^Patch[0-9]\\{1,3\\}:\" gdb.spec | awk '{print \$2}') 2>/dev/null";
system "rm *.tar.bz2";
system "cp -p $gdbFedora/*.tar.bz2 ./";
system "pushd $gdbFedora ; sh $dir/patchname_get.sh -v gdb.spec 2>$dir/test.txt; popd";
system "grep \"^Patch\" test.txt > test2.txt";
my @patchliste = `cat test2.txt`;
my @patchdeklarationen = ();
my @patchstatements = ();
my %seenpatches = ();
my $blockcounter = 0;
my @patchcopy = ();
foreach my $line (@patchliste) {
chomp($line);
if ($line =~ /\((.*)\)/) {
$patchname = $1;
if (exists $seenpatches{$patchname}){
my $oldcount = $seenpatches{$patchname};
push @patchstatements, "%patch$oldcount -p1 -R\n";
}
else {
$count = $count + 1;
push @patchdeklarationen, "Patch$count: ". (($count < 10) ? " " : (($count < 100) ? " " : "")) ."$patchname\n";
push @patchstatements, "%patch$count -p1\n";
$seenpatches{$patchname} = $count;
push @patchcopy, $patchname;
}
}
}
foreach my $copy (@patchcopy) {
system "cp \"$gdbFedora/$copy\" ./";
}
open F, ">gdb.spec.new";
foreach my $line (`cat gdb.spec`) {
if ($line eq "#Fedora Packages begin\n") {
print F $line;
$blockcounter = 1;
}
elsif ($line eq "#Fedora Packages end\n") {
$blockcounter = 0;
}
elsif($line eq "#Fedora patching start\n") {
print F $line;
$blockcounter = 3;
}
elsif($line eq "#Fedora patching end\n") {
$blockcounter = 0;
}
if ($blockcounter == 0){
print F $line;
} elsif ($blockcounter == 1) {
print F @patchdeklarationen;
$blockcounter = 2;
} elsif ($blockcounter == 3) {
print F @patchstatements;
$blockcounter = 4;
}
}
close F;
system "mv gdb.spec.new gdb.spec";
system "rm test.txt test2.txt";
system "osc addremove";