Re: How do you debug a C++ Standard Tool Application?
Re: How do you debug a C++ Standard Tool Application?
- Subject: Re: How do you debug a C++ Standard Tool Application?
- From: Richard Dunlap <email@hidden>
- Date: Thu, 14 Oct 2004 08:44:54 -0500
Sorry for the late response.
Yeah, I'm sure that it doesn't work for me anyway. Here is a simple
program that does exhibits the problem.
int main() {
cout << "Your Name? "; // break points work here
char name[25];
cin >> name;
cout << "Hello " << name; // break points no longer work!!
return 0;
}
The symptom is I can set a breakpoint on the first line, but not
anyplace after that. Single step does not work either.
I tried the ctl-c thing, doesn't seem to work for me.
Thanks again,
RIck
On Sep 21, 2004, at 10:09 PM, Wade Tregaskis wrote:
Debugging works fine, as long as you don't need stdin. Obviously,
program stdin conflicts with GDB's commands.
Are you sure? GDB does have a lot of bugs regarding stdin/stdout
(particularly with multi-threaded programs, I've noticed, but then
it's terribly buggy with such apps anyway), but it does work in some
(arguably most) cases... if you mean you can't control gdb and the
program at once, then yes, but you can always control-C to get to
gdb's prompt from your program, and then "c" (continue) to resume your
program. Assuming your input isn't time sensitive, and you don't
block the relevant signal for ctrl-C, etc.
Wade Tregaskis (aim & yahoo: wadetregaskis, icq: 40056898, msn &
email: email@hidden, jabber:
email@hidden)
-- Sed quis custodiet ipsos custodes?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden