
Appendix D. gdb Remote Serial Protocol
347
D.7.10.11. system
Synopsis:
int system(const char *command);
Request:
Fsystem,commandptr/len
Return value:
The value returned is -1 on error and the return status
of the command otherwise.
Only the exit status of the
command is returned, which is extracted from the hosts
system return value by calling WEXITSTATUS(retval).
In case /bin/sh could not be executed, 127 is returned.
Errors:
EINTR
The call was interrupted by the user.
D.7.11. Protocol specific representation of datatypes
D.7.11.1. Integral datatypes
The integral datatypes used in the system calls are
int, unsigned int, long, unsigned long, mode_t and time_t
Int
,
unsigned int
,
mode_t
and
time_t
are implemented as 32 bit values in this protocol.
Long
and
unsigned long
are implemented as 64 bit types.
Refer to Section D.7.12.5
Limits
, for corresponding MIN and MAX values (similar to those in
limits.h
) to allow range checking on host and target.
time_t
datatypes are defined as seconds since the Epoch.
All integral datatypes transferred as part of a memory read or write of a structured datatype e.g. a
struct stat
have to be given in big endian byte order.
D.7.11.2. Pointer values
Pointers to target data are transmitted as they are. An exception is made for pointers to buffers for
which the length isn’t transmitted as part of the function call, namely strings. Strings are transmitted
as a pointer/length pair, both as hex values, e.g.
1aaf/12
Summary of Contents for ENTERPRISE LINUX 3 - SECURITY GUIDE
Page 1: ...Red Hat Enterprise Linux 3 Debugging with gdb ...
Page 12: ...2 Chapter 1 Debugging with gdb ...
Page 28: ...18 Chapter 4 Getting In and Out of gdb ...
Page 34: ...24 Chapter 5 gdb Commands ...
Page 44: ...34 Chapter 6 Running Programs Under gdb ...
Page 68: ...58 Chapter 8 Examining the Stack ...
Page 98: ...88 Chapter 10 Examining Data ...
Page 112: ...102 Chapter 12 Tracepoints ...
Page 118: ...108 Chapter 13 Debugging Programs That Use Overlays ...
Page 138: ...128 Chapter 14 Using gdb with Different Languages ...
Page 144: ...134 Chapter 15 Examining the Symbol Table ...
Page 170: ...160 Chapter 19 Debugging remote programs ...
Page 198: ...188 Chapter 21 Controlling gdb ...
Page 204: ...194 Chapter 22 Canned Sequences of Commands ...
Page 206: ...196 Chapter 23 Command Interpreters ...
Page 216: ...206 Chapter 25 Using gdb under gnu Emacs ...
Page 296: ...286 Chapter 27 gdb Annotations ...
Page 300: ...290 Chapter 28 Reporting Bugs in gdb ...
Page 322: ...312 Chapter 30 Using History Interactively ...
Page 362: ...352 Appendix D gdb Remote Serial Protocol ...
Page 380: ...370 Appendix F GNU GENERAL PUBLIC LICENSE ...
Page 386: ...376 Appendix G GNU Free Documentation License ...
Page 410: ......