Skip to content

Commit

Permalink
scripts/checkstack.pl: fix arm sp regex
Browse files Browse the repository at this point in the history
if objdump has below entries;
c01ed608 <X>:
c01ed614:       e24ddff7        sub     sp, sp, torvalds#120    ; 0x78

c01f0d50 <Y>:
c01f0d50:       e24dd094        sub     sp, sp, torvalds#140    ; 0x8c

scripts fails to read stack usage.
so making regex $re for ARM similar to aarch64

Co-developed-by: Vaneet Narang <[email protected]>
Signed-off-by: Vaneet Narang <[email protected]>
Signed-off-by: Maninder Singh <[email protected]>
Signed-off-by: Masahiro Yamada <[email protected]>
  • Loading branch information
maninder42 authored and masahir0y committed May 25, 2020
1 parent 3311eee commit 6ce16f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/checkstack.pl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
$dre = qr/^.*sub.*sp, sp, #(0x$x{1,8})/o;
} elsif ($arch eq 'arm') {
#c0008ffc: e24dd064 sub sp, sp, #100 ; 0x64
$re = qr/.*sub.*sp, sp, #(([0-9]{2}|[3-9])[0-9]{2})/o;
$re = qr/.*sub.*sp, sp, #([0-9]{1,4})/o;
$sub = \&arm_push_handling;
} elsif ($arch =~ /^x86(_64)?$/ || $arch =~ /^i[3456]86$/) {
#c0105234: 81 ec ac 05 00 00 sub $0x5ac,%esp
Expand Down

0 comments on commit 6ce16f2

Please sign in to comment.