Multi-threaded debugging tutorial for GDB and C [closed] - c

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Does anybody know of a good GDB (or other Linux debugger) tutorial for debugging multi-threaded C code? I'm looking for one that includes simple examples.

Googled it.Found some links.They seem helpful :
redhat.com -Debugging programs with multiple threads
Multi-threaded Debugging Techniques

In supplement to the various gdb tutorials out there I would really advise using "watch" alot in multi-threaded debugging. It will break on read/writes to memory/variables rather than specific lines of source.

When debugging multi-threaded C code using GDB, I usually refer to the entry in the gdb manual on "Debugging Programs with Multiple Threads". You can find it here.
It's not really a tutorial, but it does have a couple of examples that should get you started.

Above links broken, So, you can use the following link:Debugging Programs with Multiple Threads

Related

How to create a GUI-like text interface in C [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have seen a few programs that use simple GUI-like interfaces made out of text. A good example would be links (see screenshots below).
Are there any C libraries for creating this sort of thing out there? I would ideally like mouse support but that is not strictly necessary. Cross-platform is good but I really only need it for *nix-like systems (including mac). I don't have a great deal of experience with C but I know my way around it, coming from C++.
If libraries aren't available, how would one go about coding this kind of thing from scratch?
Screenshots of the kind of thing I want:
EDIT: Yes, I know about curses/ncurses, but does anyone know of any good tutorials to make this kind of program with it?
You could have a look at CDK--
project home page.
This is a set of widgets for Menus, pulldowns etc. wrapped around the basic ncurses library so your coding is at a much higher level and a lot of the intricacies and gotchas of ncurses are already dealt with.
Try ncurses - this is a library which with you may create such GUI environments under console.
The best tutorial I know for curses is Using C With Curses, Lex, and Yacc: Building a Window Shell for Unix System V, by Axel-Tobias Schreiner

Using the C Preprocessor for code cleanup [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a large, legacy C code base to look at, and there are lots of #ifdefs and #ifndefs throughout the code, mostly to maintain backwards compatibility with environments and operating systems that now no longer exist.
Is there any preprocessor-like tool that I could run this code through, that would take in all these C (mainly .c and .h, some .cpp etc) code and output set of source files getting rid of those blocks of code that would otherwise never be relevant? That would certainly make browsing the code easier for me, in addition to, perhaps cleaning it up in the in the long run.
You can use coan for this. Read the "About" page and the man page.
The spin command can output your cleaned up sources under a directory of your
choice.

How to navigate huge code base ~1GB on windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
The code pertains to network switch's ROM and the total memory requirement for default, un-parsed code is around 1 GB. We use Cscope to browse the code in Linux, which is totally great, it doesn't takes time in building cross reference and very easy to use. I want to have the same experience on Windows.
Sadly no other similar question on SO answers my query. The code is mindbogglingly huge, and what surprises me is how Cscope manages to handle it so easily while no other tool on Windows does. I've tried Source Insight, Source Navigator, and many other tools but they take forever to build cross reference, ultimately I have to end their process.
Is there anything on earth which does on Windows, what Cscope does on Linux?
I have not used cscope on windows, but you can try the downloads available on this page
Another possible way as given in cscope support is using cscope (Linux package) under Cygwin.

What are some common C libraries in Linux to use a CD burning device? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am interested in creating software that uses a CD burning device. I will be writing this code in C under Linux and compiling using GCC.
libburn as the name suggests ;) (and other friend-libraries from the same site). It's used in brasero (GNOME), xfburn (xfce) and cdw.
And well, that's it. Really, I'm not aware of any more libraries.
In fact, it was more common to wrap command-line cdrecord (from cdrtools or cdrkit) but they never provided a shared library; it was just an old unix practice on running external executables (and then parsing their output, ugly). AFAIK it's still used in k3b and a few minor tools but the general trend is migration towards libburn.

excellent setjmp/longjmp tutorials [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
Hi I'd like to read good tutorials on setjmp/longjmp in C. It'd be better if there're examples which are real rather than artificial.
Thanks.
It's not really a tutorial as such, but the libpng documentation describes how the library uses setjmp/longjmp to do error handling.
The book "C interfaces and implementation" explains the concept well and implements a usable "exception" simulation in C using these constructs. The code for it (chapter 4) is freely available online here.
Edit: also see this SO thread
Then you should read Advanced Programming in the UNIX(R) Environment (2nd Edition) Here's the sample you're looking for http://my.safaribooksonline.com/0201433079/ch10lev1sec15 (just a preview)

Resources