Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/3] [RFC] Load gdbinit files from a directory
@ 2019-08-20 22:17 Christian Biesinger via gdb-patches
  2019-08-20 22:18 ` [PATCH 1/3] Refactor get_init_files to use std::string Christian Biesinger via gdb-patches
                   ` (3 more replies)
  0 siblings, 4 replies; 32+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-08-20 22:17 UTC (permalink / raw)
  To: gdb-patches; +Cc: Christian Biesinger

This patch series is some refactoring and then a patch to load gdbinit
files from a directory, instead of only allowing a single file.

Fedora ships a system gdbinit file that does something similar; this
does this by default and also works if Python is disabled.

Christian Biesinger (3):
  Refactor get_init_files to use std::string
  Factor out the code to do the datadir-relocation for gdbinit
  Load system gdbinit files from a directory

 gdb/config.in    |   3 +
 gdb/configure    |  77 +++++++++++++++++++--
 gdb/configure.ac |   3 +
 gdb/main.c       | 175 ++++++++++++++++++++++++++++-------------------
 4 files changed, 183 insertions(+), 75 deletions(-)

-- 
2.23.0.rc1.153.gdeed80330f-goog


^ permalink raw reply	[flat|nested] 32+ messages in thread
* Re: [PATCH 2/3] Factor out the code to do the datadir-relocation for gdbinit
@ 2019-09-10 19:14 Christian Biesinger via gdb-patches
  2019-09-10 19:14 ` [PATCH 2/3 v2] " Christian Biesinger via gdb-patches
  0 siblings, 1 reply; 32+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-09-10 19:14 UTC (permalink / raw)
  To: Tom Tromey; +Cc: Christian Biesinger via gdb-patches

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.


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

end of thread, other threads:[~2019-10-13  1:19 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 1/3] Refactor get_init_files to use std::string Christian Biesinger via gdb-patches
2019-08-21 17:13   ` Sergio Durigan Junior
2019-08-21 17:29     ` Christian Biesinger via gdb-patches
2019-08-21 17:31       ` [PATCH 1/3 v2] " Christian Biesinger via gdb-patches
2019-08-21 17:34       ` [PATCH 1/3] " Sergio Durigan Junior
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:44       ` [PATCH 2/3 v2] " Christian Biesinger via gdb-patches
2019-08-21 17:47       ` [PATCH 2/3] " Sergio Durigan Junior
2019-08-21 18:08         ` Christian Biesinger via gdb-patches
2019-08-21 18:10           ` Sergio Durigan Junior
2019-08-20 22:18 ` [PATCH 3/3] Load system gdbinit files from a directory Christian Biesinger via gdb-patches
2019-08-21 17:32   ` Sergio Durigan Junior
2019-08-26  0:25     ` Christian Biesinger via gdb-patches
2019-08-26  0:33       ` [PATCH 3/3 v2] " Christian Biesinger via gdb-patches
2019-08-26  7:22         ` Eli Zaretskii
2019-09-12 22:12           ` Christian Biesinger via gdb-patches
2019-09-24 16:30             ` [PATCH 3/3 v3] " Christian Biesinger via gdb-patches
2019-10-03 18:42               ` Christian Biesinger via gdb-patches
2019-10-13  1:19                 ` Christian Biesinger via gdb-patches
2019-08-21 18:15   ` [PATCH 3/3] " Sergio Durigan Junior
2019-08-21 18:46     ` Christian Biesinger via gdb-patches
2019-08-21 18:13 ` [PATCH 0/3] [RFC] Load " Pedro Alves
2019-08-21 18:33   ` Christian Biesinger via gdb-patches
2019-08-21 18:54     ` Sergio Durigan Junior
2019-08-25 22:24   ` Christian Biesinger via gdb-patches
2019-08-26 13:31     ` Pedro Alves
2019-09-12 22:14       ` Christian Biesinger via gdb-patches
2019-09-10 19:14 [PATCH 2/3] Factor out the code to do the datadir-relocation for gdbinit Christian Biesinger via gdb-patches
2019-09-10 19:14 ` [PATCH 2/3 v2] " Christian Biesinger via gdb-patches
2019-09-11 20:15   ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox