File: gdbinit

package info (click to toggle)
snd 26.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 44,028 kB
  • sloc: ansic: 291,903; lisp: 260,506; ruby: 71,134; sh: 3,293; fortran: 2,342; csh: 1,067; makefile: 294; cpp: 294; python: 87; xml: 27; javascript: 1
file content (80 lines) | stat: -rw-r--r-- 1,581 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
define s7print
print s7_object_to_c_string(cur_sc, $arg0)
end
document s7print
interpret the argument as an s7 value and display it
end

# the current expression is sc->cur_code
# the current environment is sc->envir
# the error environment is sc->owlet
# so for example, to see the current local variables, s7p sc->envir
# source ~/.gdbinit reloads

# set print elements 123123 in gdb to get full string

define s7eval
print s7_object_to_c_string(cur_sc, s7_eval_c_string(cur_sc, $arg0))
end
document s7eval
eval the argument (a string)
end


define s7stack
print s7_object_to_c_string(cur_sc, s7_stacktrace(sc))
end
document s7stack
display the currently active local environments
end


define s7value
print s7_object_to_c_string(cur_sc, s7_name_to_value(cur_sc, $arg0))
# print s7_object_to_c_string(cur_sc, s7_eval_c_string(cur_sc, $arg0))
end
document s7value
print the value of the symbol passed as a string: s7val "*features*"
end


define s7let
print s7_show_let(cur_sc)
end
document s7let
show all non-global variables that are currently accessible
end


define s7history
print s7_show_history(cur_sc)
end
document s7history
show the entries in the history buffer
end

define s7crawl
print s7_show_stack(cur_sc)
end
document s7history
show the ops in the stack
end


define s7bt
set logging overwrite on
set logging redirect on
set logging enabled on
if $argc == 1
  bt $arg0
end
if $argc == 0
  bt
end
set logging enabled off
# now gdb.txt has the backtrace
print s7_decode_bt(cur_sc)
end
document s7bt
print a C backtrace with s7 objects decoded as much as possible
end