mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
gdb::{unique_ptr,move} -> std::{unique_ptr,move}
Now that we require C++11, use std::unique_ptr and std::move directly. gdb/ChangeLog: 2016-11-15 Pedro Alves <palves@redhat.com> * ada-lang.c (create_excep_cond_exprs): Use std::move instead of gdb::move. * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::unique_ptr instead of gdb::unique_ptr. * breakpoint.c (watch_command_1): Use std::move instead of gdb::move. * cli/cli-dump.c (dump_memory_to_file, restore_binary_file): Use std::unique_ptr instead of gdb::unique_ptr. * dtrace-probe.c (dtrace_process_dof_probe): Use std::move instead of gdb::move. * elfread.c (elf_read_minimal_symbols): Use std::unique_ptr instead of gdb::unique_ptr. * mi/mi-main.c (mi_cmd_data_read_memory): Use std::unique_ptr instead of gdb::unique_ptr. * parse.c (parse_expression_for_completion): Use std::move instead of gdb::move. * printcmd.c (display_command): std::move instead of gdb::move.
This commit is contained in:
parent
b7f38fdae7
commit
b22e99fdaf
@ -1,3 +1,23 @@
|
||||
2016-11-15 Pedro Alves <palves@redhat.com>
|
||||
|
||||
* ada-lang.c (create_excep_cond_exprs): Use std::move instead of
|
||||
gdb::move.
|
||||
* break-catch-throw.c (handle_gnu_v3_exceptions): Use
|
||||
std::unique_ptr instead of gdb::unique_ptr.
|
||||
* breakpoint.c (watch_command_1): Use std::move instead of
|
||||
gdb::move.
|
||||
* cli/cli-dump.c (dump_memory_to_file, restore_binary_file): Use
|
||||
std::unique_ptr instead of gdb::unique_ptr.
|
||||
* dtrace-probe.c (dtrace_process_dof_probe): Use std::move instead
|
||||
of gdb::move.
|
||||
* elfread.c (elf_read_minimal_symbols): Use std::unique_ptr
|
||||
instead of gdb::unique_ptr.
|
||||
* mi/mi-main.c (mi_cmd_data_read_memory): Use std::unique_ptr
|
||||
instead of gdb::unique_ptr.
|
||||
* parse.c (parse_expression_for_completion): Use std::move instead
|
||||
of gdb::move.
|
||||
* printcmd.c (display_command): std::move instead of gdb::move.
|
||||
|
||||
2016-11-14 Markus Metzger <markus.t.metzger@intel.com>
|
||||
|
||||
* nat/linux-btrace.c (perf_event_read): Allow data_head < size.
|
||||
|
@ -12347,7 +12347,7 @@ create_excep_cond_exprs (struct ada_catchpoint *c)
|
||||
s = cond_string;
|
||||
TRY
|
||||
{
|
||||
exp = gdb::move (parse_exp_1 (&s, bl->address,
|
||||
exp = std::move (parse_exp_1 (&s, bl->address,
|
||||
block_for_pc (bl->address),
|
||||
0));
|
||||
}
|
||||
@ -12360,7 +12360,7 @@ create_excep_cond_exprs (struct ada_catchpoint *c)
|
||||
END_CATCH
|
||||
}
|
||||
|
||||
ada_loc->excep_cond_expr = gdb::move (exp);
|
||||
ada_loc->excep_cond_expr = std::move (exp);
|
||||
}
|
||||
|
||||
do_cleanups (old_chain);
|
||||
|
@ -399,7 +399,7 @@ handle_gnu_v3_exceptions (int tempflag, char *except_rx, char *cond_string,
|
||||
_("invalid type-matching regexp"));
|
||||
}
|
||||
|
||||
gdb::unique_ptr<exception_catchpoint> cp (new exception_catchpoint ());
|
||||
std::unique_ptr<exception_catchpoint> cp (new exception_catchpoint ());
|
||||
|
||||
init_catchpoint (&cp->base, get_current_arch (), tempflag, cond_string,
|
||||
&gnu_v3_exception_catchpoint_ops);
|
||||
|
@ -11378,7 +11378,7 @@ watch_command_1 (const char *arg, int accessflag, int from_tty,
|
||||
b->thread = thread;
|
||||
b->disposition = disp_donttouch;
|
||||
b->pspace = current_program_space;
|
||||
w->exp = gdb::move (exp);
|
||||
w->exp = std::move (exp);
|
||||
w->exp_valid_block = exp_valid_block;
|
||||
w->cond_exp_valid_block = cond_exp_valid_block;
|
||||
if (just_location)
|
||||
|
@ -236,7 +236,7 @@ dump_memory_to_file (const char *cmd, const char *mode, const char *file_format)
|
||||
|
||||
/* FIXME: Should use read_memory_partial() and a magic blocking
|
||||
value. */
|
||||
gdb::unique_ptr<gdb_byte[]> buf (new gdb_byte[count]);
|
||||
std::unique_ptr<gdb_byte[]> buf (new gdb_byte[count]);
|
||||
read_memory (lo, buf.get (), count);
|
||||
|
||||
/* Have everything. Open/write the data. */
|
||||
@ -550,7 +550,7 @@ restore_binary_file (const char *filename, struct callback_data *data)
|
||||
perror_with_name (filename);
|
||||
|
||||
/* Now allocate a buffer and read the file contents. */
|
||||
gdb::unique_ptr<gdb_byte[]> buf (new gdb_byte[len]);
|
||||
std::unique_ptr<gdb_byte[]> buf (new gdb_byte[len]);
|
||||
if (fread (buf.get (), 1, len, file) != len)
|
||||
perror_with_name (filename);
|
||||
|
||||
|
@ -430,7 +430,7 @@ dtrace_process_dof_probe (struct objfile *objfile,
|
||||
|
||||
TRY
|
||||
{
|
||||
expr = gdb::move (parse_expression_with_language (arg.type_str,
|
||||
expr = std::move (parse_expression_with_language (arg.type_str,
|
||||
language_c));
|
||||
}
|
||||
CATCH (ex, RETURN_MASK_ERROR)
|
||||
|
@ -1136,7 +1136,7 @@ elf_read_minimal_symbols (struct objfile *objfile, int symfile_flags,
|
||||
{
|
||||
long i;
|
||||
|
||||
gdb::unique_ptr<asymbol *[]>
|
||||
std::unique_ptr<asymbol *[]>
|
||||
synth_symbol_table (new asymbol *[synthcount]);
|
||||
for (i = 0; i < synthcount; i++)
|
||||
synth_symbol_table[i] = synthsyms + i;
|
||||
|
@ -1504,7 +1504,7 @@ mi_cmd_data_read_memory (char *command, char **argv, int argc)
|
||||
/* Create a buffer and read it in. */
|
||||
total_bytes = word_size * nr_rows * nr_cols;
|
||||
|
||||
gdb::unique_ptr<gdb_byte[]> mbuf (new gdb_byte[total_bytes]);
|
||||
std::unique_ptr<gdb_byte[]> mbuf (new gdb_byte[total_bytes]);
|
||||
|
||||
/* Dispatch memory reads to the topmost target, not the flattened
|
||||
current_target. */
|
||||
|
@ -1309,7 +1309,7 @@ parse_expression_for_completion (const char *string, char **name,
|
||||
TRY
|
||||
{
|
||||
parse_completion = 1;
|
||||
exp = gdb::move (parse_exp_in_context (&string, 0, 0, 0, 0, &subexp));
|
||||
exp = std::move (parse_exp_in_context (&string, 0, 0, 0, 0, &subexp));
|
||||
}
|
||||
CATCH (except, RETURN_MASK_ERROR)
|
||||
{
|
||||
|
@ -1779,7 +1779,7 @@ display_command (char *arg, int from_tty)
|
||||
newobj = new display ();
|
||||
|
||||
newobj->exp_string = xstrdup (exp);
|
||||
newobj->exp = gdb::move (expr);
|
||||
newobj->exp = std::move (expr);
|
||||
newobj->block = innermost_block;
|
||||
newobj->pspace = current_program_space;
|
||||
newobj->number = ++display_number;
|
||||
|
Loading…
Reference in New Issue
Block a user