guosheng_gao at realsil dot com.cn
2018-04-26 03:10:46 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=23121
Bug ID: 23121
Summary: the thumb function pointer without mode bit
Product: gdb
Version: 8.1
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: guosheng_gao at realsil dot com.cn
Target Milestone: ---
I found that the func-ptrs.exp can’t run remote arm (thumb) target:
The main reasons is the thumb function pointer without mode bit, look the red
line
‘calc’ is a thumb function pointer, ‘decr’ is a thumb function, but the
lowest position is not 1, without mode bit in GDB.
If ‘calc’ is set to ‘decr’, it cann’t run my remote target. But if I add a mode
bit to decr, it runs OK.
set calc = decr
(gdb) PASS: gdb.base/func-ptrs.exp: set calc to decr
continue
Continuing.
Remote connection closed
So, Who knows how to fix this problem in GDB.
(gdb) load /home/gdbtest-2.0/run/outputs/gdb.base/func-ptrs/func-ptrs
Loading section .init, size 0xc lma 0x8000
Loading section .text, size 0x418 lma 0x800c
Loading section .fini, size 0xc lma 0x8424
Loading section .rodata, size 0x4 lma 0x8430
Loading section .ARM.exidx, size 0x8 lma 0x8434
Loading section .eh_frame, size 0x4 lma 0x843c
Loading section .init_array, size 0x4 lma 0x18440
Loading section .fini_array, size 0x4 lma 0x18444
Loading section .jcr, size 0x4 lma 0x18448
Loading section .data, size 0x438 lma 0x18450
Start address 0x80b4, load size 2180
Transfer rate: 17440 bits in <1 sec, 218 bytes/write.
(gdb) continue
Continuing.
Breakpoint 1, main () at /home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c:43
43 int i = -1;
(gdb) break sentinel if calc == decr
Breakpoint 2 at 0x8124: file /home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c,
line 21.
(gdb) PASS: gdb.base/func-ptrs.exp: breakpoint at sentinel
break incr
Breakpoint 3 at 0x8132: file /home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c,
line 27.
(gdb) PASS: gdb.base/func-ptrs.exp: breakpoint at incr
break decr
Breakpoint 4 at 0x814a: file /home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c,
line 34.
(gdb) PASS: gdb.base/func-ptrs.exp: breakpoint at decr
continue
Continuing.
Breakpoint 3, incr (i=-1) at
/home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c:27
27 sentinel ();
(gdb) PASS: gdb.base/func-ptrs.exp: continue to incr, first time
finish
Run till exit from #0 incr (i=-1) at
/home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c:27
0x00008176 in main () at /home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c:45
45 i = calc (i);
Value returned is $1 = 0
(gdb) PASS: gdb.base/func-ptrs.exp: go back to main from incr, first time
set calc = decr
(gdb) PASS: gdb.base/func-ptrs.exp: set calc to decr
continue
Continuing.
Remote connection closed
(gdb) FAIL: gdb.base/func-ptrs.exp: continue to decr
Bug ID: 23121
Summary: the thumb function pointer without mode bit
Product: gdb
Version: 8.1
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: guosheng_gao at realsil dot com.cn
Target Milestone: ---
I found that the func-ptrs.exp can’t run remote arm (thumb) target:
The main reasons is the thumb function pointer without mode bit, look the red
line
‘calc’ is a thumb function pointer, ‘decr’ is a thumb function, but the
lowest position is not 1, without mode bit in GDB.
If ‘calc’ is set to ‘decr’, it cann’t run my remote target. But if I add a mode
bit to decr, it runs OK.
set calc = decr
(gdb) PASS: gdb.base/func-ptrs.exp: set calc to decr
continue
Continuing.
Remote connection closed
So, Who knows how to fix this problem in GDB.
(gdb) load /home/gdbtest-2.0/run/outputs/gdb.base/func-ptrs/func-ptrs
Loading section .init, size 0xc lma 0x8000
Loading section .text, size 0x418 lma 0x800c
Loading section .fini, size 0xc lma 0x8424
Loading section .rodata, size 0x4 lma 0x8430
Loading section .ARM.exidx, size 0x8 lma 0x8434
Loading section .eh_frame, size 0x4 lma 0x843c
Loading section .init_array, size 0x4 lma 0x18440
Loading section .fini_array, size 0x4 lma 0x18444
Loading section .jcr, size 0x4 lma 0x18448
Loading section .data, size 0x438 lma 0x18450
Start address 0x80b4, load size 2180
Transfer rate: 17440 bits in <1 sec, 218 bytes/write.
(gdb) continue
Continuing.
Breakpoint 1, main () at /home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c:43
43 int i = -1;
(gdb) break sentinel if calc == decr
Breakpoint 2 at 0x8124: file /home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c,
line 21.
(gdb) PASS: gdb.base/func-ptrs.exp: breakpoint at sentinel
break incr
Breakpoint 3 at 0x8132: file /home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c,
line 27.
(gdb) PASS: gdb.base/func-ptrs.exp: breakpoint at incr
break decr
Breakpoint 4 at 0x814a: file /home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c,
line 34.
(gdb) PASS: gdb.base/func-ptrs.exp: breakpoint at decr
continue
Continuing.
Breakpoint 3, incr (i=-1) at
/home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c:27
27 sentinel ();
(gdb) PASS: gdb.base/func-ptrs.exp: continue to incr, first time
finish
Run till exit from #0 incr (i=-1) at
/home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c:27
0x00008176 in main () at /home/gdb-7.12/gdb/testsuite/gdb.base/func-ptrs.c:45
45 i = calc (i);
Value returned is $1 = 0
(gdb) PASS: gdb.base/func-ptrs.exp: go back to main from incr, first time
set calc = decr
(gdb) PASS: gdb.base/func-ptrs.exp: set calc to decr
continue
Continuing.
Remote connection closed
(gdb) FAIL: gdb.base/func-ptrs.exp: continue to decr
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.