Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* gdb-serial: inform gdb that target has changed
@ 2009-10-27 19:33 Jakob Engblom
  2009-10-27 20:15 ` Michael Snyder
  0 siblings, 1 reply; 3+ messages in thread
From: Jakob Engblom @ 2009-10-27 19:33 UTC (permalink / raw)
  To: gdb

Hi!

While looking over gdb7 and getting our tool to work with it, we realized we
still have an old outstanding issue with gdb-serial and using gdb as a debugger
frontend. It is the fact that gdb assumes that it is in control, and the target
cannot tell gdb to refresh its state since the target has changed outside of
gdb's control.  Today we do the work-around of disconnecting and connecting the
connection to force gdb to refresh, which is not particularly elegant.

Example cases: with reverse execution and a user on the back-end side jumping to
back-end bookmarks in time, or triggering breakpoints on hardware accesses or
other events that gdb have no real idea of. 

Best regards,

/jakob

_______________________________________________________

Jakob Engblom, PhD, Technical Marketing Manager

Virtutech                   Direct: +46 8 690 07 47   
Drottningholmsvägen 22      Mobile: +46 709 242 646  
11243 Stockholm             Web:    www.virtutech.com 
Sweden
________________________________________________________
  



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

* Re: gdb-serial: inform gdb that target has changed
  2009-10-27 19:33 gdb-serial: inform gdb that target has changed Jakob Engblom
@ 2009-10-27 20:15 ` Michael Snyder
  2009-10-28 11:08   ` Jakob Engblom
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Snyder @ 2009-10-27 20:15 UTC (permalink / raw)
  To: Jakob Engblom; +Cc: gdb

Jakob Engblom wrote:
> Hi!
> 
> While looking over gdb7 and getting our tool to work with it, we realized we
> still have an old outstanding issue with gdb-serial and using gdb as a debugger
> frontend. It is the fact that gdb assumes that it is in control, and the target
> cannot tell gdb to refresh its state since the target has changed outside of
> gdb's control.  Today we do the work-around of disconnecting and connecting the
> connection to force gdb to refresh, which is not particularly elegant.
> 
> Example cases: with reverse execution and a user on the back-end side jumping to
> back-end bookmarks in time, or triggering breakpoints on hardware accesses or
> other events that gdb have no real idea of. 

Hi Jakob,

I'd like to know more about the context, but my first suggestion
is probably going to be the same in any event -- have you tried
this command instead of disconnect?

     (gdb) help flushregs
     Force gdb to flush its register cache (maintainer command)


After this command, if you give "frame", or any other command
that causes gdb to need to know where the target is, gdb will
fetch the registers afresh.

Now as to your context, and my questions...

Is this something that is happening when gdb is "at the prompt"?

Of course, in normal (sync) mode, gdb assumes that nothing is
happening on the target while we sit at the gdb prompt.

Just for understanding...


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

* RE: gdb-serial: inform gdb that target has changed
  2009-10-27 20:15 ` Michael Snyder
@ 2009-10-28 11:08   ` Jakob Engblom
  0 siblings, 0 replies; 3+ messages in thread
From: Jakob Engblom @ 2009-10-28 11:08 UTC (permalink / raw)
  To: 'Michael Snyder'; +Cc: gdb

> Hi Jakob,
> 
> I'd like to know more about the context, but my first suggestion
> is probably going to be the same in any event -- have you tried
> this command instead of disconnect?
> 
>      (gdb) help flushregs
>      Force gdb to flush its register cache (maintainer command)
> 
> 
> After this command, if you give "frame", or any other command
> that causes gdb to need to know where the target is, gdb will
> fetch the registers afresh.

We need this to be invoked from the target, across gdb-serial connections. 

> Now as to your context, and my questions...
> 
> Is this something that is happening when gdb is "at the prompt"?
> 
> Of course, in normal (sync) mode, gdb assumes that nothing is
> happening on the target while we sit at the gdb prompt.

Yes. 

Sice Simics has its own parallel command-line, we can be stepping the target,
changing memory and register contents, and do other things as gdb is sitting at
prompt waiting for commands.  

So a simple gdb-serial backwards command to notify gdb that the target has
changed and that all state should be updated would be the simple perfect
solution for us.


Best regards,

/jakob

_______________________________________________________

Jakob Engblom, PhD, Technical Marketing Manager

Virtutech                   Direct: +46 8 690 07 47   
Drottningholmsvägen 22      Mobile: +46 709 242 646  
11243 Stockholm             Web:    www.virtutech.com 
Sweden
________________________________________________________
  





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

end of thread, other threads:[~2009-10-28 10:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-27 19:33 gdb-serial: inform gdb that target has changed Jakob Engblom
2009-10-27 20:15 ` Michael Snyder
2009-10-28 11:08   ` Jakob Engblom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox