Add message suggesting gdbserver for non-matching PID namespaces.
This commit is contained in:
parent
b84e3d603f
commit
04d3aefc17
@ -153,3 +153,63 @@ index 1eb457d..ce60beb 100644
|
|||||||
--
|
--
|
||||||
2.5.0
|
2.5.0
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
http://sourceware.org/ml/gdb-patches/2016-03/msg00246.html
|
||||||
|
Subject: [patch] Suggest running gdbserver for a PID in container
|
||||||
|
|
||||||
|
|
||||||
|
--azLHFNyN32YCQGCU
|
||||||
|
Content-Type: text/plain; charset=us-ascii
|
||||||
|
Content-Disposition: inline
|
||||||
|
|
||||||
|
Hi,
|
||||||
|
|
||||||
|
currently
|
||||||
|
gdb -p <pid from a container>
|
||||||
|
will print:
|
||||||
|
warning: Target and debugger are in different PID namespaces; thread lists and other data are likely unreliable
|
||||||
|
|
||||||
|
BTW it is a bit lost in all the other messages. Full screen output is in:
|
||||||
|
https://sourceware.org/bugzilla/show_bug.cgi?id=19828
|
||||||
|
|
||||||
|
It correctly states the problem but it does not say how to solve it.
|
||||||
|
|
||||||
|
Is at least this little suggestion OK?
|
||||||
|
|
||||||
|
Originally I wanted to suggest also the Docker "-p 1234:1234" parameter but
|
||||||
|
I see the containers are more general topic than just Docker (even LxC etc.).
|
||||||
|
|
||||||
|
According to Gary future GDBs should be able to work even without gdbserver.
|
||||||
|
But currently gdbserver is still required.
|
||||||
|
|
||||||
|
|
||||||
|
Thanks,
|
||||||
|
Jan
|
||||||
|
|
||||||
|
--azLHFNyN32YCQGCU
|
||||||
|
Content-Type: text/plain; charset=us-ascii
|
||||||
|
Content-Disposition: inline; filename=1
|
||||||
|
|
||||||
|
gdb/ChangeLog
|
||||||
|
2016-03-15 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
|
* linux-thread-db.c (check_pid_namespace_match): Extend the message.
|
||||||
|
|
||||||
|
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
|
||||||
|
index 1eb457d..21166bf 100644
|
||||||
|
--- a/gdb/linux-thread-db.c
|
||||||
|
+++ b/gdb/linux-thread-db.c
|
||||||
|
@@ -1020,7 +1020,8 @@ check_pid_namespace_match (void)
|
||||||
|
{
|
||||||
|
warning (_ ("Target and debugger are in different PID "
|
||||||
|
"namespaces; thread lists and other data are "
|
||||||
|
- "likely unreliable"));
|
||||||
|
+ "likely unreliable. "
|
||||||
|
+ "Connect to gdbserver inside the container."));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--azLHFNyN32YCQGCU--
|
||||||
|
|
||||||
|
5
gdb.spec
5
gdb.spec
@ -27,7 +27,7 @@ Version: 7.11
|
|||||||
|
|
||||||
# The release always contains a leading reserved number, start it at 1.
|
# The release always contains a leading reserved number, start it at 1.
|
||||||
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
# `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
|
||||||
Release: 60%{?dist}
|
Release: 61%{?dist}
|
||||||
|
|
||||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
|
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
|
||||||
Group: Development/Debuggers
|
Group: Development/Debuggers
|
||||||
@ -1393,6 +1393,9 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 17 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11-61.fc24
|
||||||
|
- Add message suggesting gdbserver for non-matching PID namespaces.
|
||||||
|
|
||||||
* Tue Mar 15 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11-60.fc24
|
* Tue Mar 15 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.11-60.fc24
|
||||||
- New Fedora GDB testfile: rhbz1261564-aarch64-watchpoint.exp
|
- New Fedora GDB testfile: rhbz1261564-aarch64-watchpoint.exp
|
||||||
- Backport gdb-7.11 stable branch PR gdb/19676 fix (Pedro Alves).
|
- Backport gdb-7.11 stable branch PR gdb/19676 fix (Pedro Alves).
|
||||||
|
Loading…
Reference in New Issue
Block a user