Programming :: Switch Between Processes When Debugging With Gdb?

Feb 11, 2011

How to switch between processes when debugging with gdb?

View 2 Replies


ADVERTISEMENT

Programming :: Effective Debugging Or Improving Ones Debugging Skills ?

May 21, 2009

Does anyone know how can one improve his debugging skills or how can one narrow down the problem and try to get to the solution ASAP.Or rather how once should approach a problem.I know this is a bit vague question but I want to know how you people approach?

View 3 Replies View Related

Programming :: Debugging Multithreaded Application?

Aug 23, 2010

i need to debug a application which is using many threads. i am using eclipse with GDB debugger but it is not possible to debug it since it has a lot of different threads and i can not not debug it as wre debug in case of single thread(main) . So i would like to know, is there a way to debug such an application, if there is some tutorial that would be nice to know.

View 8 Replies View Related

Programming :: GDB (No Debugging Symbols Found)

Oct 19, 2010

I'm running gdb across a network using gdb server. I've got it up and running. However I can't see any source or variables for my code (in ddd /gdb). At start up gdb says (no debugging symbols found). I've got a g in my make file,
CPFLAGS = -Wall -Os -g -pedantic

I've tried loading symbols in using "symbol-file testarm", this sort of works in that I can view symbols but not names, e.g. if I ask dd to show x y and z, rather than
x = 10
y = 20
x = 30

It says:
display
10/20/30

Also ddd does not show anything in the source window, is there a way I can get it to show this? I think it's because I've started ddd with ddd arm-linux-gdb, as I'm calling a crosscompiler gdb. So can I tell ddd to point to the correct folders? What commands I need to set in gdb/ddd to view variable names (it's hard to keep track when it bunches them all together) and how to view my source code.

View 2 Replies View Related

Programming :: Debugging GTK + Programs Hangs The System?

Oct 28, 2010

A thread-aware version of gdb receives a system notification when a thread starts in the app it is debugging. GTK+ has hidden threads associated with loading icons into menus. So trying to debug a GTK+ program, even one that is apparently single-threaded, can produce a deadlock between gdb, the app and XWindows. The app (actually GdkPixbufLoader) grabs the focus, the mouse and the keyboard and then starts a thread when a menu is opened. If gdb has trouble with threads, it leaves the app blocked but still holding the mouse, et. al. Then you can't talk to gdb or any other GUI interface. To make gdb happy, all GTK+ apps need to be linked with -pthread, if you have the source. If not, gdb cannot be used. In order to break the deadlock, you need a non-GUI shell. If your /etc/inittab starts agetty, mingetty, or the like, and you can get to it with <CRTL><ALT><F3...F6>, you can do a kill -KILL <pid> on the offending app, recover and then go back to XWindows with <CTRL><ALT> <F1/F2>. Otherwise it's reboot time.

View 3 Replies View Related

Programming :: Debugging Kernel Binaries And Modules

Jun 13, 2011

I need to debug "ls". I downloaded coreutils and compiled them in debug mode."ls" uses readdir() kernel API to fetch files/directories from a file system. readdir() fetch data from any file system (suppose FAT or ext3).I have debug version of FAT/ext3 and installed, I also have debug version of coreutils (ls) as well.Now I want to debug from "ls" to "FAT/ext3 readdir()".How to do that?

View 6 Replies View Related

Programming :: Debugging Nasm Source Code ?

Dec 5, 2010

I found on the Internet a rough suggestion to debug code which says to add a line:

An example shows this lists the lines of source that do work.

I do not know where these lines are supposed to go and whether the "notdeadyet" should be a call to a subroutine or what. I only found that "%define" is used to link to external files, so I am confused because what I tried did not work.

