main/gdb: fix segfault inspecting var on MCU
obj_section->the_bfd_section
is dereferenced in
language_defn::read_var_value()
without checking it for being NULL
.
This causes a segfault when inspecting a variable (located in the
memory mapped I/O region) on a remote MSP430 embedded target connected
via JTAG.
This adds a trivial patch adding the NULL
pointer check that fixes
the segfault.
See https://sourceware.org/bugzilla/show_bug.cgi?id=30431 for details.