diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2014-05-14 14:08:57 -0600 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2014-12-12 22:25:37 +0100 |
commit | f208eee0f3a4f42a0bf20ab900eb36fbba8e4b9e (patch) | |
tree | 8984185ee57c14d23c39794558eda58f36659887 /gdb/arch-utils.h | |
parent | 233a8fb382c88d7faa6da1cd93a7e21b77e36df4 (diff) | |
download | gdb-f208eee0f3a4f42a0bf20ab900eb36fbba8e4b9e.zip gdb-f208eee0f3a4f42a0bf20ab900eb36fbba8e4b9e.tar.gz gdb-f208eee0f3a4f42a0bf20ab900eb36fbba8e4b9e.tar.bz2 |
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.
Diffstat (limited to 'gdb/arch-utils.h')
-rw-r--r-- | gdb/arch-utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/arch-utils.h b/gdb/arch-utils.h index 11e68e2..e1d2c4a 100644 --- a/gdb/arch-utils.h +++ b/gdb/arch-utils.h @@ -193,4 +193,13 @@ extern int default_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *ra module determines whether a breakpoint is permanent. */ extern void default_skip_permanent_breakpoint (struct regcache *regcache); +/* Symbols for gdbarch_infcall_mmap; their Linux PROT_* system + definitions would be dependent on compilation host. */ +#define GDB_MMAP_PROT_READ 0x1 /* Page can be read. */ +#define GDB_MMAP_PROT_WRITE 0x2 /* Page can be written. */ +#define GDB_MMAP_PROT_EXEC 0x4 /* Page can be executed. */ + +extern CORE_ADDR default_infcall_mmap (CORE_ADDR size, unsigned prot); +extern char *default_gcc_target_options (struct gdbarch *gdbarch); + #endif |