From a2e804ad93ef562c299dfad49eb890c8d7d24010 Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Sat, 15 Oct 2016 01:53:44 +0100 Subject: dev revision --- dev/dash.html | 24 +++++++++++++++ dev/gdbc.html | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ dev/git.html | 2 -- dev/index.html | 19 +++++++----- 4 files changed, 132 insertions(+), 10 deletions(-) create mode 100644 dev/dash.html create mode 100644 dev/gdbc.html (limited to 'dev') 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 @@ + + + + + Dash - Script + + + + Development Index +

Dash - Scripting

+ +

Hello World

+

Input / Output

+

Variables

+

Conditions

+ + Development Index +

This is part of the c9-doc Manual. + Copyright (C) 2016 + c9 Team. + See the file Gnu Free Documentation License + for copying conditions.

+ + 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 @@ + + + + + GDB - C + + + + Development Index +

GDB - C

+ +

C program with autotools +

+ +
+        $ touch NEWS README AUTHORS ChangeLog
+        $ mkdir -p src/bin src/lib
+        
+ +

+ GDB Quick Start, + Learning C with GDB + and Memory Layout and the Stack + are great sources of introductory information. +

+ +

To use gdb you need to compile program with -g flag. To + debug a program;

+ +
+        gdb program
+        
+ +

If the program needs arguments you can set it;

+ +
+        (gdb)set args -parameter1 -parameter2
+        
+ +

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.

+ +
+        (gdb) run
+        
+ +
+        n - execute next line
+        s - step in next line
+        b - backtrace
+        info locals
+        print
+        x
+        
+ +

SysCalls

+ +
catch syscall open
+ +

Threads

+ +

When new thread is created you receive + a notification. To get information about + threads;

+ +
+        info threads
+        
+ +

To select thread;

+ +
+        thread 1
+        
+ +

Stopping and Starting + multi-thread programs

+ +
+        break linespec thread threadno
+        
+ +

Strace

+ +
+        strace -c ./program
+        
+ + Development Index +

This is part of the c9-doc Manual. + Copyright (C) 2016 + c9 Team. + See the file Gnu Free Documentation License + for copying conditions.

+ + 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 Gnu Free Documentation License for copying conditions.

- - 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 @@

Shell Script

-

Dash

- - - -

Bash

+

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;

Python

-- cgit 1.4.1-2-gfad0