Remote, embedded debugging

Kishore kitts.mailinglists at gmail.com
Mon Jun 6 16:02:54 BST 2011


On Monday 06 Jun 2011 10:56:49 AM Leon Pollak wrote:
> On Monday June 6 2011, Kishore wrote:
> > In my use with bare-metal code, I execute "gdb -x /path/to/gdbinit
> > /file/to/debug" to debug. In the gdbinit file I end it with the "load"
> > instruction and manually execute "c" (or "run" in case of a simulator)
> > after setting up the breakpoints as needed at the time.
> 
> I work with two different configurations: ARM box running linux (gdbserver) 
> and PowerPC box under Abatron BDI-2000.
> The first case works after the patches/tricks I described.
> I have a serious problem now with the second case, when breakpoints are not 
> set while in debugging, only at the beginning.
> 
> What do you mean by "after setting up the breakpoints as needed at the
> time"? When and how do you set them?

I was talking about using the gdb command line and not kdevelop. I was just 
explaining my cmd line work flow. After executing "gdb -x /path/to/gdbinit 
/file/to/debug" when i reach the gdb prompt execution still has not begun. Then 
I add breakpoints ("br main") before executing "c" or "run".

Here is what i think kdevelop should do when using a gdbinit file.
- kdevelop executes "gdb -x /path/to/gdbinit /file/to/debug". The gdbinit 
script itself should not execute "continue" or "run".
- Setup breakpoints, watchpoints etc.
- At the gdb prompt kdevelop executes "continue" or "run" (configurable?).

What i think is important here is that kdevelop gets some time after running 
gdbinit so that it can add the breakpoints in its list. 

I have not tried but i wonder if it is possible to add the breakpoints while 
launching gdb with the option "-ex br main"
-- 
Cheers!
Kishore




More information about the KDevelop mailing list