Actually, I might have a link for you on this subject. I just got into GDB
the other day to debug some pointer code that went something like this:
void allocateTable(std::string* table)
{
table = new string[50];
// Do Stuff...
return;
}
But then later in the code, when I used this stuff, it crashed if I
referenced the array. Long story short, it should have been coded this way:
void allocateTable(std::string*& table)
{
table = new string[50];
// Do Stuff...
return;
}
I forgot to pass the pointer by reference so the change never went back into
the calling function's pointer! Anyhow, when I had to figure this out with
GDB, I found some docs that also covered the issue of working with threads.
I sorted them in relevance order.
http://sources.redhat.com/gdb/current/onlinedocs/gdb_5.html#SEC26
http://sources.redhat.com/gdb/current/onlinedocs/gdb_toc.html
http://www.gnu.org/software/gdb/documentation/
HTH!
Matt
-----Original Message-----
From: dev...@li...
[mailto:dev...@li...]On Behalf Of Behcet
Emre Tezel
Sent: Monday, March 21, 2005 6:26 PM
To: Dev-Cpp UserList
Subject: [Dev-C++] Multi-threaded debugging in Dev-C++
How are people's experience so far debugging multi threaded C++
applications in Dev-C++?
-Emre
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
___________________________________________________________________
The information contained in this message and any attachment may be
proprietary, confidential, and privileged or subject to the work
product doctrine and thus protected from disclosure. If the reader
of this message is not the intended recipient, or an employee or
agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by replying to this message and deleting it and all
copies and backups thereof. Thank you.
|