Thursday, December 3, 2009

Debugging Note

- gcc
- gdb
- ddd
- xdebug (for PHP)
- cflow (for C)

- GNU GLOBAL 是類似於 ctags 的工具,用以建立 source code 符號定義位置的 database 。除了符號定義之外,global 還建立符號 xref (cross reference) 的 database ,用以快速查詢 xref 的位置,是個很方便的設計。
http://heaven.branda.to/~thinker/GinGin_CGI.py/show_id_doc/258

- ctags

- sTrace

- kTrace

- dtrace (the best)
===========================================
- FireBug
- yslow
- FirePHP
===========================================
- kcachegrind:  (Call Graph Viewer)
===========================================
- Source Code Analysis
- Memory Dump Analysis
- core dump
- stack trace
- back trace

- Debugger
- Disassembler
- Decompiler

- Unit Test
- PHPUnit

- debugging
- tracing
- profiling
- benchmarking

- performance
- optimization

- profiler: Profiling: Objective Analysis "Profiling" means running your code in a controlled environment to see what actually happens, not what you think happens.
===========================================
- segmentation fault
- Memory leak
- memory corruption
- stack corruption
===========================================
- IDA Pro
- SoftIce
- Syser Debugger
===========================================
- Gray Hat Python: Python Programming for Hackers and Reverse Engineers
===========================================
- http://securitytube.net/
- http://en.wikipedia.org/wiki/Stack_%28data_structure%29
- http://en.wikipedia.org/wiki/Virtual_memory
- http://en.wikipedia.org/wiki/Address_space_layout_randomization
- http://en.wikipedia.org/wiki/Processor_register
===========================================
http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/


http://www.cprogramming.com/debugging/segfaults.html

http://www.cprogramming.com/debuggers.html

http://www.cprogramming.com/tutorial/binarysearchchallenge.html

http://www.cprogramming.com/gdbtutorial.html

http://www.cprogramming.com/debugging/segfaults.html

http://www.cprogramming.com/debugging/debugging_strategy.html

http://www.cprogramming.com/debugging/valgrind.html

http://www.cprogramming.com/compilingandlinking.html

http://www.cprogramming.com/tutorial/compiler_warnings.html

http://www.cprogramming.com/tutorial/lesson6.html

http://www.cprogramming.com/tutorial/dynamic_memory_allocation.html

http://cprogramming.com/tutorial/secure.html

http://www.cprogramming.com/tutorial.html

http://en.wikipedia.org/wiki/SIGSEGV

search: malloc strcat experts-exchange

search: stack, heap (free store)
http://stackoverflow.com/questions/79923/what-and-where-are-the-stack-and-heap

http://en.wikipedia.org/wiki/Stack
http://en.wikipedia.org/wiki/Stack_%28data_structure%29
http://en.wikipedia.org/wiki/Stack-based_memory_allocation

http://en.wikipedia.org/wiki/Heap
http://en.wikipedia.org/wiki/Heap_%28data_structure%29
http://en.wikipedia.org/wiki/Dynamic_memory_allocation

http://en.wikipedia.org/wiki/Buffer_overflow

http://www.linuxjournal.com/content/doing-reverse-hex-dump

http://www.linuxforums.org/articles/understanding-elf-using-readelf-and-objdump_125.html

The Linux Programmer's Toolbox (Paperback) ~ John Fusco
http://www.amazon.com/Linux-Programmers-Toolbox-John-Fusco/dp/0132198576/ref=sr_1_1?ie=UTF8&s=books&qid=1259773513&sr=1-1

http://gala4th.blogspot.com/2009/12/debugging-tools-and-techniques.html

http://en.wikipedia.org/wiki/Executable_and_Linkable_Format

http://en.wikipedia.org/wiki/Binary_File_Descriptor_library

http://en.wikipedia.org/wiki/Linker_%28computing%29

http://en.wikipedia.org/wiki/Loader_%28computing%29

http://en.wikipedia.org/wiki/Dynamic_linker

http://en.wikipedia.org/wiki/GNU_toolchain

http://en.wikipedia.org/wiki/Core_Dump

http://en.wikipedia.org/wiki/GNU_Binary_Utilities

http://en.wikipedia.org/wiki/GNU_Linker

http://gala4th.blogspot.com/2009/11/books.html

================================================
What Every Programmer Should Know About Memory.

http://stackoverflow.com/questions/1711/what-is-the-single-most-influential-book-every-programmer-should-read

http://stackoverflow.com/questions/1177724/what-soft-skills-make-a-great-programmer

http://stackoverflow.com/questions/330412/which-books-made-you-a-better-programmer

http://stackoverflow.com/questions/67794/what-skills-are-worth-learning-for-a-programming-career-and-or-resume

http://stackoverflow.com/questions/503325/what-makes-a-great-programmer

http://stackoverflow.com/questions/294825/what-skills-should-a-programmer-have-nowadays

http://stackoverflow.com/questions/605913/top-developer-skills

http://stackoverflow.com/questions/184310/do-you-ever-feel-confident-in-your-skills

http://stackoverflow.com/questions/1490346/how-to-compare-programming-skill

http://stackoverflow.com/questions/82639/how-to-become-a-better-programmer

http://stackoverflow.com/questions/62960/what-are-the-basics-of-networking-sys-administration-should-a-programmer-know

Also the SICP lecture videos. http://www.youtube.com/results?search_query=sicp – Jared Updike Jun 11 at 23:21

http://www.infoq.com/presentations/Developing-Expertise-Dave-Thomas

http://www.indiangeek.net/wp-content/uploads/Programmer%20competency%20matrix.htm

