~ubuntu-branches/ubuntu/maverick/uim/maverick

« back to all changes in this revision

Viewing changes to sigscheme/tools/scm-obj-compact-gdbinit

  • Committer: Bazaar Package Importer
  • Author(s): Masahito Omote
  • Date: 2008-06-25 19:56:33 UTC
  • mfrom: (3.1.18 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080625195633-8jljph4rfq00l8o7
Tags: 1:1.5.1-2
* uim-tcode: provide tutcode-custom.scm, tutcode-bushudic.scm
  and tutcode-rule.scm (Closes: #482659)
* Fix FTBFS: segv during compile (Closes: #483078).
  I personally think this bug is not specific for uim but is a optimization
  problem on gcc-4.3.1. (https://bugs.freedesktop.org/show_bug.cgi?id=16477)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file defines handy gdb macros
 
2
# To use it, add this line to your ~/.gdbinit or
 
3
# source this file.
 
4
 
 
5
define scm_immp
 
6
  set $ptr = ($arg0)
 
7
  set $tag = ((((unsigned int)($ptr)) & (0x3 << 1)) >> 1)
 
8
 
 
9
  if $tag == 0x3
 
10
    if ((((unsigned int)($ptr)) & 0xe) == 0x6)
 
11
      printf "this is : Integer\n"
 
12
    end
 
13
    if ((((unsigned int)($ptr)) & 0x1e) == 0xe)
 
14
      printf "this is : Char\n"
 
15
    end
 
16
 
 
17
    if ((((unsigned int)($ptr)) & 0xfe) == 0x1e)
 
18
      printf "this is : SCM_NULL\n"
 
19
    end
 
20
    if ((((unsigned int)($ptr)) & 0xfe) == 0x3e)
 
21
      printf "this is : SCM_INVALID\n"
 
22
    end
 
23
    if ((((unsigned int)($ptr)) & 0xfe) == 0x5e)
 
24
      printf "this is : SCM_UNBOUND\n"
 
25
    end
 
26
    if ((((unsigned int)($ptr)) & 0xfe) == 0x7e)
 
27
      printf "this is : SCM_TRUE\n"
 
28
    end
 
29
    if ((((unsigned int)($ptr)) & 0xfe) == 0x9e)
 
30
      printf "this is : SCM_FALSE\n"
 
31
    end
 
32
    if ((((unsigned int)($ptr)) & 0xfe) == 0xbe)
 
33
      printf "this is : SCM_EOF\n"
 
34
    end
 
35
    if ((((unsigned int)($ptr)) & 0xfe) == 0xde)
 
36
      printf "this is : SCM_UNDEF\n"
 
37
    end
 
38
  end
 
39
end
 
40
 
 
41
 
 
42
define p_car
 
43
  set $ptr = ((ScmObj)(((unsigned int)($arg0)) & (~0U << 3)))
 
44
  set $car = ((ScmObj)$ptr)->car
 
45
  p $car
 
46
  scm_immp $car
 
47
end
 
48
 
 
49
define p_cdr
 
50
  set $ptr = ((ScmObj)(((unsigned int)($arg0)) & (~0U << 3)))
 
51
  set $cdr = ((ScmObj)$ptr)->cdr
 
52
  p $cdr
 
53
  scm_immp $cdr
 
54
end
 
55
 
 
56
define p_obj
 
57
  p ($arg0)
 
58
  scm_immp ($arg0)
 
59
 
 
60
  p_car ($arg0)
 
61
  p_cdr ($arg0)
 
62
end