From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] Make linux_ptrace_attach_fail_reason return an std::string
Date: Wed, 17 Jan 2018 12:26:00 -0000 [thread overview]
Message-ID: <911e4e06-81a2-1186-3b6c-e4d7b69c3385@redhat.com> (raw)
In-Reply-To: <1514732385-5506-2-git-send-email-simon.marchi@ericsson.com>
On 12/31/2017 02:59 PM, Simon Marchi wrote:
> This patch makes linux_ptrace_attach_fail_reason and
> linux_ptrace_attach_fail_reason_string return std::string. It also
> replaces usages of struct buffer with std::string. This allows getting
> rid of a cleanup in in linux_ptrace_attach_fail_reason_string and
> simplifies the code in general.
>
> Something that looks odd to me is that in
> linux_ptrace_attach_fail_reason, if the two messages are appended, there
> is no separate space or \n, so the result won't be very nice. I left it
> as-is for now though.
>
> gdb/ChangeLog:
>
> * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
> std::string.
> (linux_ptrace_attach_fail_reason_string): Likewise.
> * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
> Likewise.
> (linux_ptrace_attach_fail_reason_string): Likewise.
> * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
>
> gdb/gdbserver/ChangeLog:
>
> * linux-low.c (attach_proc_task_lwp_callback): Adjust to
> linux_ptrace_attach_fail_reason_string now returning an
> std::string.
> (linux_attach): Likewise.
> * thread-db.c (attach_thread): Likewise.
LGTM.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-01-17 12:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-31 15:00 [PATCH 1/2] linux-nat: Remove unnecessary xstrdup Simon Marchi
2017-12-31 15:00 ` [PATCH 2/2] Make linux_ptrace_attach_fail_reason return an std::string Simon Marchi
2018-01-17 12:26 ` Pedro Alves [this message]
2018-01-17 12:25 ` [PATCH 1/2] linux-nat: Remove unnecessary xstrdup Pedro Alves
2018-01-17 17:36 ` Simon Marchi
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=911e4e06-81a2-1186-3b6c-e4d7b69c3385@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@ericsson.com \
/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).