~ubuntu-branches/debian/sid/gdb/sid

« back to all changes in this revision

Viewing changes to gdb/syscalls/arm-linux.py

  • Committer: Package Import Robot
  • Author(s): Héctor Orón Martínez, Samuel Bronson
  • Date: 2013-10-08 17:23:45 UTC
  • mfrom: (1.4.13)
  • Revision ID: package-import@ubuntu.com-20131008172345-jeqq67ftpxgq722r
Tags: 7.6.1-1
[ Samuel Bronson ]
* Imported Upstream version 7.6.1
  - GDB 7.6.1 provides the following fixes and improvements to GDB 7.6:
    * PR tdep/15420 (Cannot debug threaded programs on newer versions
      of x86-solaris - Solaris 10, Update 10 or later)
    * PR remote/15455 (QTro remote packet broken)
    * PR build/15476 (Build failure due to incomplete enum type in utils.h)
    * PR server/15594 (tls support in 64x32 x86 gdbserver doesn't extend
      address to 64 bit)
    * PR server/15075 (dprintf inteferes with "next")
    * PR server/15434 (dprintf uses a synchronous 'continue' even in
      non-stop mode)
    * PR tui/14880 (in split register layouts, up results in assertion
      failure in value.c)
    * PR c++/15519 (GDB 7.6 is 94x slower than GDB 7.5.1 using a certain
      core file)
    * PR gdb/15837 (GDB prints entry values for local variables)
    * PR gdb/15415 (gdb resolves symbolic links when passing argv[0])
    * PR cli/15603 (CTRL-C can no longer interrupt inferior)
    * PR gdb/15604 (gdbserver socket leak 7.5 regression)
* Backport ARM Linux `catch syscall' support from my upstream
  patch. (Closes: #709937)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2013 Free Software Foundation, Inc.
 
2
 
 
3
# Copying and distribution of this file, with or without modification,
 
4
# are permitted in any medium without royalty provided the copyright
 
5
# notice and this notice are preserved.  This file is offered as-is,
 
6
# without any warranty.
 
7
 
 
8
import sys
 
9
import re
 
10
import time
 
11
 
 
12
infname = sys.argv[1]
 
13
inf = file(infname)
 
14
 
 
15
print("""\
 
16
<?xml version="1.0"?>
 
17
<!-- Copyright (C) 2009-%s Free Software Foundation, Inc.
 
18
 
 
19
     Copying and distribution of this file, with or without modification,
 
20
     are permitted in any medium without royalty provided the copyright
 
21
     notice and this notice are preserved.  This file is offered as-is,
 
22
     without any warranty. -->
 
23
 
 
24
<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
 
25
 
 
26
<!-- This file was generated using the following file:
 
27
 
 
28
     %s
 
29
 
 
30
     The file mentioned above belongs to the Linux Kernel.
 
31
     Some small hand-edits were made. -->
 
32
 
 
33
<syscalls_info>""" % (time.strftime("%Y"), infname))
 
34
 
 
35
def record(name, number, comment=None):
 
36
    #nm = 'name="%s"' % name
 
37
    #s = '  <syscall %-30s number="%d"/>' % (nm, number)
 
38
    s = '  <syscall name="%s" number="%d"/>' % (name, number)
 
39
    if comment:
 
40
        s += ' <!-- %s -->' % comment
 
41
    print(s)
 
42
 
 
43
for line in inf:
 
44
    m = re.match(r'^#define __NR_(\w+)\s+\(__NR_SYSCALL_BASE\+\s*(\d+)\)',
 
45
                 line)
 
46
    if m:
 
47
        record(m.group(1), int(m.group(2)))
 
48
        continue
 
49
 
 
50
    m = re.match(r'^\s+/\* (\d+) was sys_(\w+) \*/$', line)
 
51
    if m:
 
52
        record(m.group(2), int(m.group(1)), 'removed')
 
53
 
 
54
    m = re.match(r'^#define __ARM_NR_(\w+)\s+\(__ARM_NR_BASE\+\s*(\d+)\)',
 
55
                 line)
 
56
    if m:
 
57
        record('ARM_'+m.group(1), 0x0f0000+int(m.group(2)))
 
58
        continue
 
59
 
 
60
print('</syscalls_info>')