(I am unable to use (and learn) any debugging tool for another few weeks and I'd like to progress on this If I can.)

View 2 Replies View Related

Programming :: Debugging QT Project Through GDB In Command Line?

Jan 31, 2011

First step will obviously be to compile the QT project with -g option, but how to do that through command line?

View 6 Replies View Related

Programming :: Gdb Debugging Exec From Child Process?

Jul 14, 2011

Im using gdb for debugging my application.. I was able to debug child process(when fork comes) .. and in child process we have an exec call to .... So the problem is, when the control come to exec , the exec process is executing at a time... I could not debug the exec. process... error is stack curruption due to same frame So, is there any way to debug the exec process

View 1 Replies View Related

Programming :: Make File Debugging Racking?

Feb 24, 2010

I have an environment where i have recursive make files (that is one main and in each directory of a project a file.mk with rules for that directory).Since i'm not the one who wrote it i'm not familiar with it. I would like to explore when i run certain targets how the rules work, which files cause dependency rules to work and why. Also i would like to know ALL the targets that are available to me. i couldn't find any way to 'debug' makefiles or to put it in such debug mode that i see all the information i need when i run a certain target.

View 4 Replies View Related

Programming :: Working With C++ And Autotools - Debugging Application ?

Mar 22, 2010

I have started to work with c++ and autotools.

I mainly maintain an application and a shared library as a hobby.

Nothing professional yet, because I want to understand the best practice strongly recommended by advanced professional programmers.

I check out my sources into $HOME/repository and svn creates:

Where I get c++ sources/headers + configure.ac and Makefile.am

Now I need to understand what is considered as a good practice for debugging application, either A), B) or something else.

A) install application and its dependency with:

or

B)

And then I debug the application in the place it was built. [$HOME/repository/app/src/]

View 2 Replies View Related

Programming :: Debugging Shell Script With A Variable Expansion?

Jan 20, 2011

What I am trying to accomplish is a way to read only the lines that have been added to the file mylog0 since the last time the script looped (5 seconds). I am open to new suggestions too, I have been stuck on this little script for a few hours already.

Code: #!/bin/bash
i=0
firstline=0

[code]...

View 2 Replies View Related

Programming :: No Debugging Symbols Found (not The Simple Case)?

Jan 6, 2011

I wasn't sure where to put this so if I need to move it just let me know.I have a strange problem that I cannot figure out. When I use gdb to debug our rpm-installed program, it says (no debugging symbols found) when it loads. Thing is, when I use nm on the program it can print the symbols, and even stranger is if I use gdb on the program before it is packed up by rpmbuild it loads the debug symbols just fine.Our program is built via the standard make using:GS=-g -Wall-pedantic and as I mentioned I can debug the resulting program. After the build, I package it up using:

cmd="rpmbuild -v -bb ptsnmp.spec --define "ver ${cmvc_release}" --define "rel ${cmvc_level}" --define "_topdir $rpmdir""When this package is installed via rpm, the binary on the machine shows all the debug info via nm, file shows it is not stripped:pt_snmp: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not strippedyet when I try to debug it I get the no debugging symbols found.This is really taxing my brain and I am sure I am just missing something

View 4 Replies View Related

Programming :: Debugging A Simple Server Supporting Multiple Clients

Sep 24, 2009

I don't have any problem when I'm communicating with one client. The problem starts when I connect another client.The server eventually ignores the older clients and responds only to the latest one.The working mechanism is simple: Accept connections and print messages received from multiple clients.

View 4 Replies View Related

Programming :: Implement Two Periodical Processes In C++?

Jul 28, 2010

I am doing real time programming in C++, under Linux. I have two processes, let me say A and B. A process is being started periodically, every 5ms. B process is being started every 10ms. The process A is doing data processing. The process B is reading that data and displays it. I am confused about how to run periodically processes. The problem is that the period of process A should be as much as it is possible accurate (5ms). For the process B it isn't so important. I have created independent processes, each in one .cpp file, and I am starting them from bash file. Is that OK? I don't have to make child processes in order to have parallel processes?

View 1 Replies View Related

Programming :: Measure Time Of N Processes?

Oct 24, 2010

how can I measure time of N processes and N threads and then compare this time to prove that threads are faster than processes. understanding C code, or also for some good way to measure time of N processes and N threads for C.

View 5 Replies View Related

Programming :: Different Processes Using Same File Object

Sep 29, 2009

I have 2 completely different processes A and B (they do not have any relationship) suppose A opens a file with file descriptor 4 and B opens another file with file descriptor 5

