This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] gdbserver x86 on win32: call init_target_desc
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Fri, 22 Sep 2017 11:47:18 -0400
- Subject: [binutils-gdb] gdbserver x86 on win32: call init_target_desc
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT cc4d742f4ce05bf933397a513b953c0feeae0663 ***
Author: Simon Marchi <simon.marchi@ericsson.com>
Branch: master
Commit: cc4d742f4ce05bf933397a513b953c0feeae0663
gdbserver x86 on win32: call init_target_desc
When trying to run gdbserver compiled for x86 win32 under wine, I get:
$ wine ./gdbserver/gdbserver.exe --once :1234 ./test
/home/emaisin/src/binutils-gdb/gdb/gdbserver/regcache.c:177: A problem internal to GDBserver has been detected.
regcache* new_register_cache(const target_desc*): Assertion `tdesc->registers_size != 0' failed.
It seems like on that platform, init_target_desc is never called, so
registers_size is never computed.
My first thought was to call init_target_desc somewhere in win32-low.c,
but it turns out that when using win32 on arm, the target description is
already initialized by the generated code. My second thought was to
call it in {i386,amd64}_create_target_description, but those functions
are shared with GDB, and init_target_desc is gdbserver-specific. So I
ended up with the simplest fix, calling it in i386_arch_setup.
Now I hit some other problem:
$ wine ./gdbserver/gdbserver.exe --once :1234 ./test
Killing process(es): 39
No program to debug
Exiting
but still, I think fixing the tdesc issue this is a step forward.
gdb/gdbserver/ChangeLog:
* win32-i386-low.c (i386_arch_setup): Call init_target_desc.
- Follow-Ups:
- Failures on Fedora-s390x-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Ubuntu-AArch32-m32, branch master
- Failures on Ubuntu-AArch64-m64, branch master
- Failures on Ubuntu-AArch32-native-extended-gdbserver-m32, branch master
- Failures on Ubuntu-AArch32-native-gdbserver-m32, branch master