Hui Zhu ef2b9b0545 markup_oops.pl: fix $func_offset error with x86_64
When I use markup_oops.pl parse a x8664 oops, I got:

objdump: --start-address: bad number: NaN
No matching code found
This is because:
main::(./m.pl:228):	open(FILE, "objdump -dS --adjust-vma=$vmaoffset --start-address=$decodestart --stop-address=$decodestop $filename |") || die "Cannot start objdump";
  DB<3> p $decodestart
NaN

This NaN is from:
main::(./m.pl:176):	my $decodestart = Math::BigInt->from_hex("0x$target") - Math::BigInt->from_hex("0x$func_offset");
  DB<2> p $func_offset
0x175

There is already a "0x" in $func_offset, another 0x makes it a NaN.

The $func_offset is from line:

	if ($line =~ /RIP: 0010:\[\<[0-9a-f]+\>\]  \[\<[0-9a-f]+\>\] ([a-zA-Z0-9\_]+)\+(0x[0-9a-f]+)\/0x[a-f0-9]/) {
		$function = $1;
		$func_offset = $2;
	}

I make a patch to change "(0x[0-9a-f]+)\/0x[a-f0-9]/)" to "0x([0-9a-f]+)\/0x[a-f0-9]/)".

Signed-off-by: Hui Zhu <teawater@gmail.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-02-02 18:11:22 -08:00
..
2009-12-12 13:08:16 +01:00
2005-04-16 15:20:36 -07:00
2009-06-27 00:17:48 +02:00
2005-04-16 15:20:36 -07:00
2007-12-17 19:28:17 -08:00
2008-10-22 21:53:49 -07:00
2006-07-03 23:30:54 +02:00
2008-07-25 22:12:41 +02:00
2009-06-09 22:37:54 +02:00
2009-09-15 17:04:38 -07:00
2008-04-25 20:18:48 +02:00
2008-04-25 20:18:48 +02:00
2009-09-18 21:22:08 +02:00
2005-04-16 15:20:36 -07:00
2009-06-09 22:37:54 +02:00