简体   繁体   中英

How can I debug a program using scanf with ddd?

When ddd encounters a scanf statement, it displays "Waiting until GDB gets ready" message. The debugging activity stops here. Please guide me of overcoming this bug.

I'm using an amd64 athlon processor.

I am surprised that so much time has elapsed on this, so although I know little about ddd, it seems very likely that the problem is simply that gdb is waiting for the program which is blocked on a read waiting for input on stdin. If you were running gdb directly, you could direct input to the program by using:

run < input-file

You need to give your program some input.

It's just like in gdb. You can input your values at the bottom pane of ddd. It's just that ddd is not very good at drawing the cursor to indicate that that's possible.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM