public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Tom de Vries <tdevries@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] [gdb/build] Support reference return type in make-target-delegates.py
Date: Wed, 23 Aug 2023 16:43:32 +0100	[thread overview]
Message-ID: <3a579dd3-869f-be70-740e-3b69c6dd0d1e@palves.net> (raw)
In-Reply-To: <20230821105356.869-1-tdevries@suse.de>

On 21/08/23 11:53, Tom de Vries via Gdb-patches wrote:
> When doing this in target.h:
> ...
> -    virtual gdb::byte_vector thread_info_to_thread_handle (struct thread_info *)
> +    virtual gdb::byte_vector &thread_info_to_thread_handle (struct thread_info *)
> ...
> make-target-delegates.py drops the function.
> 
> By handling '&' in POINTER_PART we can prevent that the function is dropped,
> but when recompiling target.o we get:
> ...
> gdb/target-delegates.c: In member function ‘virtual gdb::byte_vector& \
>   debug_target::thread_info_to_thread_handle(thread_info*)’:
> gdb/target-delegates.c:1889:22: error: ‘result’ declared as reference but not \
>   initialized
>    gdb::byte_vector & result;
>                       ^~~~~~
> make: *** [Makefile:1923: target.o] Error 1
> ...
> 
> Fix this by making sure result is initialized.
> 
> Regenerate target-delegates.c using this new style.
> 
> Tested on x86_64-linux.


Approved-By: Pedro Alves <pedro@palves.net>


      parent reply	other threads:[~2023-08-23 15:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-21 10:53 Tom de Vries
2023-08-21 10:53 ` [PATCH 2/2] [gdb/build] Return const reference in thread_info_to_thread_handle Tom de Vries
2023-08-22 14:43   ` Pedro Alves
2023-08-22 17:34     ` Tom de Vries
2023-08-23 15:43       ` Pedro Alves
2023-08-24  6:21         ` Tom de Vries
2023-08-24 11:37           ` Pedro Alves
2023-08-23 15:43 ` Pedro Alves [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a579dd3-869f-be70-740e-3b69c6dd0d1e@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).