This is the mail archive of the insight@sources.redhat.com mailing list for the Insight project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Restarting


geneSmith wrote, On 10/13/2004 07:15 PM:
Keith Seitz wrote, On 10/13/2004 3:40 PM:

On Wed, 2004-10-13 at 12:27, geneSmith wrote:

When I start gdb, I connect to the target and download to it as specifed in .gdbinit and then I can debug. Is there a way to restart this without exiting gdb, ie, force a re-run of .gdbinit and optionally preserve previously set BPs?



I hate to say this, but I cringe everytime I hear about someone connecting to a target in .gdbinit. It can really screw up insight.


Have not observed any obvious problems. What should I look out for?


Nonetheless, there are options: 1) Put all your target commands in .gdbinit into a user-defined command. Then just run that command (via the console window).

2) Use target settings dialog. Click Run button.

Keith



When looking up "user-defined" command in manual saw "source" command. This seems to do exactly what I want, i.e., I type


so .gdbinit

and it all starts over and preserves the old breakpoints.

Thanks for the help.

-gene

To follow-up on this, "so .gdbinit" is ok (usually, but sometimes crashes insight) for small programs. However for large/huge programs that must download to the embedded target, even via ethernet, using jtag it can take quite a while to re-download and when insight crashes you have to start over anyhow. I found the best way is just set the pc back to the reset vector and run from there, e.g.,
"mon reg pc=0x2010; continue" using my Macraigor mpDemon debugger.
However, you have to make sure .data section is re-initialized properly in the startup code and .bss is zero'd. This gives you a virtually instant restart and preserved breakpoints and insight does not crash.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]