LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   puzzling gdb text (https://www.linuxquestions.org/questions/linux-newbie-8/puzzling-gdb-text-4175451954/)

atlantis43 02-27-2013 02:05 PM

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.

linosaurusroot 02-27-2013 07:46 PM

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?

atlantis43 02-27-2013 09:52 PM

? debug mode
 
Quote:

Originally Posted by linosaurusroot (Post 4901258)
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.


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