LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-27-2013, 02:05 PM   #1
atlantis43
Member
 
Registered: Feb 2013
Posts: 289

Rep: Reputation: Disabled
puzzling gdb text


hi;
trying to debug some code using gdb, and I get to line in code where preceding a getstring() fn, which reads "Enter a string"
If I the enter a string after gdb prompt, I get msg "unrecognized cmd". If I wait for code line for GetString to enter the string, gdb exits code.

How do I "enter a string" to satisfy the code?
Also, interested in how to expres a cmd to get the type od character in the code, together with its value. (I know that 'p whatever gets the value)
Please explain in simple terms, as I'm a real novice.

Last edited by atlantis43; 02-27-2013 at 02:21 PM.
 
Old 02-27-2013, 07:46 PM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
Why not have a debug mode for the program that reads input from a file where you have prepared sample input?

Have you got the program to print out the text it takes as input?
 
Old 02-27-2013, 09:52 PM   #3
atlantis43
Member
 
Registered: Feb 2013
Posts: 289

Original Poster
Rep: Reputation: Disabled
? debug mode

Quote:
Originally Posted by linosaurusroot View Post
Why not have a debug mode for the program that reads input from a file where you have prepared sample input?

Have you got the program to print out the text it takes as input?
>>>>>>>>>>>>>>>>>>>>>
When program run in vmware, it accepts the requested string input, but the output answers are not what I expected. Wanted to run gdb to be able to step thru program & evaluate values thru the progressing code. The input needed is a simple string for a Caesar cipher. No complex files involved.
Don't really understand what you mean by 'debug mode' for the program. I thought that gdb is a debug mode.

Last edited by atlantis43; 03-02-2013 at 07:59 AM. Reason: clarification
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Puzzling CD-ROM lixbie Linux - Hardware 3 09-11-2008 09:07 AM
normal gdb and spec gdb for kgdb Igor007 Programming 1 09-23-2005 04:15 PM
normal gdb and spec gdb for kgdb Igor007 Linux - Newbie 1 09-23-2005 01:41 PM
gdb .. looking for 32 bit gdb.. for ia64 suse.. nkshirsagar SUSE / openSUSE 0 12-09-2004 03:02 AM
A few puzzling Questions Sweepnx Linux - Newbie 11 02-03-2004 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:02 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration