public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Restarting
@ 2004-10-13 19:27 geneSmith
  2004-10-13 19:35 ` Restarting Keith Seitz
  0 siblings, 1 reply; 6+ messages in thread
From: geneSmith @ 2004-10-13 19:27 UTC (permalink / raw)
  To: insight

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?

-gene
-- 
Lit up like Levy's

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Restarting
  2004-10-13 19:27 Restarting geneSmith
@ 2004-10-13 19:35 ` Keith Seitz
  2004-10-13 23:16   ` Restarting geneSmith
  0 siblings, 1 reply; 6+ messages in thread
From: Keith Seitz @ 2004-10-13 19:35 UTC (permalink / raw)
  To: geneSmith; +Cc: insight

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.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Restarting
  2004-10-13 19:35 ` Restarting Keith Seitz
@ 2004-10-13 23:16   ` geneSmith
  2004-10-14  0:22     ` Restarting Keith Seitz
  2005-02-07  6:31     ` Restarting Gene Smith
  0 siblings, 2 replies; 6+ messages in thread
From: geneSmith @ 2004-10-13 23:16 UTC (permalink / raw)
  To: insight

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
-- 
Lit up like Levy's

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Restarting
  2004-10-13 23:16   ` Restarting geneSmith
@ 2004-10-14  0:22     ` Keith Seitz
  2005-02-07  6:31     ` Restarting Gene Smith
  1 sibling, 0 replies; 6+ messages in thread
From: Keith Seitz @ 2004-10-14  0:22 UTC (permalink / raw)
  To: geneSmith; +Cc: insight

On Wed, 2004-10-13 at 16:15, geneSmith wrote:
> > 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?

The biggest problems are with startup state. If you're not having
problems, then you're probably in good shape. Still, I don't normally
advise people to do so.

> 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.

You can also just do something like:

define restart
set remotebaud 9600
target remote /dev/ttyS1
end

Then just run "restart" from the console.

Keith

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Restarting
  2004-10-13 23:16   ` Restarting geneSmith
  2004-10-14  0:22     ` Restarting Keith Seitz
@ 2005-02-07  6:31     ` Gene Smith
  2005-02-07 17:38       ` Restarting Keith Seitz
  1 sibling, 1 reply; 6+ messages in thread
From: Gene Smith @ 2005-02-07  6:31 UTC (permalink / raw)
  To: insight

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Restarting
  2005-02-07  6:31     ` Restarting Gene Smith
@ 2005-02-07 17:38       ` Keith Seitz
  0 siblings, 0 replies; 6+ messages in thread
From: Keith Seitz @ 2005-02-07 17:38 UTC (permalink / raw)
  To: Gene Smith; +Cc: insight

On Fri, 2005-02-04 at 23:22 -0500, Gene Smith wrote:
> This gives you a virtually 
> instant restart and preserved breakpoints and insight does not crash.

Where does it crash? Can I see a stack backtrace. IMO, I very much doubt
the UI (insight) is crashing unless it is stuck using some deprecated
"API" (gdb doesn't really have any APIs).

Keith

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-02-07 17:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-13 19:27 Restarting geneSmith
2004-10-13 19:35 ` Restarting Keith Seitz
2004-10-13 23:16   ` Restarting geneSmith
2004-10-14  0:22     ` Restarting Keith Seitz
2005-02-07  6:31     ` Restarting Gene Smith
2005-02-07 17:38       ` Restarting Keith Seitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).