public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Oldest supported Linux kernel version (require PTRACE_EVENT_CLONE?)
@ 2015-10-15 11:38 Pedro Alves
  2015-10-15 12:27 ` Antoine Tremblay
  2015-11-01  7:14 ` Doug Evans
  0 siblings, 2 replies; 3+ messages in thread
From: Pedro Alves @ 2015-10-15 11:38 UTC (permalink / raw)
  To: gdb

Hi,

GDB currently has no guideline on the oldest version of the
Linux kernel gdb supports.

For every new feature the kernel introduces, we keep old
fallback code, and as time (years) goes by, we keep the old code
working, and tend to leave it in place.

As a result we're probably carrying around old code that works
around bugs and missing features in ancient kernels that nobody
expects new gdb to ever run on.

Such fallback code obviously increases maintenance burden, often
confuses newcomers, and sometimes influences design decisions deep
in the ptrace backends and sometimes in the remote protocol.

For example, on systems that don't support PTRACE_EVENT_CLONE, both gdb
and gdbserver coordinate with libthread_db.so to insert breakpoints at magic
locations in libpthread.so, in order to thread creation and thread death.

The ongoing work to make gdbserver support software single-stepping itself,
necessary for tracepoints on ARM, MIPS and other architectures where the
CPU doesn't offer a hardware single-step facility, trips on these magic
breakpoints -- the question of how to fit the new software single-step
mechanism with those breakpoints naturally comes up.

However, PTRACE_EVENT_CLONE was first introduced in Linux 2.5.46,
released in November 2002.

So I think it's reasonable to just remove support for kernels that
don't support PTRACE_EVENT_CLONE, and sidestep the libthread_db
breakpoints issues entirely.

Comments?

Thanks,
Pedro Alves

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

end of thread, other threads:[~2015-11-01  7:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-15 11:38 Oldest supported Linux kernel version (require PTRACE_EVENT_CLONE?) Pedro Alves
2015-10-15 12:27 ` Antoine Tremblay
2015-11-01  7:14 ` Doug Evans

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).