public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix type of expr in info_mach_region_command (fixes OSX build)
@ 2016-12-15 20:17 Manish Goregaokar
  2016-12-16 11:36 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Manish Goregaokar @ 2016-12-15 20:17 UTC (permalink / raw)
  To: gdb-patches

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix type of expr in info_mach_region_command (fixes OSX build)
  2016-12-15 20:17 [PATCH] Fix type of expr in info_mach_region_command (fixes OSX build) Manish Goregaokar
@ 2016-12-16 11:36 ` Pedro Alves
  0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2016-12-16 11:36 UTC (permalink / raw)
  To: Manish Goregaokar, gdb-patches

On 12/15/2016 08:17 PM, Manish Goregaokar wrote:
> 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);
>        ^ ~~~~~~~~~~~~~~~~~~~~~~
> 

Oh, I just approved Bernhard's patch without noticing this one,
sorry about that:

 https://sourceware.org/ml/gdb-patches/2016-12/msg00318.html

I prefer his version for moving the declaration, but any
is fine...

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-12-16 11:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-15 20:17 [PATCH] Fix type of expr in info_mach_region_command (fixes OSX build) Manish Goregaokar
2016-12-16 11:36 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).