This is the mail archive of the gdb-patches@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: RFA: patch to fix gdb/1680


drow> Does it work if you put a backslash in front of them instead?  That's
drow> clearer to read, IMO.

On my machine (expect 5.41):

  "{...}"      ERROR: Process no longer exists
  "\{...\}"    ERROR: Process no longer exists
  "\\{...\\}"  Works fine

> This had better work, or the entire C++ testsuite is in trouble.

Something freaky is going on, indeed.

Empirically, the C++ test suite is working fine.  For example,
these tests:

  # gdb.cp/class2.exp

    # Access the "A" object.

    gdb_test "print alpha" \
	"= {.*a1 = 100.*}" \
	"print alpha at marker return 0"

    # Access the "B" object.

    gdb_test "print beta" \
	"= {.*a1 = 200.*b1 = 201.*b2 = 202}" \
	"print beta at marker return 0"

  # gdb.cp/derivation.exp

    gdb_test "print a_instance" "\\$\[0-9\]+ = \{a = 1, aa = 2\}" "print value of a_instance"

  # gdb.cp/userdef.exp

    gdb_test "print one - two" "\\\$\[0-9\]* = {x = -2, y = -2}"
    gdb_test "print one * two" "\\\$\[0-9\]* = {x = 8, y = 15}"
    gdb_test "print one / two" "\\\$\[0-9\]* = {x = 0, y = 0}"
    gdb_test "print one % two" "\\\$\[0-9\]* = {x = 2, y = 3}"

I spent about two hours playing with the braces in i386-sse.exp.
I truly don't understand why the code i386-sse.exp barfs out when
all that code in gdb.cp/*.exp works.  But I'm sure it works on
my systems (native i686-pc-linux-gnu and native hppa2.0w-hp-hpux11.11),
with expect 5.41.  And it's working on other people's systems in
gdb-testers@ ; I presume most of those results are with the sourceware
version of expect (based on expect 5.26).

I definitely want Jim's patch so that i386-sse.exp does its job.
If you insist, we could make PR gdb/1680 suspended instead of
closing it, to remind us of this unsolved mystery.

Michael C


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