aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-11-15 19:54:21 +0000
committerPedro Alves <palves@redhat.com>2016-11-15 19:54:21 +0000
commitb22e99fdaf2efe58161c382bbd55f4572ba49eef (patch)
treecd655e8a447f98e450a1781f0b68250bc17be191
parentb7f38fdae7c75e1d13abd455b3931950db28d22b (diff)
downloadgdb-b22e99fdaf2efe58161c382bbd55f4572ba49eef.zip
gdb-b22e99fdaf2efe58161c382bbd55f4572ba49eef.tar.gz
gdb-b22e99fdaf2efe58161c382bbd55f4572ba49eef.tar.bz2
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.
-rw-r--r--gdb/ChangeLog20
-rw-r--r--gdb/ada-lang.c4
-rw-r--r--gdb/break-catch-throw.c2
-rw-r--r--gdb/breakpoint.c2
-rw-r--r--gdb/cli/cli-dump.c4
-rw-r--r--gdb/dtrace-probe.c2
-rw-r--r--gdb/elfread.c2
-rw-r--r--gdb/mi/mi-main.c2
-rw-r--r--gdb/parse.c2
-rw-r--r--gdb/printcmd.c2
10 files changed, 31 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 600925f..814f0c0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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.
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index d9b46c6..73f7964 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -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);
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index 6136a57..955b2ff 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -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);
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 245e078..d139747 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -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)
diff --git a/gdb/cli/cli-dump.c b/gdb/cli/cli-dump.c
index eb7f69d..781c638 100644
--- a/gdb/cli/cli-dump.c
+++ b/gdb/cli/cli-dump.c
@@ -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);
diff --git a/gdb/dtrace-probe.c b/gdb/dtrace-probe.c
index cbeeea8..38654a4 100644
--- a/gdb/dtrace-probe.c
+++ b/gdb/dtrace-probe.c
@@ -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)
diff --git a/gdb/elfread.c b/gdb/elfread.c
index 7349c83..e49af6d 100644
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -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;
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 31b413e..984a415 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -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. */
diff --git a/gdb/parse.c b/gdb/parse.c
index e921438..afafc35 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -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)
{
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 8f865d2..f434f5f 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -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;