Can process A use the fd 5 (i.e using the file object of processs B) by any means..if suppose i let the fd 4 of process A to point to the file object of process B(fd 5) will it work? is it safe?

View 3 Replies View Related

Programming :: How To Kill Zombie Processes

Dec 3, 2010

I have my code with my fork in a server and each time a client connects one more process is created. i use this code for the handling of zombies

void sig_chld(int signo){//Diadikasia gia tin diagrafi twn 'zombies'
signal( SIGCHLD, sig_chld );//signal gia ton entopismo tou zombie
pid_t pid;

[code]....

but i need the server to kill each zombie after the client is disconnecting and not to have to press ctrl+c

View 1 Replies View Related

Programming :: Perl To Kill Off Some Processes?

Nov 18, 2010

how to even start this Perl script. I have the following processes:

Command used to get this info:

ps aux --forest | grep -e process_name -e ksh | awk '{if ($1 == "user1" && $1 != "root" && $1 != "UID" && $1 != "xfs" && $1 != "mfg" && $1 != "mfgnet") print $0}'

Processes

user1 2819 0.0 0.0 4272 612 ? S Nov17 0:00 \_ -pksh-ksh
user1 2820 0.0 0.0 64956 1584 pts/833 Ss+ Nov17 0:00 \_ -ksh

[code]....

I need a way to kill off the pids 2819, 2820 because they do not have a process tied to them like pids 2918, 2922 and 6657. The way it works is peek shell (pid 2918)is opened then it starts a ksh (pid 2922) session then from there the end user runs a command (pid 6657).

View 7 Replies View Related

Programming :: Memory Optimization For Child Processes?

Sep 6, 2010

I work on Linux for ARM processor for cable modem. There is a tool that I have written (as the job demands) that sends/storms customized UDP packets using raw sockets. I form the packet from scratch so that we have the flexibility to play with different options. This tool is mainly for stress testing routers.

The details are here.

I actually have multiple interfaces created. Each interface will obtain IP addresses using DHCP. This is done in order to make the modem behave as virtual customer premises equipment (vcpe).

When the system comes up, I start those processes that are asked to. Every process that I start will continuously send packets. So process 0 will send packets using interface 0 and so on. Each of these processes that send packets would allow configuration (change in UDP parameters and other options at run time). Thats the reason I decide to have separate processes.

I start these processes using fork and excec from the provisioning processes of the modem.

The problem now is that each process takes up a lot of memory. Starting just 3 such processes, causes the system to crash and reboot.

I have tried the following:- 1-I have always assumed that pushing more code to the Shared Libraries will help. So when I tried moving many functions into shared library and keeping minimum code in the processes, it made no difference to my surprise.

2-I also removed all arrays and made them use the heap. However it made no difference. This maybe because the processes runs continuously and it makes no difference if it is stack or heap?

3-I suspect the process from I where I call the fork is huge and that is the reason for the processes that I make result being huge. I am not sure how else I could go about. say process A is huge -> I start process B by forking and excec. B inherits A's memory area. So now I do this -> A starts C which inturn starts B will also not help as C still inherits A?. I used vfork as an alternative which did not help either. I do wonder why.

reduce the memory used by each independent child processes.

View 1 Replies View Related

Programming :: Creating Child Processes In A Script?

Oct 14, 2010

the wrong part of the forum but basically im working on a project and getting no where what so ever and i was wondering if i could get your help. Basically i have to create two scripts do:

The parent script which is going to:
o spawn several child processes.
o keep track of the progress of the child processes.

[code]...

View 1 Replies View Related

Programming :: Use Of Dlopen When Forking Many Similar Processes?

Dec 27, 2010

I am building a queue system (in C on CentOS 5) where each directory queue has a number of process instances 'watching' it. I have a root-permission queue supervisor process which does all the forking, and the instance processes give up root as their first action. For max security each queue is accessible to a different set of users and groups.

I need to keep the RAM requirements as low as possible, so I am relying heavily on copy-on-write (since all memory writes are to shmget() shared memory)

Each process presently dlopen's the libraries it requires after fork, but I'm wondering if I would gain by performing the dlopen before forking a number of instances which all require the same libraries.

Any pointers to mid-level tutorials on dlopen and fork internals would be most appreciated: this is about my third post anywhere since I converted to Linux, but I just can't find the answer to this anywhere online.

View 3 Replies View Related

Programming :: How Do You List Processes - Get A Process's Std - In|out|err - Stream

Jun 3, 2011

How do you list processes, get a process's std(in|out|err) stream, or wait until a process is finished in C?

View 3 Replies View Related

Programming :: Ipc Between Parent And Child Processes Using Pipe?

Oct 13, 2010

If a process forks its child and communicate with the child using pipe, do closing the write end of the pipe and terminating the writing process have the same effect?

View 3 Replies View Related

Programming :: IPC Command - Does Not Shows The Processes That Communicating To Each Others

Sep 28, 2010

The ipcs command shows the facilities of IPC in Linux, but it does not shows the processes that communicating to each others. How can I list the processes, which is currently communicating in IPC ?

View 6 Replies View Related

Programming :: Kill Script Kills Too Many Processes?

Oct 21, 2010

User 1 and User 2 each start a mono process with sudo:

"sudo mono user1.exe" "sudo mono user2.exe"

Each user has a kill.sh in their directory, which is being called by user1.exe/user2.exe to kill the process.

The script itself is

ps aux | grep 'mono user1.exe' | awk '{print $1}' | xargs kill

which in theory should pull *only* the PID of "mono user1.exe" and kill only that. The problem: It kills any and every single instance of mono that is running on my system, every userx.exe thats open. I am confused, as a simple "ps aux | grep 'mono user1.exe'" does only return the mono user1.exe process and not the others. "ps aux | grep 'mono'" returns them all though. how I can modify that script so that it only kills the specific process? Would "pkill -9 -f 'mono MCuser1.exe'" work as well - or would it too kill every instance of mono? I cant do a lot more of trial and error, its not good I am killing those instances accidently...

View 14 Replies View Related

Programming :: Creating Multiple Processes Using Fork

Oct 23, 2010

As an assignment i was doing a program to create two process using fork and pass messages between them using message queue.Did it worked well until my friend tried to copy it using scp.suddenly all hell broke loose as processes without ran syncronisation ie. in tech terms the process just wont wait wen a message queue is empty.it keeps on executing randomly.but after a reboot .. everything worked fine. until again i tried to do scp on my system on purpose. and again the program just went mad.

View 3 Replies View Related

Programming :: Process P4 To Terminates Processes P1, P2, P3 If They Are Running?

Aug 18, 2009

I have p1,p2,p3,p4 some processes created by me in C. p1, p2, p3 are started individually from several consoles. And I want process p4 to terminates processes p1, p2, p3 if they are running. Which is the easiest way to accomplish that? put all processes in the same process group and send from p4 a kill signal to the group. But I couldn't do that because I cannot call successfully setpgid(getpid(), 15000) from p1-p4. It's there some way to put them in the same group? the processes don't have a child-parent relationship, they are launched manually from consoles.

View 1 Replies View Related

Programming :: Synchronization Of Two Processes With Share Memory?

Feb 27, 2011

I have two processes that share a piece of memory, and i want to use the shared memory to send data from one process to the other. it's like a simple consumer-producer problem. when the producer fills the shared memory, it waits until the consumer can consume some data in the memory; the consumer needs to wait if there is no data in the memory. The thing gets complicated when both threads are allowed to sleep and wait for the other to wake it up.

i wanted to use condition variable of pthread for synchronization, but it doesn't work in multiple processes. i tried semaphore, but it's quite complicated and i still cannot make it right. I believe it's a common problem and someone should have written similar code before, or maybe the code is even wrapped in a library, but when I search for it on Internet, I only found information about how to share memory between processes. Does anyone know where I can find this kind of code or library?

View 2 Replies View Related

Programming :: Python: List Running Audio Processes?

Jul 19, 2010

I am trying to get a list of running processes using audio (using gstreamer), just like in gnome-volume-control, under applications, but have so far been unsuccessful in finding anything in either the gtk or gstreamer library, anyone out there who can point me in the right direction?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved