* [pushed] gdb: fix gnu-nat build
@ 2021-11-03 19:12 Simon Marchi
0 siblings, 0 replies; only message in thread
From: Simon Marchi @ 2021-11-03 19:12 UTC (permalink / raw)
To: gdb-patches; +Cc: Andrea Monaco, Simon Marchi
When building gnu-nat.c, we get:
CXX gnu-nat.o
gnu-nat.c: In member function 'virtual void gnu_nat_target::create_inferior(const char*, const string&, char**, int)':
gnu-nat.c:2117:13: error: 'struct inf' has no member named 'target_is_pushed'
2117 | if (!inf->target_is_pushed (this))
| ^~~~~~~~~~~~~~~~
gnu-nat.c:2118:10: error: 'struct inf' has no member named 'push_target'
2118 | inf->push_target (this);
| ^~~~~~~~~~~
This is because of a confusion between the generic `struct inferior`
variable and the gnu-nat-specific `struct inf` variable. Fix by
referring to `inferior`, not `inf`.
Adjust the comment on top of `struct inf` to clarify the purpose of that
type.
Co-Authored-By: Andrea Monaco <andrea.monaco@autistici.org>
Change-Id: I2fe2f7f6ef61a38d79860fd262b08835c963fc77
---
gdb/gnu-nat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 54838347f947..c6cecff06867 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -149,7 +149,7 @@ struct inf_wait
int suppress; /* Something trivial happened. */
};
-/* The state of an inferior. */
+/* Further Hurd-specific state of an inferior. */
struct inf
{
/* Fields describing the current inferior. */
@@ -2108,8 +2108,8 @@ gnu_nat_target::create_inferior (const char *exec_file,
inf_debug (inf, "creating inferior");
- if (!inf->target_is_pushed (this))
- inf->push_target (this);
+ if (!inferior->target_is_pushed (this))
+ inferior->push_target (this);
pid = fork_inferior (exec_file, allargs, env, gnu_ptrace_me,
NULL, NULL, NULL, NULL);
--
2.26.2
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-03 19:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 19:12 [pushed] gdb: fix gnu-nat build Simon Marchi
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).