This is the mail archive of the gdb-patches@sourceware.org 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]

[PATCH] Fix gdb.base/shreloc.exp: (msymbol) relocated functions have different addresses fail in cygwin


Hi,

I got fail with gdb.base/shreloc.exp in cygwin:
shell grep -E " fn_[12]([ ^G]+.*)?$"
/home/hzhu/bg/gdb/testsuite/gdb.base/shreloc.txt^M
[20] A 0x0 fn_1 section .text^M
[21] A 0x0 fn_2 section .text^M
[35] T 0x40010e0 fn_1 section .text^M
[30] T 0x4310e0 fn_2 section .text^M
(gdb) PASS: gdb.base/shreloc.exp: get_msym_addrs fn_[12]
FAIL: gdb.base/shreloc.exp: (msymbol) relocated functions have
different addresses
The reason is because the address of fn_1 and fn_2 is same.
But I checked the file with nm:
$ nm gdb.base/shreloc.exe | grep fn
004050c0 I __imp__fn_1
004050cc I __imp__fn_2
00000000 A _fn_1
00000000 A _fn_2

I think the behavior of GDB to output same address is right.  So I
make a patch to test.

Please help me review it.

Thanks,
Hui

2013-09-09  Hui Zhu  <hui@codesourcery.com>

* gdb.base/shreloc.exp (get_msym_addrs): Add argument "plus_var".
(check_different): Ditto.

Attachment: fix-cygwin-shreloc.txt
Description: Text document


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