This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix type of expr in info_mach_region_command (fixes OSX build)


gdb wasn't building on OSX. Colleague fixed it.

error was

darwin-nat-info.c:733:8: error: assigning to 'struct expression *'
from incompatible type 'expression_up' (aka
      'std::__1::unique_ptr<expression, gdb::xfree_deleter<expression> >')
  expr = parse_expression (exp);
       ^ ~~~~~~~~~~~~~~~~~~~~~~


-----

2016-12-15 Boris Zbarsky  <bzbarsky@mozilla.com>

gdb/ChangeLog:
    * darwin-nat-info.c (info_mach_region_command): Update
    type of `expr` to `expression_up`
---
 gdb/darwin-nat-info.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gdb/darwin-nat-info.c b/gdb/darwin-nat-info.c
index 314d265..a74938a 100644
--- a/gdb/darwin-nat-info.c
+++ b/gdb/darwin-nat-info.c
@@ -725,13 +725,13 @@ info_mach_regions_recurse_command (char *args,
int from_tty)
 static void
 info_mach_region_command (char *exp, int from_tty)
 {
-  struct expression *expr;
+  expression_up expr;
   struct value *val;
   mach_vm_address_t address;
   struct inferior *inf;

   expr = parse_expression (exp);
-  val = evaluate_expression (expr);
+  val = evaluate_expression (expr.get());
   if (TYPE_CODE (value_type (val)) == TYPE_CODE_REF)
     {
       val = value_ind (val);
-- 
2.10.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]