]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: implement linux namespace support for fileio_lstat and vFile::lstat
authorFabian Kilger <kilger@sec.in.tum.de>
Wed, 11 Jun 2025 20:52:16 +0000 (22:52 +0200)
committerAndrew Burgess <aburgess@redhat.com>
Tue, 17 Jun 2025 20:37:11 +0000 (21:37 +0100)
commitbd389c9515d240f55b117075b43184efdea41287
tree4ccef165716aca75c46da7f8e733cda56512ffc4
parentc29a37f741775d5ffd6190920199181d2d93cc52
gdb: implement linux namespace support for fileio_lstat and vFile::lstat

The new algorithm to look for a build-id-based debug file
(introduced by commit 22836ca88591ac7efacf06d5b6db191763fd8aba)
makes use of fileio_lstat. As lstat was not supported by
linux-namespace.c, all lstat calls would be performed on the host
and not inside the namespace.  Fixed by adding namespace lstat
support.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32956

Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/linux-nat.c
gdb/linux-nat.h
gdb/nat/linux-namespaces.c
gdb/nat/linux-namespaces.h
gdbserver/hostio.cc
gdbserver/linux-low.cc
gdbserver/linux-low.h
gdbserver/target.cc
gdbserver/target.h