Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* clearing call stack when a new binary file is loaded
@ 2008-04-23 11:30 Jiju George T
  2008-04-23 12:54 ` Vladimir Prus
  0 siblings, 1 reply; 7+ messages in thread
From: Jiju George T @ 2008-04-23 11:30 UTC (permalink / raw)
  To: gdb

Hi,

  We are developing a graphical embedded debugger based on GDB mi interface.
UI part is based on Eclipse CDT and it communicates with GDB through mi
interface. We are facing a problem with call stacks after a new binary is
loaded to GDB. Our UI relays on the call stack information provided by GDB
to show the debug context. 

Steps to reproduce the issues: 

  1) Start GDB and connect to remote GDB server which is connected to an
embedded target. The embedded target is waiting at PC 0xBFC00000
  2) Now load an ELF file to GDB with entry point as 0xA0000000
  3) Now GDB shows $pc register value as 0xA0000000. But the call stack
still shows frames with 0xBFC00000
  
 
Is this GDB behaviour by design? Is there any mi interface to clear the
stack frame and update to the current $pc value? 

Thanks,
Jiju George



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

* Re: clearing call stack when a new binary file is loaded
  2008-04-23 11:30 clearing call stack when a new binary file is loaded Jiju George T
@ 2008-04-23 12:54 ` Vladimir Prus
  2008-04-23 12:57   ` Jiju George T
  2008-04-23 19:54   ` Daniel Jacobowitz
  0 siblings, 2 replies; 7+ messages in thread
From: Vladimir Prus @ 2008-04-23 12:54 UTC (permalink / raw)
  To: gdb

Jiju George T wrote:

> Hi,
> 
> We are developing a graphical embedded debugger based on GDB mi interface.
> UI part is based on Eclipse CDT and it communicates with GDB through mi
> interface. We are facing a problem with call stacks after a new binary is
> loaded to GDB. Our UI relays on the call stack information provided by GDB
> to show the debug context.
> 
> Steps to reproduce the issues:
> 
>   1) Start GDB and connect to remote GDB server which is connected to an
> embedded target. The embedded target is waiting at PC 0xBFC00000
>   2) Now load an ELF file to GDB with entry point as 0xA0000000
>   3) Now GDB shows $pc register value as 0xA0000000. But the call stack
> still shows frames with 0xBFC00000
>   
>  
> Is this GDB behaviour by design? Is there any mi interface to clear the
> stack frame and update to the current $pc value?

Which version of GDB?

- Volodya



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

* RE: clearing call stack when a new binary file is loaded
  2008-04-23 12:54 ` Vladimir Prus
@ 2008-04-23 12:57   ` Jiju George T
  2008-04-23 19:54   ` Daniel Jacobowitz
  1 sibling, 0 replies; 7+ messages in thread
From: Jiju George T @ 2008-04-23 12:57 UTC (permalink / raw)
  To: 'Vladimir Prus', gdb

I am using a cross compiled version of GDB for MIPS architecture
(mipsel-linux-gdb) compiled using cross tools. It is based on GNU GDB
version 6.6

Thanks,
Jiju

-----Original Message-----
From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On Behalf
Of Vladimir Prus
Sent: 23 April 2008 11:52
To: gdb@sources.redhat.com
Subject: Re: clearing call stack when a new binary file is loaded

Jiju George T wrote:

> Hi,
> 
> We are developing a graphical embedded debugger based on GDB mi interface.
> UI part is based on Eclipse CDT and it communicates with GDB through mi
> interface. We are facing a problem with call stacks after a new binary is
> loaded to GDB. Our UI relays on the call stack information provided by GDB
> to show the debug context.
> 
> Steps to reproduce the issues:
> 
>   1) Start GDB and connect to remote GDB server which is connected to an
> embedded target. The embedded target is waiting at PC 0xBFC00000
>   2) Now load an ELF file to GDB with entry point as 0xA0000000
>   3) Now GDB shows $pc register value as 0xA0000000. But the call stack
> still shows frames with 0xBFC00000
>   
>  
> Is this GDB behaviour by design? Is there any mi interface to clear the
> stack frame and update to the current $pc value?

Which version of GDB?

- Volodya




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

* Re: clearing call stack when a new binary file is loaded
  2008-04-23 12:54 ` Vladimir Prus
  2008-04-23 12:57   ` Jiju George T
@ 2008-04-23 19:54   ` Daniel Jacobowitz
  2008-04-23 20:03     ` Jiju George T
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Jacobowitz @ 2008-04-23 19:54 UTC (permalink / raw)
  To: Vladimir Prus; +Cc: gdb

On Wed, Apr 23, 2008 at 02:51:35PM +0400, Vladimir Prus wrote:
> Which version of GDB?

I expect it still does this.  write_pc doesn't invalidate the frame
cache, so we should manually do so at the end of generic_load.

-- 
Daniel Jacobowitz
CodeSourcery


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

* RE: clearing call stack when a new binary file is loaded
  2008-04-23 19:54   ` Daniel Jacobowitz
