File: sb2-show.1

package info (click to toggle)
scratchbox2 2.2.4-1debian1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 5,392 kB
  • ctags: 5,239
  • sloc: ansic: 21,734; sh: 4,360; perl: 2,170; cpp: 1,913; makefile: 610; python: 184
file content (172 lines) | stat: -rw-r--r-- 3,857 bytes parent folder | download
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
.TH sb2-show 1 "17 December 2010" "2.2" "sb2-show man page"
.SH NAME
sb2-show \- sb2 diagnostics tool
.SH SYNOPSIS
.B sb2-show [\-b binary_name ] [\-m mode ] [\-f function ] [\-D ] [\-v ] command [parameters] 

.SH DESCRIPTION
.B sb2-show
is a tool for querying and testing what scratchbox2 does "behind the scenes".
.PP
The two most common uses are testing path mapping (commands
.I path
and
.I which
) and finding out how programs are executed (the
.I exec
command). Additionally, there are some commands that are intended to
be used internally by
.I scratchbox2
itself, and not so useful for a normal user.
.PP
.B sb2-show
must be executed inside a scratchbox2 session (see 
.I sb2(1)
for details about creating sessions)

.SH COMMANDS
.B Common commands:
.TP
path [path1] [path2] [pathN]
Show mapping results for listed pathnames
.TP
which [path1] [path2]..
Show mappings of pathnames, a less verbose variant of
the 
.I path
command (useful when using
.I sb2-show
from scripts) 
.TP
exec program_path [arg1] [arg2]..
Show how a program would be executed, together with
environment modifications.
.TP
realcwd
Show real current working directory (Inside a session
.I /bin/pwd
will usually report virtual paths, and this is the only
way to determine the real wroking directory).
.PP
.B Commands for non-interactive use and debugging of scratchbox2:
.TP
exec-cmdline file [argv1] [argv2]..
show execve() modifications on a single line (does not show full
details, useful when using
.I sb2-show
from scripts)
.TP
log-error 'message' 
Add an error message to the logfile
.TP
log-warning 'message' 
Add a warning message to the logfile
.TP
verify-pathlist-mappings required-fix [ignorelist] 
Reads list of paths from stdin and checks that all paths will be mapped to a required prefix.
This is used by
.I sb2-check-pkg-mappings,
(an internal utility).
.TP
execluafile filename
Load and execute Lua code from file.
.TP
binarytype realpath
detect & show type of program at 
.I realpath
(which is an already mapped path)
.TP
var variablename
show value of an internal string variable
.TP
libraryinterface
show preload library interface version (the Lua <-> C code interface)

.TP
qemu-debug-exec file argv0 [argv1] [argv2]..
show command line that can be used to
start target binary under qemu
gdbserver


.SH OPTIONS
.TP
\-v
verbose.
.TP
\-b binary_name
show using binary_name as name of the calling program
.TP
\-f function
show using 
.I function
as callers name (full name of library or system call)
.TP
\-D
Ignore directories while verifying path lists (effective only for the 
.I verify-pathlist-mappings
command)
.TP
\-t
report elapsed time (real time elapsed while executing the command)
.TP
\-x file
Load and execute Lua code from file before executing the command.
Useful for debugging and tuning lua scripts of sb2.
.TP
\-X file
Load and execute Lua code from file after executing the command.
Useful for debugging and tuning lua scripts of sb2.
.TP
\-g port
use port as qemu gdbserver listening port (default port is 1234).
See command
.I qemu-debug-exec 

.SH EXAMPLES
.PP
Show where the /etc directory gets mapped:
.PP
.nf
$ sb2 sb2-show path /etc
/etc => /opt/maemo/tools/etc (readonly)
.fi
.PP
(exact results depend on how 
.I sb2-init
was executed; what mapping mode is the default, etc.)
.PP
Typically, home directories are not mapped:
.PP
.nf
$ sb2 sb2-show path /home/yourname
/home/yourname => /home/yourname
.fi
.PP
In development modes, host-compatible versions of tools are executed:
.PP
.nf
$ sb2 sb2-show exec /bin/ls
File    /bin/ls
Mapped  /opt/maemo/tools/bin/ls (readonly)
argv[0] /bin/ls
 ...
.fi
.PP
But in the emulation mode, only target's executables are used.
Try also:
.PP
.nf
$ sb2 -e sb2-show exec /bin/ls
.fi

.SH SEE ALSO
.BR sb2 (1),
.BR sb2-config (1),
.BR sb2-logz (1),
.BR sb2-init (1)

.SH AUTHOR
.nf
Lauri Aarnio
.fi