chained function calls in C++ expressions

高国胜 guosheng_gao@realsil.com.cn
Thu Dec 17 10:28:00 GMT 2015


I do the regression test for mips-elf target, but the chained-calls.exp has some fails:
Breakpoint 2, main () at /home/guosheng_gao/repo/debugger/gdb-7.10/gdb/testsuite/gdb.cp/chained-calls.cc:217

==============================================
(gdb) load /home/guosheng_gao/gdb-porting-test/gdbtest-2.0-vm/run/gdb.cp/chained-calls
Loading section .note.gnu.build-id, size 0x24 lma 0x80001000
Loading section .init, size 0x38 lma 0x80001024
Loading section .text, size 0x187e8 lma 0x8000105c
Loading section .fini, size 0x28 lma 0x80019844
Loading section .rodata, size 0x1f80 lma 0x80019870
Loading section .eh_frame, size 0x13b8 lma 0x8001b7f0
Loading section .gcc_except_table, size 0x94 lma 0x8001cba8
Loading section .rel.dyn, size 0x10 lma 0x8001cc3c
Loading section .ctors, size 0x8 lma 0x8001d000
Loading section .dtors, size 0x8 lma 0x8001d008
Loading section .jcr, size 0x4 lma 0x8001d010
Loading section .data, size 0x8b0 lma 0x8001d018
Loading section .sdata, size 0xb0 lma 0x8001d8c8
Start address 0x80001828, load size 116156
Transfer rate: 16204 KB/sec, 2978 bytes/write.
(gdb) continue
Continuing.

Breakpoint 1, main () at /home/guosheng_gao/repo/debugger/gdb-7.10/gdb/testsuite/gdb.cp/chained-calls.cc:196
196	  int i = g(f(0));
(gdb) break 202
Breakpoint 2 at 0x800017ac: file /home/guosheng_gao/repo/debugger/gdb-7.10/gdb/testsuite/gdb.cp/chained-calls.cc, line 202.
(gdb) continue
Continuing.

Breakpoint 2, main () at /home/guosheng_gao/repo/debugger/gdb-7.10/gdb/testsuite/gdb.cp/chained-calls.cc:202
202	  return i + getb(b, 0);  /* Break here  */
(gdb) PASS: gdb.cp/chained-calls.exp: continue to breakpoint: Break here
p g(f(12345))
$1 = 12345
(gdb) PASS: gdb.cp/chained-calls.exp: g(f())
p q(p())
$2 = {a = 12345678}
(gdb) PASS: gdb.cp/chained-calls.exp: q(p())
p p() + r()
$3 = {a = 22345678}
(gdb) PASS: gdb.cp/chained-calls.exp: p() + r()
p q(p() + r())
$4 = {a = 22345678}
(gdb) PASS: gdb.cp/chained-calls.exp: q(p() + r())
p g(f(6700) + f(89))
$5 = 6789
(gdb) PASS: gdb.cp/chained-calls.exp: g(f() + f())
p g(f(g(f(300) + f(40))) + f(5))
$6 = 345
(gdb) PASS: gdb.cp/chained-calls.exp: g(f(g(f() + f())) + f())
p getb(makeb(), 789)
FAIL: gdb.cp/chained-calls.exp: getb(makeb(), ...) (timeout)
p *c
FAIL: gdb.cp/chained-calls.exp: *c (timeout)
p *c + *c
FAIL: gdb.cp/chained-calls.exp: *c + *c (timeout)
P q(*c + *c)
FAIL: gdb.cp/chained-calls.exp: q(*c + *c) (timeout)
p make_int().get_type ()
FAIL: gdb.cp/chained-calls.exp: make_int().get_type () (timeout)
================================================

Would you like to supply some advice to fix this issue?
Any information will be helpful for me.

guosheng


More information about the Gdb mailing list