Author Topic: how to support scanf of semihosting in the codeblocks?  (Read 11169 times)

Offline mmkider

  • Almost regular
  • **
  • Posts: 150
how to support scanf of semihosting in the codeblocks?
« on: June 19, 2009, 07:35:32 am »
In the codeblocks, printf of semihosting can be print to debugger(Debug) window.
I try to use  " send user command to debugger " to send some input into gdb.
But it's not success.

How to do this?
thank you.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6024
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: how to support scanf of semihosting in the codeblocks?
« Reply #1 on: June 19, 2009, 08:16:34 am »
Not fully understand.

What does "semihosting" means?
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline mmkider

  • Almost regular
  • **
  • Posts: 150
Re: how to support scanf of semihosting in the codeblocks?
« Reply #2 on: June 19, 2009, 08:26:16 am »
Not fully understand.

What does "semihosting" means?

In the embedded development, codeblocks use remote gdb protocol to debug program in the arm board.
If user enable semihosting control, he can get printf and scanf capability.
Now I can get print message via semihosting control, but I don't have any idea to use scanf.



Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6024
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: how to support scanf of semihosting in the codeblocks?
« Reply #3 on: June 19, 2009, 08:45:31 am »
Oh, Thanks for explanation. But I'm totally new to "remote debug". :(

Maybe, you can dig into the debuggergdb plugin source, and locate the reason. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.