Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Christian Biesinger via gdb-patches" <gdb-patches@sourceware.org>
To: Tom Tromey <tom@tromey.com>
Cc: Christian Biesinger via gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH 2/3] Factor out the code to do the datadir-relocation for gdbinit
Date: Tue, 10 Sep 2019 19:14:00 -0000	[thread overview]
Message-ID: <CAPTJ0XFqBrQEcm=w7c+86h9=pFucKeHQMpgC7JhgDTFk7sUz3Q@mail.gmail.com> (raw)
In-Reply-To: <87k1ag6v4b.fsf@tromey.com>

On Tue, Sep 10, 2019 at 10:15 AM Tom Tromey <tom@tromey.com> wrote:
>
> >>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:
>
> Christian> This simplifies get_init_files and makes it possible to reuse
> Christian> this code in an upcoming patch for SYSTEM_GDBINIT_DIR.
>
>
> Christian> +static std::string
> Christian> +relocate_gdbinit_path_maybe_in_datadir (const std::string& file)
> Christian> +{
>
> New functions should have an introductory comment.

Done.

> Christian> +      for (; IS_DIR_SEPARATOR (file[start]); ++start)
> Christian> +    continue;
>
> Just omit the "continue" and leave a bare ";".

Done.

> Christian> +      relocated_path = std::string (gdb_datadir) + SLASH_STRING +
> Christian> +    file.substr(start);
>
> This needs parens on the RHS and should be indented differently.
> Also, space before the "(" after "substr".

Done.

> Christian> +      std::string relocated_sysgdbinit =
> Christian> +        relocate_gdbinit_path_maybe_in_datadir (SYSTEM_GDBINIT);
>
> "=" at start of continuation line.

Done.


  reply	other threads:[~2019-09-10 19:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09 18:08 [PATCH 0/3] Refactor some path methods in main.c to use std::string Christian Biesinger via gdb-patches
2019-09-09 18:08 ` [PATCH 3/3] Make relocate_{path,gdb_directory} return std::string Christian Biesinger via gdb-patches
2019-09-10 15:27   ` Tom Tromey
2019-09-10 19:56     ` Christian Biesinger via gdb-patches
2019-09-10 19:58       ` [PATCH v2 " Christian Biesinger via gdb-patches
2019-09-11 20:24         ` Tom Tromey
2019-09-11 20:22       ` [PATCH " Tom Tromey
2019-09-09 18:08 ` [PATCH 2/3] Factor out the code to do the datadir-relocation for gdbinit Christian Biesinger via gdb-patches
2019-09-10 15:15   ` Tom Tromey
2019-09-10 19:14     ` Christian Biesinger via gdb-patches [this message]
2019-09-10 19:14       ` [PATCH 2/3 v2] " Christian Biesinger via gdb-patches
2019-09-11 20:15         ` Tom Tromey
2019-09-09 18:08 ` [PATCH 1/3] Refactor get_init_files to use std::string Christian Biesinger via gdb-patches
2019-09-10 15:02   ` Tom Tromey
2019-09-10 19:23     ` [PATCH 1/3 v2] " Christian Biesinger via gdb-patches
2019-09-11 20:16       ` Tom Tromey
2019-09-11 21:36 ` [PATCH 0/3] Refactor some path methods in main.c " Christian Biesinger via gdb-patches
  -- strict thread matches above, loose matches on Subject: below --
2019-08-20 22:17 [PATCH 0/3] [RFC] Load gdbinit files from a directory Christian Biesinger via gdb-patches
2019-08-20 22:18 ` [PATCH 2/3] Factor out the code to do the datadir-relocation for gdbinit Christian Biesinger via gdb-patches
2019-08-21 17:19   ` Sergio Durigan Junior
2019-08-21 17:44     ` Christian Biesinger via gdb-patches
2019-08-21 17:47       ` Sergio Durigan Junior
2019-08-21 18:08         ` Christian Biesinger via gdb-patches
2019-08-21 18:10           ` Sergio Durigan Junior

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='CAPTJ0XFqBrQEcm=w7c+86h9=pFucKeHQMpgC7JhgDTFk7sUz3Q@mail.gmail.com' \
    --to=gdb-patches@sourceware.org \
    --cc=cbiesinger@google.com \
    --cc=tom@tromey.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