Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA/RFC] testsuite: gdb_run_cmd tweak
@ 2005-04-18 19:51 Michael Snyder
  2005-04-18 21:42 ` Stan Shebs
  2005-04-18 21:54 ` Daniel Jacobowitz
  0 siblings, 2 replies; 9+ messages in thread
From: Michael Snyder @ 2005-04-18 19:51 UTC (permalink / raw)
  To: gdb-patches

[-- Attachment #1: Type: text/plain, Size: 354 bytes --]

This just adds a regular expression to prevent gdb_run_cmd
from choking on the msg that gdb emits when it detects that
the file has changed and re-reads the symbols.

I honestly don't remember the circumstances that caused me
to add this -- it's been sitting in my sandbox for a while.
Thought it would be better to offer it up than to throw it
away...


[-- Attachment #2: lib --]
[-- Type: text/plain, Size: 672 bytes --]

2005-04-18  Michael Snyder  <msnyder@redhat.com>

	* lib/gdb.exp (gdb_run_cmd): Keep going past "executable has 
	changed" msg.

Index: lib/gdb.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v
retrieving revision 1.61
diff -p -r1.61 gdb.exp
*** lib/gdb.exp	14 Apr 2005 19:06:19 -0000	1.61
--- lib/gdb.exp	18 Apr 2005 19:42:38 -0000
*************** proc gdb_run_cmd {args} {
*** 258,263 ****
--- 258,266 ----
  	    send_gdb "y\n"
  	    exp_continue
  	}
+ 	-re ".* has changed; re-reading symbols\[^\r\n\]*\[\r\n\]*" {
+ 	    exp_continue
+ 	}
  	-re "Starting program: \[^\r\n\]*" {}
      }
  }

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

* Re: [RFA/RFC] testsuite: gdb_run_cmd tweak
  2005-04-18 19:51 [RFA/RFC] testsuite: gdb_run_cmd tweak Michael Snyder
@ 2005-04-18 21:42 ` Stan Shebs
  2005-04-18 21:46   ` Michael Snyder
  2005-04-18 21:54 ` Daniel Jacobowitz
  1 sibling, 1 reply; 9+ messages in thread
From: Stan Shebs @ 2005-04-18 21:42 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

Michael Snyder wrote:

> This just adds a regular expression to prevent gdb_run_cmd
> from choking on the msg that gdb emits when it detects that
> the file has changed and re-reads the symbols.
>
> I honestly don't remember the circumstances that caused me
> to add this -- it's been sitting in my sandbox for a while.
> Thought it would be better to offer it up than to throw it
> away...

Wouldn't a message like this be symptomatic of failure
in GDB's executable date detection code, or in the executable
production bits? I think we'd only want this suppression
if the situation were explicitly known to be unavoidable,
like an outside compiler we couldn't control, or a known
OS bug, and even then we'd want to conditionalize on config.

Stan


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

* Re: [RFA/RFC] testsuite: gdb_run_cmd tweak
  2005-04-18 21:42 ` Stan Shebs
@ 2005-04-18 21:46   ` Michael Snyder
  2005-04-18 22:09     ` Stan Shebs
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Snyder @ 2005-04-18 21:46 UTC (permalink / raw)
  To: Stan Shebs; +Cc: gdb-patches

Stan Shebs wrote:
> Michael Snyder wrote:
> 
>> This just adds a regular expression to prevent gdb_run_cmd
>> from choking on the msg that gdb emits when it detects that
>> the file has changed and re-reads the symbols.
>>
>> I honestly don't remember the circumstances that caused me
>> to add this -- it's been sitting in my sandbox for a while.
>> Thought it would be better to offer it up than to throw it
>> away...
> 
> 
> Wouldn't a message like this be symptomatic of failure
> in GDB's executable date detection code, or in the executable
> production bits?

If I understand it, we get that message precisely when
gdb's executable date detection code works as intended.
It discovers that the executable's modification date has
changed, and therefore re-reads the symbols.

 > I think we'd only want this suppression
> if the situation were explicitly known to be unavoidable,
> like an outside compiler we couldn't control, or a known
> OS bug, and even then we'd want to conditionalize on config.
> 
> Stan
> 
> 


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

