i386-tdep: Verify architecture before proceeding with `set/show mpx'
authorMaciej W. Rozycki <macro@imgtec.com>
Mon, 17 Oct 2016 15:15:33 +0000 (16:15 +0100)
committerMaciej W. Rozycki <macro@imgtec.com>
Tue, 18 Oct 2016 03:42:23 +0000 (04:42 +0100)
commitae71e7b59836219c617193a263b17041d765a031
tree52cc5e5a7f1bc71565472cc35376da2d95049d61
parentb348d11b70068e7eabba6d8f99d4ad371c3f6253
i386-tdep: Verify architecture before proceeding with `set/show mpx'

Make sure the architecture is `bfd_arch_i386' before handling the `set
mpx' and `show mpx' commands, avoiding the issue with `i386_mpx_enabled'
interpreting `gdbarch->tdep' according to the `struct gdbarch_tdep'
definition in i386-tdep.h while indeed in a multi-target configuration
it may have a different layout and cause GDB to crash or at least
misbehave.

gdb/
* i386-tdep.c (i386_mpx_info_bounds): Make sure the architecture
is `bfd_arch_i386' before proceeding.
(i386_mpx_set_bounds): Likewise.
gdb/ChangeLog
gdb/i386-tdep.c
This page took 0.026265 seconds and 4 git commands to generate.