Lines Matching +full:target +full:- +full:module

2 # SPDX-License-Identifier: GPL-2.0-only
22 'cross-compile|c=s' => \$cross_compile,
23 'module|m=s' => \$modulefile,
28 my $kerver = `uname -r`;
37 my $target = "0";
39 my $module = "";
49 if ($line =~ /EAX: ([0-9a-f]+) EBX: ([0-9a-f]+) ECX: ([0-9a-f]+) EDX: ([0-9a-f]+)/) {
55 if ($line =~ /ESI: ([0-9a-f]+) EDI: ([0-9a-f]+) EBP: ([0-9a-f]+) ESP: ([0-9a-f]+)/) {
60 if ($line =~ /RAX: ([0-9a-f]+) RBX: ([0-9a-f]+) RCX: ([0-9a-f]+)/) {
65 if ($line =~ /RDX: ([0-9a-f]+) RSI: ([0-9a-f]+) RDI: ([0-9a-f]+)/) {
70 if ($line =~ /RBP: ([0-9a-f]+) R08: ([0-9a-f]+) R09: ([0-9a-f]+)/) {
74 if ($line =~ /R10: ([0-9a-f]+) R11: ([0-9a-f]+) R12: ([0-9a-f]+)/) {
79 if ($line =~ /R13: ([0-9a-f]+) R14: ([0-9a-f]+) R15: ([0-9a-f]+)/) {
104 if ($line =~ /([0-9a-zA-Z\,\%\(\)\-\+]+)$/) {
116 $clobber =~ s/\([a-z0-9\%\,]+\)//g;
158 if ($line =~ /EIP: 0060:\[\<([a-z0-9]+)\>\]/) {
159 $target = $1;
161 if ($line =~ /RIP: 0010:\[\<([a-z0-9]+)\>\]/) {
162 $target = $1;
164 if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a-f0-9]/) {
168 …if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+0x([0-9a-f]+)\/0x[a
173 # check if it's a module
174 if ($line =~ /EIP is at ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]+\W\[([a-zA-Z0-9\_\-]+)\]/) {
175 $module = $3;
177 …f ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\] \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-
178 $module = $3;
183 my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset");
184 my $decodestop = Math::BigInt->from_hex("0x$target") + 8192;
185 if ($target eq "0") {
190 # if it's a module, we need to find the .ko file and calculate a load offset
191 if ($module ne "") {
193 $modulefile = `modinfo -F filename $module`;
198 print "Module .ko file for $module not found. Aborting\n";
201 # ok so we found the module, now we need to calculate the vma offset
202 open(FILE, $cross_compile."objdump -dS $filename |") || die "Cannot start objdump";
204 if ($_ =~ /^([0-9a-f]+) \<$function\>\:/) {
206 …$vmaoffset = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$fu") - Math::BigInt-
214 my $center = -1;
219 my ($address, $target) = @_;
221 my $ta = "0x".$target;
222 my $delta = Math::BigInt->from_hex($ad) - Math::BigInt->from_hex($ta);
224 if (($delta > -4096) && ($delta < 4096)) {
235 open(FILE, $cross_compile."objdump -dS --adjust-vma=$vmaoffset --start-address=$decodestart --stop-
241 if ($line =~ /^([a-f0-9]+)\:/) {
242 if (InRange($1, $target)) {
248 if ($line =~ /^([a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]+)\:/) {
250 if (!InRange($val, $target)) {
253 if ($val eq $target) {
270 if ($center == -1) {
284 $start = $start - 1;
286 if ($line =~ /^([a-f0-9]+)\:/) {
306 if ($line =~ /^([a-f0-9]+)\:/) {
330 $reglines[$i] = process_x86_regs($lines[$i], $center - $i);
331 $i = $i - 1;
344 my $c = 60 - length($line);
345 while ($c > 0) { print " "; $c = $c - 1; };
349 print "<--- faulting instruction";
361 -c, --cross-compile CROSS_COMPILE Specify the prefix used for toolchain.
362 -m, --module MODULE_DIRNAME Specify the module filename.
363 -h, --help Help.