@ 2008-04-23 20:03     ` Jiju George T
  2008-04-23 20:47       ` 'Daniel Jacobowitz'
  0 siblings, 1 reply; 7+ messages in thread
From: Jiju George T @ 2008-04-23 20:03 UTC (permalink / raw)
  To: 'Daniel Jacobowitz', 'Vladimir Prus'; +Cc: gdb

Is there any equivalent mi command to invalidate the frame cache? 

Thanks,
Jiju

-----Original Message-----
From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On Behalf
Of Daniel Jacobowitz
Sent: 23 April 2008 12:46
To: Vladimir Prus
Cc: gdb@sources.redhat.com
Subject: Re: clearing call stack when a new binary file is loaded

On Wed, Apr 23, 2008 at 02:51:35PM +0400, Vladimir Prus wrote:
> Which version of GDB?

I expect it still does this.  write_pc doesn't invalidate the frame
cache, so we should manually do so at the end of generic_load.

-- 
Daniel Jacobowitz
CodeSourcery



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

* Re: clearing call stack when a new binary file is loaded
  2008-04-23 20:03     ` Jiju George T
@ 2008-04-23 20:47       ` 'Daniel Jacobowitz'
  2008-04-26 16:34         ` Jiju George T
  0 siblings, 1 reply; 7+ messages in thread
From: 'Daniel Jacobowitz' @ 2008-04-23 20:47 UTC (permalink / raw)
  To: Jiju George T; +Cc: 'Vladimir Prus', gdb

On Wed, Apr 23, 2008 at 01:53:46PM +0100, Jiju George T wrote:
> Is there any equivalent mi command to invalidate the frame cache? 

No.  If you use GDB 6.8 the CLI command "flushregs" will hack around
the problem but we simply need to fix it.

-- 
Daniel Jacobowitz
CodeSourcery


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

* RE: clearing call stack when a new binary file is loaded
  2008-04-23 20:47       ` 'Daniel Jacobowitz'
@ 2008-04-26 16:34         ` Jiju George T
  0 siblings, 0 replies; 7+ messages in thread
From: Jiju George T @ 2008-04-26 16:34 UTC (permalink / raw)
  To: 'Daniel Jacobowitz'; +Cc: gdb

Will it be fixed in the next release? Do I have to file a bug on this? 

-----Original Message-----
From: 'Daniel Jacobowitz' [mailto:drow@false.org] 
Sent: 23 April 2008 13:57
To: Jiju George T
Cc: 'Vladimir Prus'; gdb@sources.redhat.com
Subject: Re: clearing call stack when a new binary file is loaded

On Wed, Apr 23, 2008 at 01:53:46PM +0100, Jiju George T wrote:
> Is there any equivalent mi command to invalidate the frame cache? 

No.  If you use GDB 6.8 the CLI command "flushregs" will hack around
the problem but we simply need to fix it.

-- 
Daniel Jacobowitz
CodeSourcery



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

end of thread, other threads:[~2008-04-24 16:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-23 11:30 clearing call stack when a new binary file is loaded Jiju George T
2008-04-23 12:54 ` Vladimir Prus
2008-04-23 12:57   ` Jiju George T
2008-04-23 19:54   ` Daniel Jacobowitz
2008-04-23 20:03     ` Jiju George T
2008-04-23 20:47       ` 'Daniel Jacobowitz'
2008-04-26 16:34         ` Jiju George T

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