about summary refs log tree commit diff stats
path: root/dev/c/debugging.html
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2018-03-07 16:58:05 +0000
committerSilvino Silva <silvino@bk.ru>2018-03-07 16:58:05 +0000
commit21613ef6f34273fd50876f153f9899dab7eccada (patch)
treef845452c5630882fb74e42b1ac6780ca48ac1bbb /dev/c/debugging.html
parent5d7a23e5d38048d72243a18b60b6f5f7f3d805d2 (diff)
downloaddoc-21613ef6f34273fd50876f153f9899dab7eccada.tar.gz
dev c added datatypes and debugging
Diffstat (limited to 'dev/c/debugging.html')
-rw-r--r--dev/c/debugging.html67
1 files changed, 67 insertions, 0 deletions
diff --git a/dev/c/debugging.html b/dev/c/debugging.html
new file mode 100644
index 0000000..d1f425b
--- /dev/null
+++ b/dev/c/debugging.html
@@ -0,0 +1,67 @@
+<!DOCTYPE html>
+<html dir="ltr" lang="en">
+    <head>
+        <meta charset='utf-8'>
+        <title>Debugging</title>
+    </head>
+    <body>
+        <a href="../index.html">Development Index</a>
+
+        <h1>Debugging</h1>
+
+        <p>If the program needs arguments you can set it;</p>
+
+        <pre>
+        (gdb)set args -parameter1 -parameter2
+        </pre>
+
+
+        <pre>
+        b - backtrace
+        info locals
+        print
+        x
+        catch syscall open
+        </pre>
+
+        <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>
+
+        <pre>
+        break linespec thread threadno
+        </pre>
+
+        <pre>
+        strace -c ./program
+        </pre>
+
+
+        <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>
+        <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 href="http://ftp.gnu.org/old-gnu/Manuals/gdb/html_node/gdb_39.html#SEC40">Stopping and Starting</a>
+        multi-thread programs</p>
+
+        <a href="../index.html">Development Index</a>
+
+        <p>
+        This is part of the c9-doc Manual.
+        Copyright (C) 2018
+        c9 team.
+        See the file <a href="../../fdl-1.3-standalone.html">Gnu Free Documentation License</a>
+        for copying conditions.</p>
+    </body>
+</html>