Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1178)

Unified Diff: gdb/syscalls/arm-linux.py

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/syscalls/amd64-linux.xml ('k') | gdb/syscalls/arm-linux.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/syscalls/arm-linux.py
diff --git a/gdb/syscalls/arm-linux.py b/gdb/syscalls/arm-linux.py
new file mode 100644
index 0000000000000000000000000000000000000000..0814dd4e85cfe192df978e844b02c5776f2a4159
--- /dev/null
+++ b/gdb/syscalls/arm-linux.py
@@ -0,0 +1,60 @@
+# Copyright (C) 2013 Free Software Foundation, Inc.
+
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved. This file is offered as-is,
+# without any warranty.
+
+import sys
+import re
+import time
+
+infname = sys.argv[1]
+inf = file(infname)
+
+print("""\
+<?xml version="1.0"?>
+<!-- Copyright (C) 2009-%s Free Software Foundation, Inc.
+
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. This file is offered as-is,
+ without any warranty. -->
+
+<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
+
+<!-- This file was generated using the following file:
+
+ %s
+
+ The file mentioned above belongs to the Linux Kernel.
+ Some small hand-edits were made. -->
+
+<syscalls_info>""" % (time.strftime("%Y"), infname))
+
+def record(name, number, comment=None):
+ #nm = 'name="%s"' % name
+ #s = ' <syscall %-30s number="%d"/>' % (nm, number)
+ s = ' <syscall name="%s" number="%d"/>' % (name, number)
+ if comment:
+ s += ' <!-- %s -->' % comment
+ print(s)
+
+for line in inf:
+ m = re.match(r'^#define __NR_(\w+)\s+\(__NR_SYSCALL_BASE\+\s*(\d+)\)',
+ line)
+ if m:
+ record(m.group(1), int(m.group(2)))
+ continue
+
+ m = re.match(r'^\s+/\* (\d+) was sys_(\w+) \*/$', line)
+ if m:
+ record(m.group(2), int(m.group(1)), 'removed')
+
+ m = re.match(r'^#define __ARM_NR_(\w+)\s+\(__ARM_NR_BASE\+\s*(\d+)\)',
+ line)
+ if m:
+ record('ARM_'+m.group(1), 0x0f0000+int(m.group(2)))
+ continue
+
+print('</syscalls_info>')
« no previous file with comments | « gdb/syscalls/amd64-linux.xml ('k') | gdb/syscalls/arm-linux.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698