Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C Moderated > working c progr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 873 of 1142
Post > Topic >>

working c program dies in gdb

by dben12345@[EMAIL PROTECTED] Jan 20, 2007 at 08:15 PM

Hi all,

Can anyone help me with the following dilema:
I have been provided with a 3rd party threaded library (say libfoo.a)
believed to be stable, it has been in use for a few years and noone has
complained about
it cra****ng.

The program seems to run fine.

//pseudo c-code
main()
{
statement_a;
statement_b;
call_to_function_in_lib_foo();
statement_c;
statement_d;
}

I want to run this in the debugger and experiment with some variations
in statement_c or d
BUT when I run the code in the debugger (gdb) the program generates a
segment fault in call_to_function_in_lib_foo (after spawing some
threads) but before ever executing anything on
statement_c;

If I run the program and attach the debugger to the running process,
the debugger notes that there are 6 threads active, but when I try to
debug entirely in the debugger, it only gets to 4 threads and then
seg-faults.

Any ideas why the program works but would fail in a debugger? and any
ideas on how to resolve this?
Is this a debugger issue? library issue? (using gdb 5.3.9)

Thanks in advance...
Doug
-- 
comp.lang.c.moderated - moderation address: clcm@[EMAIL PROTECTED]
 -- you must
have an appropriate newsgroups line in your header for your mail to be
seen,
or the newsgroup name in square brackets in the subject line.  Sorry.
 




 4 Posts in Topic:
working c program dies in gdb
dben12345@[EMAIL PROTECTE  2007-01-20 20:15:03 
Re: working c program dies in gdb
Flash Gordon <spam@[EM  2007-01-26 09:56:55 
Re: working c program dies in gdb
"Douglas A. Gwyn&quo  2007-01-26 09:56:53 
Re: working c program dies in gdb
Andrei Voropaev <avoro  2007-01-26 09:57:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Aug 27 18:10:17 CDT 2008.