* Re: [RFA/RFC] testsuite: gdb_run_cmd tweak
  2005-04-18 19:51 [RFA/RFC] testsuite: gdb_run_cmd tweak Michael Snyder
  2005-04-18 21:42 ` Stan Shebs
@ 2005-04-18 21:54 ` Daniel Jacobowitz
  2005-04-18 22:05   ` Michael Snyder
  1 sibling, 1 reply; 9+ messages in thread
From: Daniel Jacobowitz @ 2005-04-18 21:54 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

On Mon, Apr 18, 2005 at 12:51:03PM -0700, Michael Snyder wrote:
> This just adds a regular expression to prevent gdb_run_cmd
> from choking on the msg that gdb emits when it detects that
> the file has changed and re-reads the symbols.
> 
> I honestly don't remember the circumstances that caused me
> to add this -- it's been sitting in my sandbox for a while.
> Thought it would be better to offer it up than to throw it
> away...
> 

> 2005-04-18  Michael Snyder  <msnyder@redhat.com>
> 
> 	* lib/gdb.exp (gdb_run_cmd): Keep going past "executable has 
> 	changed" msg.

I'd really like to know where this is necessary.


-- 
Daniel Jacobowitz
CodeSourcery, LLC


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

* Re: [RFA/RFC] testsuite: gdb_run_cmd tweak
  2005-04-18 21:54 ` Daniel Jacobowitz
@ 2005-04-18 22:05   ` Michael Snyder
  0 siblings, 0 replies; 9+ messages in thread
From: Michael Snyder @ 2005-04-18 22:05 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

Daniel Jacobowitz wrote:
> On Mon, Apr 18, 2005 at 12:51:03PM -0700, Michael Snyder wrote:
> 
>>This just adds a regular expression to prevent gdb_run_cmd
>>from choking on the msg that gdb emits when it detects that
>>the file has changed and re-reads the symbols.
>>
>>I honestly don't remember the circumstances that caused me
>>to add this -- it's been sitting in my sandbox for a while.
>>Thought it would be better to offer it up than to throw it
>>away...
>>
> 
> 
>>2005-04-18  Michael Snyder  <msnyder@redhat.com>
>>
>>	* lib/gdb.exp (gdb_run_cmd): Keep going past "executable has 
>>	changed" msg.
> 
> 
> I'd really like to know where this is necessary.

Well, if I remember, I'll say.  Otherwise, maybe I'll withdraw
the patch and be content with knowing that it's archived here,
in case we ever discover that it's needed.



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

* Re: [RFA/RFC] testsuite: gdb_run_cmd tweak
  2005-04-18 21:46   ` Michael Snyder
@ 2005-04-18 22:09     ` Stan Shebs
  2005-04-18 23:00       ` Michael Snyder
  0 siblings, 1 reply; 9+ messages in thread
From: Stan Shebs @ 2005-04-18 22:09 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches

Michael Snyder wrote:

> Stan Shebs wrote:
>
>> Michael Snyder wrote:
>>
>>> This just adds a regular expression to prevent gdb_run_cmd
>>> from choking on the msg that gdb emits when it detects that
>>> the file has changed and re-reads the symbols.
>>>
>>> I honestly don't remember the circumstances that caused me
>>> to add this -- it's been sitting in my sandbox for a while.
>>> Thought it would be better to offer it up than to throw it
>>> away...
>>
>>
>>
>> Wouldn't a message like this be symptomatic of failure
>> in GDB's executable date detection code, or in the executable
>> production bits?
>
>
> If I understand it, we get that message precisely when
> gdb's executable date detection code works as intended.
> It discovers that the executable's modification date has
> changed, and therefore re-reads the symbols.

But when would that happen while running the testsuite?
I would expect that the executable is left alone between run
commands - if GDB thinks it needs to re-read symbols between
run commands on the same executable, that seems like a GDB
bug and a performance loss to boot.

Stan


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

