summaryrefslogtreecommitdiffstats
path: root/libc/tools
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2011-04-05 19:52:26 -0700
committerJP Abgrall <jpa@google.com>2011-04-05 20:17:34 -0700
commit22b137711a2f262af78611ac57d53ddc1b0e6ff9 (patch)
treeda673e7e122bcbad960a6fbb98abd9cddd262996 /libc/tools
parent5f133f3c4ddd6d43d8da6b3bcccb9a7477dd20b3 (diff)
downloadbionic-22b137711a2f262af78611ac57d53ddc1b0e6ff9.zip
bionic-22b137711a2f262af78611ac57d53ddc1b0e6ff9.tar.gz
bionic-22b137711a2f262af78611ac57d53ddc1b0e6ff9.tar.bz2
checksyscalls fix to handle "__ARM_NR_... (__ARM_NR_BASE+0x...)"
Change-Id: I6a13a6af17caec2e833d4982d645a88ccde4cda4
Diffstat (limited to 'libc/tools')
-rwxr-xr-xlibc/tools/checksyscalls.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/libc/tools/checksyscalls.py b/libc/tools/checksyscalls.py
index f642e84..1b922a3 100755
--- a/libc/tools/checksyscalls.py
+++ b/libc/tools/checksyscalls.py
@@ -86,8 +86,14 @@ def process_nr_line(line,dict):
m = re_arm_nr_line.match(line)
if m:
- #print "%s = %s" % (m.group(1), m.group(2))
- dict["ARM_"+m.group(1)] = int(m.group(2)) + 0x0f0000
+ offset_str = m.group(2)
+ #print "%s = %s" % (m.group(1), offset_str)
+ base = 10
+ if offset_str.lower().startswith("0x"):
+ # Processing something similar to
+ # #define __ARM_NR_cmpxchg (__ARM_NR_BASE+0x00fff0)
+ base = 16
+ dict["ARM_"+m.group(1)] = int(offset_str, base) + 0x0f0000
return
m = re_x86_line.match(line)