/kernel/branches/kolibri-e/help/sys_funct/f68_main.html |
---|
0,0 → 1,41 |
<html> |
<head> |
<title>Sys. function 70</title> |
<text><b>KolibriOS Help</b></text> |
<text><a href="\help\soft_dev\sys_funct_main.html">[Back to list system function]</a></text> |
<text><a href="\help\sys_funct\f69_main.html"> [Previous page]</a></text> |
<text> [Next page]</text> |
</br> |
<head> |
<body> |
<h2>System function 68 - debugging.</h2> |
<text>A process can load other process as debugged by set of corresponding bit by call to subfunction 7 of function 70.</br> |
A process can have only one debugger; one process can debug some others. The system notifies debugger on events occuring with debugged process.</br> Messages are written to the buffer defined by subfunction 0.</br></text> |
<text>Format of a message:</br> |
+0: dword: message code;</br> |
+4: dword: PID of debugged process;</br> |
+8: there can be additional data depending on message code.</br></br></text> |
<text>Message codes:</br> |
1 = exception in addition dword-number of the exception is given process is suspended;</br> |
2 = process has terminated comes at any termination: both through the system function -1, and at "murder" by any other process (including debugger itself);</br> |
3 = debug exception int 1 = #DB in addition dword-image of the register DR6 is given: bits 0-3: condition of the corresponding breakpoint (set by subfunction 9) is satisfied bit 14: exception has occured because of the trace mode (flag TF is set TF) process is suspended.</br></br></text> |
<text>When debugger terminates, all debugged processes are killed. If debugger does not want this, it must previously detach by |
subfunction 3.</br></br></text> |
<text>All subfunctions are applicable only to processes/threads started from the current by function 70 with set debugging flag. Debugging of multithreaded programs is not supported yet.</br></br></text> |
<text>The full list of subfunctions:</br> |
subfunction 0 - define data area for debug messages</br> |
subfunction 1 - get contents of registers of debugged thread</br> |
subfunction 2 - set contents of registers of debugged thread</br> |
subfunction 3 - detach from debugged process</br> |
subfunction 4 - suspend debugged thread</br> |
subfunction 5 - resume debugged thread</br> |
subfunction 6 - read from the memory of debugged process</br> |
subfunction 7 - write to the memory of debugged process</br> |
subfunction 8 - terminate debugged thread</br> |
subfunction 9 - set/clear hardware breakpoint</br></text> |
</body> |
</html> |
/kernel/branches/kolibri-e/help/sys_funct/f69_main.html |
---|
0,0 → 1,56 |
<html> |
<head> |
<title>Sys. function 69</title> |
<text><b>KolibriOS Help</b></text> |
<text><a href="\help\soft_dev\sys_funct_main.html">[Back to list system function]</a></text> |
<text><a href="\help\sys_funct\f68_main.html"> [Previous page]</text> |
<text><a href="\help\sys_funct\f70_main.html"> [Next page]</a></text> |
</br> |
<head> |
<body> |
<h2>System function 69 - debugging.</h2> |
<text>A process can load other process as debugged by set of corresponding bit by call to subfunction 7 of function 70.</br> |
A process can have only one debugger; one process can debug some others. The system notifies debugger on events occuring with debugged process.</br> Messages are written to the buffer defined by subfunction 0.</br></text> |
<text>Format of a message:</br> |
+0: dword: message code;</br> |
+4: dword: PID of debugged process;</br> |
+8: there can be additional data depending on message code.</br></br> |
</text> |
<text>Message codes:</br> |
1 = exception in addition dword-number of the exception is given process is suspended;</br> |
2 = process has terminated comes at any termination: both through the system function -1, and at "murder" by any other process (including debugger itself);</br> |
3 = debug exception int 1 = #DB in addition dword-image of the register DR6 is given: bits 0-3: condition of the corresponding breakpoint (set by subfunction 9) is satisfied bit 14: exception has occured because of the trace mode (flag TF is set TF) process is suspended.</br></br> |
</text> |
<text>When debugger terminates, all debugged processes are killed. If debugger does not want this, it must previously detach by |
subfunction 3.</br></br> |
</text> |
<text>All subfunctions are applicable only to processes/threads started from the current by function 70 with set debugging flag. Debugging of multithreaded programs is not supported yet.</br></br> |
</text> |
<text>The full list of subfunctions:</br> |
subfunction 0 - define data area for debug messages</br> |
subfunction 1 - get contents of registers of debugged thread</br> |
subfunction 2 - set contents of registers of debugged thread</br> |
subfunction 3 - detach from debugged process</br> |
subfunction 4 - suspend debugged thread</br> |
subfunction 5 - resume debugged thread</br> |
subfunction 6 - read from the memory of debugged process</br> |
subfunction 7 - write to the memory of debugged process</br> |
subfunction 8 - terminate debugged thread</br> |
subfunction 9 - set/clear hardware breakpoint</br></br> |
</text> |
<text>Value for register eax - 69 (SF_DEBUG).</br> |
Values for register ebx:</br> |
0 - SSF_SET_MESSAGE_AREA - subfunction 0 - define data area fror debug messages.</br> |
1 - SSF_GET_REGISTERS - subfunction 1 - Get contents of registers of debugged thread.</br> |
2 - SSF_SET_REGISTERS - subfunction 2 - Set contents of registers of debugged thread.</br> |
3 - SSF_DETACH - subfunction 3 - detach from debugged process.</br> |
4 - SSF_SUSPEND - subfunction 4 - suspend debugged thread.</br> |
5 - SSF_RESUME - subfunction 5 - resume debugged thread.</br> |
6 - SSF_READ_MEMORY - subfunction 6 - read from memory of debugged process.<br> |
7 - SSF_WRITE_MEMORY - subfunction 7 - write to memory of debugged process.</br> |
8 - SSF_TERMINATE - subfunction 8 - terminate debugged thread.</br> |
9 - SSF_DEFINE_BREAKPOINT - subfunction 9 - set/clear hardware breakpoint. |
</text> |
<text>created 23.08.2020 by Alex2003</text> |
</body> |
</html> |
/kernel/branches/kolibri-e/help/sys_funct/f70_main.html |
---|
0,0 → 1,81 |
<html> |
<head> |
<title>Sys. function 70</title> |
<text><b>KolibriOS Help</b></text> |
<text><a href="\help\soft_dev\sys_funct_main.html">[Back to list system function]</a></text> |
<text><a href="\help\sys_funct\f69_main.html"> [Previous page]</a></text> |
<text> [Next page]</text> |
</br> |
<head> |
<body> |
<h2>System function 70 - Work with file system with long names support</h2> |
<text>Parameters:</br> |
Register eax = 70</br> |
Register ebx = pointer to the information structure</br> |
Returned value:</br> |
Register eax = 0 - success; otherwise file system error code some subfunctions return value in other registers too.</br> |
General format of the information structure:</br> |
+0: dword: subfunction number</br> |
+4: dword: offset in file or folder</br> |
+8: dword: higher part of offset or flags</br> |
+12 = +0xC: dword: size of data</br> |
+16 = +0x10: dword: pointer to data</br> |
+20 = +0x14: ?: path - zero terminated string</br> |
or</br> |
+20 = +0x14: byte: 0</br> |
+21 = +0x15: dword: pointer to string</br> |
Case sensitivity depends on filesystem.</br> |
If a path not begins with '/', it is considered a relative.</br> |
To get or set the current folder, use the sysfunction 30.</br> |
'../' in the path means a lift by one folder relatively current folder.</br> |
To set the encoding, put at the start of the string a byte with next values:</br> |
1 = cp866</br> |
2 = UTF-16LE</br> |
3 = UTF-8</br> |
otherwise will be used cp866. In an absolute path you may put this byte after the '/' or put an additional '/' before it.</br> |
Also, you may use the sysfunction 80.</br> |
Format of an absolute path: /base/number/dir1/dir2/.../dirn/file, where base/number identifies device, on which file is located:</br> |
RD/1 = ramdisk</br> |
FD/1 = first floppy drive, FD/2 = second floppy drive</br> |
HD0/x, HD1/x, HD2/x, HD3/x = hard drives accordingly on IDE0 (Primary Master), IDE1 (Primary Slave), IDE2 (Secondary Master), IDE3 (Secondary Slave); x - partition number on the selected hard drive, starts from 1</br> |
CD0/1, CD1/1, CD2/1, CD3/1 = same for cd</br> |
SYS = system folder (encoding inaffected key), second key may be set by sysfunction 30.3.</br> |
Examples:</br> |
'/sys/example.asm',0</br> |
'/rd/1/example.asm',0</br> |
'/HD0/1/folder/file.txt',0</br> |
'/hd2/2/pics/tanzania.bmp',0</br> |
2,'/',0,'sys','/',0,'F',0,'I',0,'L',0,'E',0,0,0</br></br> |
Available subfunctions:</br> |
subfunction 0 - read file</br> |
subfunction 1 - read folder</br> |
subfunction 2 - create/rewrite file</br> |
subfunction 3 - write to existing file</br> |
subfunction 4 - set file size</br> |
subfunction 5 - get attributes of file/folder</br> |
subfunction 6 - set attributes of file/folder</br> |
subfunction 7 - start application</br> |
subfunction 8 - delete file/folder</br> |
subfunction 9 - create folder</br> |
For CD-drives due to hardware limitations only subfunctions 0,1,5 and 7 are available, other subfunctions return error with code 2.</br> |
At the first call of subfunctions 0,1,5,7 to ATAPI devices(CD and DVD) the manual control of tray is locked due to caching drive data. Unlocking is made when subfunction 4 of function 24 is called for corresponding device.</br> |
</br> |
Value for register eax - 70 (SF_FILE).</br> |
Values for register ebx:</br> |
0 - SSF_READ_FILE - subfunction 0 - read file with long names support.</br> |
1 - SSF_READ_FOLDER - subfunction 1 - read folder with long names support.</br> |
2 - SSF_CREATE_FILE - subfunction 2 - create/rewrite file with long names support.</br> |
3 - SSF_WRITE_FILE - subfunction 3 - write to existing file with long names support.</br> |
4 - SSF_SET_END - subfunction 4 - set end of file.</br> |
5 - SSF_GET_INFO - subfunction 5 - get information on file/folder.</br> |
6 - SSF_SET_INFO - subfunction 6 - set attributes of file/folder.</br> |
7 - SSF_START_APP - subfunction 7 - start application.</br> |
8 - SSF_DELETE - subfunction 8 - delete file/folder.</br> |
9 - SSF_CREATE_FOLDER - subfunction 9 - create folder.</br> |
</text> |
</body> |
</html> |