add infcall_mmap and gcc_target_options gdbarch methods
authorJan Kratochvil <jan.kratochvil@redhat.com>
Wed, 14 May 2014 20:08:57 +0000 (14:08 -0600)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 12 Dec 2014 21:25:37 +0000 (22:25 +0100)
commitf208eee0f3a4f42a0bf20ab900eb36fbba8e4b9e
tree8984185ee57c14d23c39794558eda58f36659887
parent233a8fb382c88d7faa6da1cd93a7e21b77e36df4
add infcall_mmap and gcc_target_options gdbarch methods

The compiler needed two new gdbarch methods.

The infcall_mmap method allocates memory in the inferior.
This is used when inserting the object code.

The gcc_target_options method computes some arch-specific gcc options
to pass to the compiler.  This is used to ensure that gcc generates
object code for the correct architecture.

gdb/ChangeLog
2014-12-12  Jan Kratochvil  <jan.kratochvil@redhat.com>

* arch-utils.c (default_infcall_mmap)
(default_gcc_target_options): New functions.
* arch-utils.h (GDB_MMAP_PROT_READ, GDB_MMAP_PROT_WRITE)
(GDB_MMAP_PROT_EXEC): Define.
(default_infcall_mmap, default_gcc_target_options): Declare.
* gdbarch.h: Rebuild.
* gdbarch.c: Rebuild.
* gdbarch.sh (infcall_mmap, gcc_target_options): New methods.
gdb/ChangeLog
gdb/arch-utils.c
gdb/arch-utils.h
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh