This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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: how to call gdb_test "" ... ?


Keith Seitz writes:
> Actually, I don't see from reading the code for gdb_test why "" would be
> disallowed. Is it giving you some sort of error?

gdb_test "" hangs and does not return until some 60-second timer
kicks it out.  That's probably related to the special check for "":

  set result -1
  set string "${command}\n";
  if { $command != "" } {
    ...
  }

Hmmm, this is actually documented behavior:

  # COMMAND is the command to execute, send to GDB with send_gdb.  If
      this is the null string no command is sent.

I suppose I could do this:

  send_gdb "\n"
  gdb_test "" "..."

How does that sound, Keith?  Or would you prefer me to stick with
send_gdb/gdb_expect?  Gross choice, eh?

I can't modify gdb_test; that would take me too far afield from fixing
the real problems in list.exp.

Michael C


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