learningunix
asked on
gdb debug
I have a big application with 1000's of files which uses Producer/Consumer problem and has a shared buffer. I am just going crazy just to find out which actually is the shared buffer as there are so many jumps in the C++ code.
Is there any specific way that I can use in gdb to debug the code to find out the actual "shared buffer" which is being produced and consumed.
Is there any specific way that I can use in gdb to debug the code to find out the actual "shared buffer" which is being produced and consumed.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe I misunderstood. I didn't think you knew where your shared buffer was, and if that is the case, I didn't know how to place a watch over the correct shared buffer location.
ASKER
I couldn't find shmat. I'll try the other 2 options and see:
1. Use watch
2. go through the different thread functions as metioned in
http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html#SYNCHRONIZATION
This is going to be very painful and time-consuming :(
1. Use watch
2. go through the different thread functions as metioned in
http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html#SYNCHRONIZATION
This is going to be very painful and time-consuming :(
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I would also scan the source code filenames for matches on some of these tokens. For example: $ find . -name "*[Rr]ead*" -print