diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2015-10-23 19:48:48 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2015-10-23 19:54:09 -0400 |
commit | a55515eecb1c8edb875e30a411afc55f304e88d9 (patch) | |
tree | 38b83f228e7b0d66425827de993fdc44d90f3aab /gdb/nat | |
parent | 6ecf4e06a48cfc6dfbdf7c8f2969ffe7271f15da (diff) | |
download | gdb-a55515eecb1c8edb875e30a411afc55f304e88d9.zip gdb-a55515eecb1c8edb875e30a411afc55f304e88d9.tar.gz gdb-a55515eecb1c8edb875e30a411afc55f304e88d9.tar.bz2 |
Add mmap casts in linux-btrace.c
gdb/ChangeLog:
* linux-btrace.c (linux_enable_pt): Add cast to mmap return.
Diffstat (limited to 'gdb/nat')
-rw-r--r-- | gdb/nat/linux-btrace.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c index 3173146..1c3cb40 100644 --- a/gdb/nat/linux-btrace.c +++ b/gdb/nat/linux-btrace.c @@ -820,8 +820,9 @@ linux_enable_pt (ptid_t ptid, const struct btrace_config_pt *conf) goto err; /* Allocate the configuration page. */ - header = mmap (NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, - pt->file, 0); + header = ((struct perf_event_mmap_page *) + mmap (NULL, PAGE_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, + pt->file, 0)); if (header == MAP_FAILED) goto err_file; @@ -862,8 +863,9 @@ linux_enable_pt (ptid_t ptid, const struct btrace_config_pt *conf) header->aux_size = data_size; length = size; - pt->pt.mem = mmap (NULL, length, PROT_READ, MAP_SHARED, pt->file, - header->aux_offset); + pt->pt.mem = ((const uint8_t *) + mmap (NULL, length, PROT_READ, MAP_SHARED, pt->file, + header->aux_offset)); if (pt->pt.mem != MAP_FAILED) break; } |