gdb::{unique_ptr,move} -> std::{unique_ptr,move}
authorPedro Alves <palves@redhat.com>
Tue, 15 Nov 2016 19:54:21 +0000 (19:54 +0000)
committerPedro Alves <palves@redhat.com>
Tue, 15 Nov 2016 19:54:21 +0000 (19:54 +0000)
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.

gdb/ChangeLog
gdb/ada-lang.c
gdb/break-catch-throw.c
gdb/breakpoint.c
gdb/cli/cli-dump.c
gdb/dtrace-probe.c
gdb/elfread.c
gdb/mi/mi-main.c
gdb/parse.c
gdb/printcmd.c

index 600925fc18bc7f55751c2a00bd7ee72b0a60a745..814f0c0f299ebfb1e58b2cf1488fd1c8ce70ca46 100644 (file)
@@ -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.
index d9b46c6e8cf438c5aa9b7ec19ea0fa685b5d0480..73f7964ddf935b93951c8a9430912e8067e8614e 100644 (file)
@@ -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);
index 6136a573c6319ddec54c4102cffdcd0e71c598a5..955b2ff4aaa100bd978a2b04830ed3918141bbb6 100644 (file)
@@ -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);
index 245e0784969df8256ef242f742870e5fd449a09c..d139747200e5be858a1529dab9421a603815579b 100644 (file)
@@ -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)
index eb7f69d4a2573e4b3a92a6745bf7a750aef74e17..781c63888f67589efccae76afc0e377372ec2290 100644 (file)
@@ -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);
 
index cbeeea8e572c7baefcd83f658003bc138672985b..38654a4ad2772f14dd435b749d99c3704686ade4 100644 (file)
@@ -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)
index 7349c83dcf6acc79718bad1b4f6e9e396404a6db..e49af6dc5fdbf17cf65b60dcf7490949742a36d8 100644 (file)
@@ -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;
index 31b413e38c829f4d5197c821bc53a3eadcbc28fe..984a415a052a6c74e1fb61e0d326cde0e75dc9d0 100644 (file)
@@ -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.  */
index e9214385d0bdd7ce17bd97671cbe5af2be73495b..afafc35cfb8f8e958ba000a863480c999d792c7a 100644 (file)
@@ -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)
     {
index 8f865d2f5de1a725d609b89369a37fbec8dd5aee..f434f5f70ab4810c0cf2eac7b86ca73bdca92470 100644 (file)
@@ -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;
This page took 0.042993 seconds and 4 git commands to generate.