* Re: [RFA/RFC] testsuite: gdb_run_cmd tweak
  2005-04-18 22:09     ` Stan Shebs
@ 2005-04-18 23:00       ` Michael Snyder
  2005-04-19 15:49         ` Paul Gilliam
  0 siblings, 1 reply; 9+ messages in thread
From: Michael Snyder @ 2005-04-18 23:00 UTC (permalink / raw)
  To: Stan Shebs; +Cc: gdb-patches

Stan Shebs wrote:
> Michael Snyder wrote:
> 
>> Stan Shebs wrote:
>>
>>> Michael Snyder wrote:
>>>
>>>> This just adds a regular expression to prevent gdb_run_cmd
>>>> from choking on the msg that gdb emits when it detects that
>>>> the file has changed and re-reads the symbols.
>>>>
>>>> I honestly don't remember the circumstances that caused me
>>>> to add this -- it's been sitting in my sandbox for a while.
>>>> Thought it would be better to offer it up than to throw it
>>>> away...
>>>
>>>
>>>
>>>
>>> Wouldn't a message like this be symptomatic of failure
>>> in GDB's executable date detection code, or in the executable
>>> production bits?
>>
>>
>>
>> If I understand it, we get that message precisely when
>> gdb's executable date detection code works as intended.
>> It discovers that the executable's modification date has
>> changed, and therefore re-reads the symbols.
> 
> 
> But when would that happen while running the testsuite?
> I would expect that the executable is left alone between run
> commands - if GDB thinks it needs to re-read symbols between
> run commands on the same executable, that seems like a GDB
> bug and a performance loss to boot.

OK, let's drop it then.  As I say, I don't remember
why I did it in the first place.




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

* Re: [RFA/RFC] testsuite: gdb_run_cmd tweak
  2005-04-18 23:00       ` Michael Snyder
@ 2005-04-19 15:49         ` Paul Gilliam
  2005-04-19 16:36           ` Daniel Jacobowitz
  0 siblings, 1 reply; 9+ messages in thread
From: Paul Gilliam @ 2005-04-19 15:49 UTC (permalink / raw)
  To: gdb-patches

On Monday 18 April 2005 15:59, Michael Snyder wrote:
> Stan Shebs wrote:
> > Michael Snyder wrote:
> > 
> >> Stan Shebs wrote:
> >>
> >>> Michael Snyder wrote:
> >>>
> >>>> This just adds a regular expression to prevent gdb_run_cmd
> >>>> from choking on the msg that gdb emits when it detects that
> >>>> the file has changed and re-reads the symbols.
> >>>>
> >>>> I honestly don't remember the circumstances that caused me
> >>>> to add this -- it's been sitting in my sandbox for a while.
> >>>> Thought it would be better to offer it up than to throw it
> >>>> away...
> >>>
> >>>
> >>>
> >>>
> >>> Wouldn't a message like this be symptomatic of failure
> >>> in GDB's executable date detection code, or in the executable
> >>> production bits?
> >>
> >>
> >>
> >> If I understand it, we get that message precisely when
> >> gdb's executable date detection code works as intended.
> >> It discovers that the executable's modification date has
> >> changed, and therefore re-reads the symbols.
> > 
> > 
> > But when would that happen while running the testsuite?
> > I would expect that the executable is left alone between run
> > commands - if GDB thinks it needs to re-read symbols between
> > run commands on the same executable, that seems like a GDB
> > bug and a performance loss to boot.
> 
> OK, let's drop it then.  As I say, I don't remember
> why I did it in the first place.
> 

Before you drop this, a question: Is there a test in the testsuite that
does expect this message?  It would be easyish to create the conditions
on purpose so as to test GDB's responce.

-=# Paul #=-


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

* Re: [RFA/RFC] testsuite: gdb_run_cmd tweak
  2005-04-19 15:49         ` Paul Gilliam
@ 2005-04-19 16:36           ` Daniel Jacobowitz
  0 siblings, 0 replies; 9+ messages in thread
From: Daniel Jacobowitz @ 2005-04-19 16:36 UTC (permalink / raw)
  To: Paul Gilliam; +Cc: gdb-patches

On Tue, Apr 19, 2005 at 07:49:04AM -0800, Paul Gilliam wrote:
> Before you drop this, a question: Is there a test in the testsuite that
> does expect this message?  It would be easyish to create the conditions
> on purpose so as to test GDB's responce.

Yes.  See reread.exp.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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

end of thread, other threads:[~2005-04-19 16:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-18 19:51 [RFA/RFC] testsuite: gdb_run_cmd tweak Michael Snyder
2005-04-18 21:42 ` Stan Shebs
2005-04-18 21:46   ` Michael Snyder
2005-04-18 22:09     ` Stan Shebs
2005-04-18 23:00       ` Michael Snyder
2005-04-19 15:49         ` Paul Gilliam
2005-04-19 16:36           ` Daniel Jacobowitz
2005-04-18 21:54 ` Daniel Jacobowitz
2005-04-18 22:05   ` Michael Snyder

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