diff options
author | Marcin Kościelnicki <koriakin@0x04.net> | 2016-03-31 23:29:08 +0200 |
---|---|---|
committer | Marcin Kościelnicki <koriakin@0x04.net> | 2016-03-31 23:38:03 +0200 |
commit | 252db07e1d4c5733b91a53b9fe4881b873eae049 (patch) | |
tree | 8434da595255dd5a8fffad6b53559f0366a0e94d | |
parent | 64cdf930d9ed85e93ae55adbc20b0f9848ef863b (diff) | |
download | gdb-252db07e1d4c5733b91a53b9fe4881b873eae049.zip gdb-252db07e1d4c5733b91a53b9fe4881b873eae049.tar.gz gdb-252db07e1d4c5733b91a53b9fe4881b873eae049.tar.bz2 |
gdbserver: Fix C++ build errors in tracepoint.c
These were introduced by 1cda1512689aabb36588a01370002632a0c8e560
and a13c46966d308297a1273e35ccc807a3912d573d . One is a simple
missing cast, the other is const usage on global function pointers
exported from IPA: in C++, consts are static, and thus won't be
exported from the DSO (the build error was because of non-applicable
visibility("default")).
gdb/gdbserver/ChangeLog:
* tracepoint.c (gdb_collect_ptr): Remove const qualifier.
(get_raw_reg_ptr): Likewise.
(get_trace_state_variable_value_ptr): Likewise.
(set_trace_state_variable_value_ptr): Likewise.
(initialize_tracepoint): Cast alloc_jump_pad_buffer result to
char *.
-rw-r--r-- | gdb/gdbserver/ChangeLog | 9 | ||||
-rw-r--r-- | gdb/gdbserver/tracepoint.c | 10 |
2 files changed, 14 insertions, 5 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index a1b95b7..39a1be0 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,12 @@ +2016-03-31 Marcin Kościelnicki <koriakin@0x04.net> + + * tracepoint.c (gdb_collect_ptr): Remove const qualifier. + (get_raw_reg_ptr): Likewise. + (get_trace_state_variable_value_ptr): Likewise. + (set_trace_state_variable_value_ptr): Likewise. + (initialize_tracepoint): Cast alloc_jump_pad_buffer result to + char *. + 2016-03-31 Wei-cheng Wang <cole945@gmail.com> Marcin Kościelnicki <koriakin@0x04.net> diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 56b8e69..8f71325 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -5903,11 +5903,11 @@ typedef LONGEST (*get_trace_state_variable_value_ptr_type) (int); typedef void (*set_trace_state_variable_value_ptr_type) (int, LONGEST); EXTERN_C_PUSH -IP_AGENT_EXPORT_VAR const gdb_collect_ptr_type gdb_collect_ptr = gdb_collect; -IP_AGENT_EXPORT_VAR const get_raw_reg_ptr_type get_raw_reg_ptr = get_raw_reg; -IP_AGENT_EXPORT_VAR const get_trace_state_variable_value_ptr_type +IP_AGENT_EXPORT_VAR gdb_collect_ptr_type gdb_collect_ptr = gdb_collect; +IP_AGENT_EXPORT_VAR get_raw_reg_ptr_type get_raw_reg_ptr = get_raw_reg; +IP_AGENT_EXPORT_VAR get_trace_state_variable_value_ptr_type get_trace_state_variable_value_ptr = get_trace_state_variable_value; -IP_AGENT_EXPORT_VAR const set_trace_state_variable_value_ptr_type +IP_AGENT_EXPORT_VAR set_trace_state_variable_value_ptr_type set_trace_state_variable_value_ptr = set_trace_state_variable_value; EXTERN_C_POP @@ -7440,7 +7440,7 @@ initialize_tracepoint (void) jump_pad_size = pagesize * SCRATCH_BUFFER_NPAGES; gdb_tp_heap_buffer = (char *) xmalloc (5 * 1024 * 1024); - gdb_jump_pad_buffer = alloc_jump_pad_buffer (jump_pad_size); + gdb_jump_pad_buffer = (char *) alloc_jump_pad_buffer (jump_pad_size); if (gdb_jump_pad_buffer == NULL) perror_with_name ("mmap"); gdb_jump_pad_buffer_end = gdb_jump_pad_buffer + jump_pad_size; |