http://stackoverflow.com/questions/76364/what-is-the-single-most-effective-thing-you-did-to-improve-your-programming-ski


http://stackoverflow.com/questions/393455/books-for-advanced-programmers

http://stackoverflow.com/questions/38210/what-non-programming-books-should-programmers-read

http://codebetter.com/blogs/jeremy.miller/archive/2007/05/21/thoughts-rants-and-arguments-my-devteach-2007-rollup.aspx

a good understanding of boolean algebra, logic, discrete math, and set theory can really put you up to that next level.
http://stackoverflow.com/questions/157354/is-mathematics-necessary-for-programming

http://stackoverflow.com/questions/38210/what-non-programming-books-should-programmers-read
=================================================
a_k_s_h_a_y:

What you need is Computer Architecture and Operating Systems Architecture/Internals/API.

Programming is crap, you learn a programming language in 3 days. Be it ASM, JAVA, C++, C.

And you learn Data Structures in a week and as for Algorithms, the day since you were born. Problem solving that is.

As for proficiency at a programming language it comes only with practice in that particular language and style. But its not really needed, for you as of now. later gain that. its necessary.

---
kjd_1122:

1) Get some good grip and develop some good skills in C and C++.
2) After getting some grip on those, start with data structures (Most imp).

After this, It's upto you that on which path you wanna go.
IF you wanna become computer engineer, system developer... follow steps 3 and 4. I dont have much knowledge about it though.
3) If you are computer engineering student you must know Discrete Maths. Study it if you can. try to convert some algos into programs.(Not necessary though but would be better)(don't have idea on books.)
4) Start getting some knowledge on X86 arch. (Refer MSDN for that. x86 Architecture). If you dont have knowledge on assembly/OS then refer some books on introduction, methodologies, characteristics of it

- And IF you wanna become software engineer start learning some serious object oriented programming language like JAVA. If you wanna learn java from scratch, refer Hear First java by kethy sierra. it's very good for beginners.
- You can also study C#and Visual Studio.
- Also Start understanding/mastering OOAD- Object oriented Analysis design.
- Once you finish this you must be able to write code for some good basic/mainstream software as well as be able to design them.
- Take some project to guide your way towards goal. It will help you the most.
- (optional) Pass some certification like SCJP if you want, will help you boost your confidence.

---
greenhorn:

I think what akshay meant to say were that programming languages were a means to an end, as long as you know the stuff that comes before that, there is no need to glorify xyz language and all that.

If you just want to break stuff, you don't even really need to code. Testing is an art all by itself. And a lot more fun too ( breaking stuff is a lot easier than making them ).

---
Lord Nemesis:

I know a number of people who do programming on a daily basis with out even knowing what a Memory leak or memory corruption or a stack corruption means nor the difference between any of them. They don't know how a program is executed by the processor. They sure know the syntax of the programming language, but without such fundamentals we cannot write efficient and bug free software.

---
haraakiri:

Generally importance of a programming language is over estimated. But here in this thread, I think it's being underestimated. One of the very famous frameworks for creating web applications, which changed the way programmers think about programming web in general and configuration with xml in particular, rails was possible mainly because of ruby. It would have been difficult or impossible in any other language. There have been no of rails clones, nothing came close to it's simplicity, productivity.

Alex Stepanov worked hard on creating a proper implementation for his thoughts on generic programming but couldn't do that partly because of the complexity of implementing his thoughts in a proper programming language until he saw c++ with templates. That with a few changes to the language made it possible for him to realize his thoughts and STL was the result. Read his book "Elements Of Programming" for details.

Creating an operating system or a device driver and yet write parts of the code to be portable requires a good memory model which C offers. Try to express the same stuff in java or c# or python, you will understand why c has the features it has. If you can't read Alex Stepanov's interviews and a few more articles on c's simple memory model.

Algortihms aren't everything. If you need to create a program consisting of thousands or millions of lines of code, you need something more than that. Abstraction mechanisms. That's where a programming language helps. Provides us with abstractions to be able to get to a solution. As Bjarne Stroustrup puts it, "You think in Code". That's what Kernighan suggests in his book "Practice Of Programming".

Choice of programming language doesn't mean everything, but it also cannot mean nothing.

---
a_k_s_h_a_y:

I understand that, that's why i said too. With a practice in particular language you learn more about your tools. you learn to use to sword better only with experience !
but for newbs i never advice to spend all time on just mastering a programming language. you can gain expertise later as you develop.

Lord Nemesis got my point.
For example, am not a master in shell scripting, but i was able to develop them on the fly whenever necessary for my servers, just by reading some man pages and syntax.

We are not Windows API experts, or Linux API an OS Gurus. But still our programs written for Windows and Linux are used by thousands of people !!
I just had to know few basics of win api and windows programming in general to get my ideas into a working program/solution.

---
Skada:

My advice in this already very infromative thread... For real programming
-Participate in good programming competitions/projects (ICCC, google summer of code etc)
-Learn to read great programmes, (ever read source code of ls ? great style)
-Participate in mailing lists of gcc, valgrind
-Try to hack hardwares
-HELP OTHERS in coding

and

Write your own (small) OS...
Probably six months down the line you would know harware, basic OS structure, algorithms, you will learn Assembly , C and one more lang and it will be fun. And it is HARDCORE programming......
Starting point could be Minix (version 1) with a book to guide.

And remember you should not like programming, you should be addicted to problem solving ... If the coding does not keep you awake till 4 in morning and still far from sleep, you are not doing real stuff yet

http://www.techenclave.com/programming/wanna-enter-the-real-programmers-world-146364.html
=================================================

No comments: