From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/7] gdb: use get_standard_config_dir when looking for .gdbinit
Date: Mon, 09 Nov 2020 06:52:51 -0700 [thread overview]
Message-ID: <87a6vqiqmk.fsf@tromey.com> (raw)
In-Reply-To: <92f3b4d4a87643bbb9768fbcb9ee8c77cd5ba8de.1601927355.git.andrew.burgess@embecosm.com> (Andrew Burgess's message of "Wed, 7 Oct 2020 21:05:06 +0100")
>>>>> "Andrew" == Andrew Burgess <andrew.burgess@embecosm.com> writes:
Andrew> This commit effectively changes the default location of the .gdbinit
Andrew> file, while maintaining backward compatibility.
Andrew> diff --git a/gdbsupport/pathstuff.cc b/gdbsupport/pathstuff.cc
Andrew> index 9fb5e5cf614..a52e53b8671 100644
Andrew> --- a/gdbsupport/pathstuff.cc
Andrew> +++ b/gdbsupport/pathstuff.cc
Andrew> @@ -23,6 +23,10 @@
Andrew> #include "filenames.h"
Andrew> #include "gdb_tilde_expand.h"
Andrew> +#include <sys/types.h>
Andrew> +#include <sys/stat.h>
Andrew> +#include <unistd.h>
Andrew> +
Andrew> #ifdef USE_WIN32API
Andrew> #include <windows.h>
Andrew> #endif
Andrew> @@ -298,6 +302,51 @@ get_standard_config_dir ()
Andrew> return {};
Andrew> }
Andrew> +std::string
Andrew> +find_gdb_home_config_file (const char *name, struct stat *buf)
Andrew> +{
For my mingw build, this fails with:
CXX pathstuff.o
../../binutils-gdb/gdbsupport/pathstuff.cc:324:1: error: no previous declaration for 'std::string find_gdb_home_config_file(const char*, _stati64*)' [-Werror=missing-declarations]
324 | find_gdb_home_config_file (const char *name, struct stat *buf)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
I suppose the definition of "stat" changes between the header and the
.cc file, probably due to the new includes somehow.
I configure like this:
../binutils-gdb/configure '--host=i686-w64-mingw32' '--target=i686-w64-mingw32' '--disable-binutils' '--disable-gas' '--disable-gold' '--disable-gprof' '--disable-ld' '--disable-guile' '--disable-source-highlight' 'host_alias=i686-w64-mingw32' 'target_alias=i686-w64-mingw32' '--without-debuginfod'
This build is done on x86-64 Fedora 32.
Tom
next prev parent reply other threads:[~2020-11-09 13:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-07 20:05 [PATCH 0/7] Adding startup files to GDB Andrew Burgess
2020-10-07 20:05 ` [PATCH 1/7] Add get_standard_config_dir function Andrew Burgess
2020-10-07 20:05 ` [PATCH 2/7] gdb: use get_standard_config_dir when looking for .gdbinit Andrew Burgess
2020-10-08 6:52 ` Eli Zaretskii via Gdb-patches
2020-11-02 10:20 ` Andrew Burgess
2020-10-22 19:07 ` Tom Tromey
2020-11-09 13:52 ` Tom Tromey [this message]
2020-11-09 13:55 ` Tom Tromey
2020-10-07 20:05 ` [PATCH 3/7] gdb: new function to wrap up executing command line scripts/commands Andrew Burgess
2020-10-08 15:25 ` Aktemur, Tankut Baris via Gdb-patches
2020-11-02 9:48 ` Andrew Burgess
2020-10-22 19:08 ` Tom Tromey
2020-10-07 20:05 ` [PATCH 4/7] gdb: process startup files and startup command line options Andrew Burgess
2020-10-08 6:28 ` Eli Zaretskii via Gdb-patches
2020-10-07 20:05 ` [PATCH 5/7] gdb: add mechanism to auto-save startup options Andrew Burgess
2020-10-08 6:36 ` Eli Zaretskii via Gdb-patches
2020-10-07 20:05 ` [PATCH 6/7] Let the user control the startup style Andrew Burgess
2020-10-08 6:40 ` Eli Zaretskii via Gdb-patches
2020-10-07 20:05 ` [PATCH 7/7] Add "set startup-quietly" Andrew Burgess
2020-10-08 6:44 ` Eli Zaretskii via Gdb-patches
2020-10-08 6:56 ` [PATCH 0/7] Adding startup files to GDB Eli Zaretskii via Gdb-patches
2020-10-22 19:02 ` Tom Tromey
2020-10-28 15:29 ` Andrew Burgess
2021-01-11 16:45 ` Andrew Burgess
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=87a6vqiqmk.fsf@tromey.com \
--to=tom@tromey.com \
--cc=andrew.burgess@embecosm.com \
--cc=gdb-patches@sourceware.org \
/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