diff options
Diffstat (limited to 'dev')
-rw-r--r-- | dev/dash.html | 24 | ||||
-rw-r--r-- | dev/gdbc.html | 97 | ||||
-rw-r--r-- | dev/git.html | 2 | ||||
-rw-r--r-- | dev/index.html | 19 |
4 files changed, 132 insertions, 10 deletions
diff --git a/dev/dash.html b/dev/dash.html new file mode 100644 index 0000000..0329559 --- /dev/null +++ b/dev/dash.html @@ -0,0 +1,24 @@ +<!DOCTYPEhtml> +<htmldir="ltr" lang="en"> +<head> + <meta charset='utf-8'> + <title>Dash - Script</title> +</head> +<body> + + <a href="index.html">Development Index</a> + <h1>Dash - Scripting</h1> + + <h2 id="hello">Hello World</h2> + <h2 id="io">Input / Output</h2> + <h2 id="var">Variables</h2> + <h2 id="if">Conditions</h2> + + <a href="index.html">Development Index</a> + <p>This is part of the c9-doc Manual. + Copyright (C) 2016 + c9 Team. + See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a> + for copying conditions.</p> +</body> +</html> diff --git a/dev/gdbc.html b/dev/gdbc.html new file mode 100644 index 0000000..f5b2c74 --- /dev/null +++ b/dev/gdbc.html @@ -0,0 +1,97 @@ +<!DOCTYPE html> +<html dir="ltr" lang="en"> + <head> + <meta charset='utf-8'> + <title>GDB - C</title> + </head> + <body> + + <a href="index.html">Development Index</a> + <h1>GDB - C</h1> + + <p><a href="http://blog.fourthbit.com/2013/06/18/creating-an-open-source-program-in-c-with-autotools-part-1-of-2/">C program with autotools</a> + </p> + + <pre> + $ touch NEWS README AUTHORS ChangeLog + $ mkdir -p src/bin src/lib + </pre> + + <p> + <a href="http://web.eecs.umich.edu/~sugih/pointers/gdbQS.html">GDB Quick Start</a>, + <a href="https://www.hackerschool.com/blog/5-learning-c-with-gdb">Learning C with GDB</a> + and <a href="http://www.dirac.org/linux/gdb/02a-Memory_Layout_And_The_Stack.php">Memory Layout and the Stack</a> + are great sources of introductory information.</a> + </p> + + <p>To use gdb you need to compile program with -g flag. To + debug a program;</p> + + <pre> + gdb program + </pre> + + <p>If the program needs arguments you can set it;</p> + + <pre> + (gdb)set args -parameter1 -parameter2 + </pre> + + <p>To start the program you can type run, this way gdb + will try to run the program until the end. If program + crash, gdb will stop it for debuging.</p> + + <pre> + (gdb) run + </pre> + + <pre> + n - execute next line + s - step in next line + b - backtrace + info locals + print + x + </pre> + + <h2>SysCalls</h2> + + <pre>catch syscall open</pre> + + <h2>Threads</h2> + + <p>When new thread is created you receive + a notification. To get information about + threads;</p> + + <pre> + info threads + </pre> + + <p>To select thread;</p> + + <pre> + thread 1 + </pre> + + <p><a href=" http://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_39.html#SEC40">Stopping and Starting</a> + multi-thread programs</p> + + <pre> + break linespec thread threadno + </pre> + + <h2>Strace</h2> + + <pre> + strace -c ./program + </pre> + + <a href="index.html">Development Index</a> + <p>This is part of the c9-doc Manual. + Copyright (C) 2016 + c9 Team. + See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a> + for copying conditions.</p> + </body> +</html> diff --git a/dev/git.html b/dev/git.html index 3e5f4c1..5d65b32 100644 --- a/dev/git.html +++ b/dev/git.html @@ -280,7 +280,5 @@ c9 Team. See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a> for copying conditions.</p> - - </body> </html> diff --git a/dev/index.html b/dev/index.html index cd314f9..3d20e72 100644 --- a/dev/index.html +++ b/dev/index.html @@ -37,17 +37,20 @@ </ul> <h2>Shell Script</h2> - <h3 id="bash">Dash</h3> - <ul> - <li>Dash</li> - </ul> - - - <h3 id="bash">Bash</h3> + <p>Script files that start with "#!/bin/sh" use dash (in crux), + /bin/sh is a link to dash, while files that start with "#!/bin/bash" + use bash;</p> <ul> - <li>Bash</li> + <li><a href="dash.html">Dash - Scripting</a> + <ul> + <li><a href="dash.html#hello">Hello World</a></li> + <li><a href="dash.html#io">Input / Output</a></li> + <li><a href="dash.html#var">Variables</a></li> + <li><a href="dash.html#if">Conditions</a></li> + </ul> + </li> </ul> <h2>Python</h2> |